Initial commit
No files matched your search
@@ -0,0 +1,29 @@
|
||||
.classpath
|
||||
.idea
|
||||
.project
|
||||
.settings
|
||||
portal_client/dist/
|
||||
portal_client/nbproject/private/
|
||||
portal_client/node/
|
||||
portal_client/node_modules/
|
||||
portal_client/test_out/
|
||||
portal_client/temp/
|
||||
portal_client/app/compiled-less
|
||||
portal_client/app/index.html
|
||||
portal_client/app/yarn_components/**
|
||||
portal_webapp/.externalToolBuilders/
|
||||
portal_client/yarn.l*
|
||||
portal_client/yarn-*
|
||||
npm-debug.log
|
||||
phantomjs
|
||||
tags
|
||||
*.DS_Store
|
||||
*/bin/
|
||||
**/.classpath
|
||||
**/.settings
|
||||
**/*.swp
|
||||
**/target
|
||||
**/.tern-project
|
||||
**/*.iml
|
||||
**/git.properties
|
||||
/filerepo_api/
|
||||
@@ -0,0 +1,171 @@
|
||||
# SETUP - Development
|
||||
---
|
||||
1. Clone the repository from BigMac:
|
||||
- Add your public key to BigMac account.
|
||||
- Clone the repository: `git clone "ssh://git@bigmac.northgrum.com:8010/saipt/portal-webapp.git"`
|
||||
2. Create/Edit `settings.xml` in your `.m2` folder (see next section for example)
|
||||
3. This project requires ngas-commons to be built prior to building this application
|
||||
- Checkout `ngas-commons` (`"ssh://git@bigmac.northgrum.com:8010/saipt/ngas-commons.git"`)
|
||||
- Change directories into `ngas-commons` and run `mvn clean install`
|
||||
4. Change directories into the project and run `mvn clean install` (This might take awhile)
|
||||
5. Once the server launches, you should be able to access the webapp by browsing to `http://localhost:8080/portal/`
|
||||
|
||||
## Yarn
|
||||
---
|
||||
Yarn is the the new package manager used with node.js in replacement of `npm` it uses the same package.json file.
|
||||
|
||||
To download a new client side library use the command `yarn add <package_name> --save`. This will add the files to the `node_modules` library.
|
||||
|
||||
Next include the appropriate file into the `assets.js` file inside `portal_client` to make sure it will be injected into the `index.html` file during run time.
|
||||
|
||||
The `assets.js` file specifies all the vendor libraries that have to be included into the client code during build.
|
||||
|
||||
|
||||
## Settings.xml
|
||||
---
|
||||
If developing on the NGGN the proxy settings are needed to download the libraries
|
||||
|
||||
Sample:
|
||||
```xml
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
|
||||
<proxies>
|
||||
<proxy>
|
||||
<id>ngas-proxy</id>
|
||||
<active>true</active>
|
||||
<protocol>http</protocol>
|
||||
<host>eastproxy.northgrum.com</host>
|
||||
<port>80</port>
|
||||
<username>(your MyID)</username>
|
||||
<password>(your login password)</password>
|
||||
</proxy>
|
||||
<proxy>
|
||||
<id>ngas-proxy2</id>
|
||||
<active>true</active>
|
||||
<protocol>https</protocol>
|
||||
<host>eastproxy.northgrum.com</host>
|
||||
<port>80</port>
|
||||
<username>(your MyID)</username>
|
||||
<password>(your login password)</password>
|
||||
</proxy>
|
||||
</proxies>
|
||||
<servers>
|
||||
<server>
|
||||
<id>flyway-localhost</id>
|
||||
<username>root</username>
|
||||
<password>(mysql root password)</password>
|
||||
</server>
|
||||
<server>
|
||||
<!-- in tomcat conf/tomcat-users.xml specify a user that has role manager-script -->
|
||||
<id>tomcat-localhost</id>
|
||||
<username>(manager-script username)</username>
|
||||
<password>(manager-script password)</password>
|
||||
</server>
|
||||
</servers>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id> local-deploy </id>
|
||||
<properties>
|
||||
<tomcat-home>C:\development\apache-tomcat-8.5.24-portal</tomcat-home>
|
||||
<tomcat-version>8.5.24</tomcat-version>
|
||||
<tomcat-base-url>http://localhost:8080</tomcat-base-url>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
||||
```
|
||||
|
||||
## Configuring Tomcat
|
||||
---
|
||||
Tomcat cannot run on port 80 or 443 unless it is is running as root (big security concern with that). It is suggested to use proxy services like `NGINX` or `Apache` to proxy 80 or 443 traffic to redirect to tomcat
|
||||
|
||||
#### NGINX
|
||||
1. In the default /etc/nginx/conf.d add a file called portal.conf
|
||||
|
||||
2. Populated it with the values below
|
||||
``` conf
|
||||
proxy_cache_path /tmp/NGINX_cache/ keys_zone=backcache:10m;
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
upstream tomcat {
|
||||
# Use IP Hash for session persistence
|
||||
ip_hash;
|
||||
|
||||
# List of Tomcat application servers
|
||||
server 127.0.0.1:8080;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name portal.viprcenter.com;
|
||||
client_max_body_size 0;
|
||||
|
||||
# Redirect all HTTP requests to HTTPS
|
||||
location / {
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name portal.viprcenter.com;
|
||||
client_max_body_size 0;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/portal.viprcenter.com.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/portal.viprcenter.com.key;
|
||||
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
# WebSocket configuration
|
||||
location / {
|
||||
proxy_pass http://tomcat;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Host $remote_addr;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Save the file
|
||||
|
||||
4. Modify `/etc/nginx/nginx.conf`
|
||||
|
||||
5. In the http section of the conf file add `include /etc/nginx/conf.d/portal.conf`
|
||||
|
||||
6. Restart NGINX
|
||||
|
||||
7. Navigate to the url. It should redirect to 443
|
||||
|
||||
|
||||
#### Apache
|
||||
|
||||
1. In apaches `httpd.conf` file add the following
|
||||
``` conf
|
||||
Listen 80
|
||||
Listen 443
|
||||
|
||||
<VirtualHost *:80>
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTP_HOST} ^(.*)$
|
||||
RewriteRule ^(.*)$ https://%1$1 [R=Permanent,L,QSA]
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
SSLEngine On
|
||||
SSLCertificateFile /etc/apache/ssl/portal.viprcenter.com.crt
|
||||
SSLCertificateKeyFile /etc/apache/ssl/portal.viprcenter.com.key
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://127.0.0.1:8080/
|
||||
ProxyPassReverse / http://127.0.0.1:8080/
|
||||
</VirtualHost>
|
||||
```
|
||||
2. Restart and try navigating
|
||||
@@ -0,0 +1,28 @@
|
||||
pipelines:
|
||||
default:
|
||||
- step:
|
||||
name: Commons build
|
||||
image: maven:3.3.9
|
||||
caches:
|
||||
- maven
|
||||
script:
|
||||
- git clone git@bitbucket.org:locus2k/commons.git
|
||||
- mvn -B install -f commons/pom.xml
|
||||
- step:
|
||||
name: Portal build
|
||||
image: maven:3.3.9
|
||||
caches:
|
||||
- maven
|
||||
script:
|
||||
- cp pipeline-settings.xml $HOME/.m2/settings.xml
|
||||
- mvn -B install # -B batch mode makes Maven less verbose
|
||||
services:
|
||||
- mysql
|
||||
|
||||
definitions:
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
environment:
|
||||
MYSQL_DATABASE: 'portal'
|
||||
MYSQL_ROOT_PASSWORD: 'let_me_in'
|
||||
@@ -0,0 +1,40 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : API.tex
|
||||
% SUBJECT : Document describing the api in Patch Repoistory.
|
||||
% AUTHOR : (C) Copyright 2018 Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{API}
|
||||
\label{api}
|
||||
|
||||
The following documents the api calls for 3rd party applications to interact with \portal.
|
||||
|
||||
The url to interact on would be in the format of \command{server:port/portal/endpoint\_url}.
|
||||
|
||||
For example: \command{https://portal.viprcenter.com:443/portal/account/addUser.do}.
|
||||
|
||||
Each connection is either a POST or a GET method. When it is described as being a POST method, the data is sent via the body of the request in \command{JSON} format, while a GET request sends the data as part of the URL.
|
||||
|
||||
Parameter names are case sensitive and have to be verbatim as specified in the parameters section. Parameters marked in \textcolor{red}{\texttt{Red}} are required parameters in the request while parameters marked in \textcolor{gray}{\texttt{Gray}} are optional.
|
||||
|
||||
All responses from the server are also in \command{JSON} format. The servers response raps the return data into a special ``success'' response in the format of:
|
||||
|
||||
\begin{center}
|
||||
\input{api/sample/SuccessResp}
|
||||
\end{center}
|
||||
|
||||
\command{success} section is either \command{false} or \command{true} and determines if the return was successful or not. The \command{body} section is the actual data being returned. All ``Sample Responses'' will be in the body section.
|
||||
|
||||
Each section below is broken down to which portion the api calls belong to.
|
||||
|
||||
\input{api/AccountAPI}
|
||||
\input{api/AppLogAPI}
|
||||
\input{api/ConfigurationAPI}
|
||||
\input{api/CredentialsAPI}
|
||||
\input{api/FileAPI}
|
||||
\input{api/GitAPI}
|
||||
\input{api/LoggerAPI}
|
||||
\input{api/PermissionsAPI}
|
||||
\input{api/ScriptAPI}
|
||||
\input{api/SystemAPI}
|
||||
@@ -0,0 +1,84 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Architecture.tex
|
||||
% SUBJECT : Document describing architecture issues in the entire Patch Repository system.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Architecture}
|
||||
\label{architecture}
|
||||
|
||||
\section{Overview}
|
||||
The overall architecture of the \portal system is shown in Figure~\ref{fig:arch-portal}. The server provides services for the entire system while the client allows users to interact with
|
||||
the server to schedule tasks and checkout git repositories.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\scalebox{0.5}{\includegraphics*{figures/Overall-Architecture.png}}
|
||||
\caption{Overall \portal Architecture}
|
||||
\label{fig:arch-portal}
|
||||
\end{figure}
|
||||
|
||||
The server stores all non-volatile data about files in a back end database. This information includes account data, server configuration, hash types, permissions, log information,
|
||||
schedules, git repositories, and file information.
|
||||
|
||||
Users interact with the \portal system via the \Client\ which gives functionality (depending on permissions) such as adding users, viewing log files, changing server configuration,
|
||||
changing seed value, modifying group permissions, schedule tasks and checkout repositories.
|
||||
|
||||
\section{Security}
|
||||
\portal is an online website and can be accessible by the public if placed on a public facing web server. It is the nature that malicious actors may attempt to deny, degrade or
|
||||
disrupt data transmission form the client to server by manipulating the network over which the server is being conducted. It is therefor desirable for \portal to provide some degree
|
||||
of security against these threats. This section outlines issues involved in \portal security. Specific information about how security related matters have been implemented is given in later chapters.
|
||||
|
||||
\subsection{Threat Model}
|
||||
The general environment in which a \portal website is hosted is assumed to be potentially hostile. Specifically the analysis of the \portal's security makes the following assumptions:
|
||||
|
||||
\begin{enumerate}
|
||||
\item \Server\ does not trust users or client programs acting on their behalf.
|
||||
\item The network is hostile and in control of a Dolev-Yao attacker. Sucn an attacker has the following capabilities:
|
||||
\begin{enumerate}
|
||||
\item Able to read all packets everywhere simultaneously.
|
||||
\item Able to modify any packet.
|
||||
\item Able to inject new packets on any link.
|
||||
\item Able to record arbitrary amounts of network data and replay it anywhere at any time.
|
||||
\item Able to block, delay, or rearrange packets on any link
|
||||
\end{enumerate}
|
||||
\item The attacker has full access to the \portal source code (both client and server) and any predefined constant data stored by either client or server.
|
||||
\end{enumerate}
|
||||
|
||||
In order for a reasonable security system to be designed, some trust and some limitations on the attacker's capabilities must be assumed. Specifically:
|
||||
|
||||
\begin{enumerate}
|
||||
\item \Server\ trusts the users once authenticated
|
||||
\item The Dolev-Yao attacker can not:
|
||||
\begin{enumerate}
|
||||
\item Read or modify computations done on any legitimate machine.
|
||||
\item Break any cryptographic algorithms used.
|
||||
\end{enumerate}
|
||||
\end{enumerate}
|
||||
|
||||
Note also the data transferred between client and server is not considered confidential (with the exception of password or other authentication information). Thus encrypting the data
|
||||
on the network is is not necessary.
|
||||
|
||||
There are several threats that \portal should counter. Specifically:
|
||||
|
||||
\begin{enumerate}
|
||||
\item A user should not be able to log in as another user.
|
||||
\item A user should not be able to navigate to any other page if the user is not logged in (should default to the login page)
|
||||
\item An unauthenticated user should not be able to upload files to the server
|
||||
\item User's without proper permissions should not be able to delete files
|
||||
\item It should not be possible to disrupt server transactions between a client and the server by introducing bogus packets on the network, or by replaying previous recorded packets.
|
||||
\end{enumerate}
|
||||
|
||||
Note that \portal does not need to protect itself against attacks involving blocked packets. A Dolev-Yao attacker will be able to disrupt tye system by causing network communication
|
||||
failure. However, \portal clients and server should make an attempt to detect such a situation and alert the user accordingly.
|
||||
|
||||
\subsection{Setup}
|
||||
\portal can be configured to run on a single server. A typical setup is as follows:
|
||||
\begin{enumerate}
|
||||
\item Connections come on port 80 or 443 to either an \command{NGINX} or \command{apache} proxy
|
||||
\item The proxy will direct connections to the \command{tomcat} server which hots the \portal application
|
||||
\item \command{Tomcat} will interact with the \command{MySQL} database to store/retrieve information
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Client.tex
|
||||
% SUBJECT : Document describing design issues in Patch Repoistory.
|
||||
% AUTHOR : (C) Copyright 2018 Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{\Client}
|
||||
\label{client}
|
||||
|
||||
\section{Requirements}
|
||||
|
||||
\Client\ is a set of javascript/html libraries that is executed for the user to interact with the \Server. The code uses various 3rd party libraries such as AngularJS, Angular-Material, JQuery, and inhouse
|
||||
written code to render the web pages to the user. It sends REST commands to the server and waits for a response in which the information requested will be displayed. It also subscribes to the server on a
|
||||
web socket to receive asynchronous messages from the server.
|
||||
|
||||
\subsection{Functional Requirements}
|
||||
|
||||
Once the user authenticates with the server, they are allowed to perform some session-only actions. These actions include (depending on permissions):
|
||||
\begin{enumerate}
|
||||
\item Add/Edit/Delete Scripts
|
||||
\item Add/Edit/Delete Git Repositories
|
||||
\item Add/Edit/Delete Credentials
|
||||
\item Add/Edit/Delete Email Templates
|
||||
\item Add/Edit/Delete Users.
|
||||
\item Add/Edit/Delete Permission Groups
|
||||
\item Add/Edit/Delete Environment Variables
|
||||
\item View/Purge system logs
|
||||
\item Modify the server configuration value
|
||||
\item Change seed value
|
||||
\item Change SMTP settings for mail
|
||||
\item Change the log level of the server logger
|
||||
\end{enumerate}
|
||||
|
||||
The functions granted to the user are all determined in which permission group the user belongs to. This allows site admins to specify who gets access to what features.
|
||||
|
||||
\subsection{Non-Functional Requirements}
|
||||
|
||||
Since \Client\ is web based any platform can access the website provided they have the correct url to connect to.
|
||||
|
||||
\subsubsection{Performance}
|
||||
|
||||
Since this is a web based application, the connecting clients do not have strict performance requirements.
|
||||
|
||||
The following is recommended for clients connecting to the server:
|
||||
|
||||
\begin{itemize}
|
||||
\item 8GB or more RAM
|
||||
\item Dual Core processor or greater
|
||||
\item Latest Chrome, Edge or Firefox browser
|
||||
\end{itemize}
|
||||
|
||||
The application renders best on Chrome, Edge or Firefox, and Internet Explorer should not be used. With that being said, if Internet Explorer is the only option, it should be the latest version (IE11).
|
||||
It to be noted that there might be some rendering issues using IE11 as it handles rendering html/javascript differently than what is recommended by industry standards.
|
||||
|
||||
\subsubsection{Security}
|
||||
|
||||
Since \portal is a web based application, it is recommended that clients try to connected to the server via HTTPS connection to secure the data being sent over the network. If the server is
|
||||
configured correctly, the client should redirect to HTTPS if trying to connect to normal HTTP.
|
||||
|
||||
Once authenticated the user is assigned permissions based on the permission group the they belong to. These permissions determine which actions the user can take and which tabs the user can view.
|
||||
The user should not be able to perform actions outside the permissions granted to them.
|
||||
|
||||
\subsubsection{User Characteristics}
|
||||
|
||||
Users of the \Client\ do not need to have programming experience as it is a web based applications. Users should reference Chapter~\ref{userGuide} on how to perform desired tasks.
|
||||
|
||||
\subsubsection{Scale}
|
||||
|
||||
Scaling the client is not necessary as each client creates individual sessions to the server and many clients can simultaniously connect. It is limited to how many connections the host server can
|
||||
handled and its performance specifications.
|
||||
|
||||
\subsubsection{Data Formats}
|
||||
|
||||
Data is passed between the client and server as a json formatted string.
|
||||
|
||||
\subsubsection{Internationalization}
|
||||
|
||||
\Client\ javascript/html pages are all written in US English. There are no plans to change this currently.
|
||||
|
||||
\section{Design \& Architecture}
|
||||
|
||||
\Client\ makes use of various 3rd party and inhouse libraries to present the user with a rich experience. It takes advantage of current industrial standard libraries to render the pages
|
||||
(AngularJS and Angular-Material).
|
||||
|
||||
\subsection*{AngularJS}
|
||||
|
||||
AngularJS is a JavaScript-based open-source front-end web application framework mainly maintained by Google and by a community of individuals and corporations to address many of the challenges encountered
|
||||
in developing single-page applications. The JavaScript components complement Apache Cordova, a framework used for developing cross-platform mobile apps. It aims to simplify both the development and the
|
||||
testing of such applications by providing a framework for client-side model–view–controller (MVC) and model–view–viewmodel (MVVM) architectures, along with components commonly used in rich Internet applications.
|
||||
|
||||
The AngularJS framework works by first reading the HTML page, which has additional custom tag attributes embedded into it. Angular interprets those attributes as directives to bind input or output parts of
|
||||
the page to a model that is represented by standard JavaScript variables. The values of those JavaScript variables can be manually set within the code, or retrieved from static or dynamic JSON resources.
|
||||
|
||||
\subsubsection*{Angular-Material}
|
||||
|
||||
AngularJS Material is both a UI Component framework and a reference implementation of Google's Material Design Specification. This project provides a set of reusable, well-tested, and accessible
|
||||
UI components based on Material Design.
|
||||
|
||||
Material Design is a specification for a unified system of visual, motion, and interaction design that adapts across different devices and different screen sizes.
|
||||
|
||||
\section{Compiling}
|
||||
|
||||
The client does not require compiling but instead all client code is incorperated into the final \filename{war} file by copying the contents into it during server build. The only special functionality
|
||||
is during build, the client's \filename{index.html} is rewritten to included the 3rd party references located in the \filename{assets.js} file then copied over to the final product.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Deployment.tex
|
||||
% SUBJECT : Document describing deployment issues in Patch Repository.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Deployment}
|
||||
\label{deployment}
|
||||
|
||||
This chapter describes how to build and deploy a \portal system. The audience for this chapter is \portal administrators and power users. This chapter also contains information that
|
||||
may be of use to \portal developers since developers will need to configure a working \portal system for testing and development purposes.
|
||||
|
||||
\portal comes packaged as a \command{war} file. It is recommended to use \command{Tomcat} to host the web application.
|
||||
|
||||
\portal interacts with a \command{MySQL} database. It is important to know the root username and password to the mysql server.
|
||||
|
||||
Upon start up the server will copy \filename{portal.properties} to the tomcat conf directory. It might initially fail as the defaults could be incorrect
|
||||
(see Appendix~\ref{sample-portal.properties}). It is possible to create this file in the conf directory before start up and change the configuration values accordingly.
|
||||
The only value that should need changing is the MySQL root password. See Subsection~\ref{mysql-root-password} to encrypt the root password
|
||||
|
||||
\section{Checking out and building web application}
|
||||
Remote into the web server that is going to host the web application. It is recommended for the server that is going to host the application should have Tomcat, MySQL and Apache or
|
||||
NGINX installed as services and configured as needed. While this is recommended, those services do not have to be all on the same machine. Configuration changes will need to be made
|
||||
in the \filename{settings.xml} file (see~\ref{settings.xml}) to point to the proper tomcat and mysql instances.
|
||||
|
||||
The following is a list of software that are required to be installed and on be on the system environment path or user path for the build process to work:
|
||||
\begin{enumerate}
|
||||
\item Maven \MavenVersion\ \cite{maven}
|
||||
\item Java \JavaVersion\ \cite{java}
|
||||
\item Ant \AntVersion\ \cite{ant}
|
||||
\end{enumerate}
|
||||
|
||||
Two projects need to be checkout out from the git repository. The \portal project and the ngas-commons project.
|
||||
|
||||
Section~\ref{dev-setup} describes how to checkout the \portal project
|
||||
|
||||
Section~\ref{ngas-commons} descrives how to checkout and build the \command{ngas-commons} library. This library is needed to build the main web application
|
||||
|
||||
To build the project issue the command \command{mvn clean install antrun:run@warcopy} (if tomcat is not running) or \command{mvn clean install tomcat7:redeploy}
|
||||
(if tomcat is currently running). This might take awhile as it will download the required libraries from the internet and deploy the war file to the tomcat server.
|
||||
|
||||
Once the build has completed and deployed verify in the logs the application has come up with no errors. The log files can be found in the tomcat home directory under
|
||||
\filename{logs/portal.out}
|
||||
|
||||
\section{Encrypted MySQL Root Password}
|
||||
\label{mysql-root-password}
|
||||
|
||||
To encrypted the mysql root password first checkout and compile the \command{ngas-commons} library (See section~\ref{ngas-commons} to perform the task).
|
||||
|
||||
Once the commons library has been downloaded and installed perform the following.
|
||||
|
||||
\begin{legal}
|
||||
\item Navigate to the \command{.m2} directory located in the home directory
|
||||
\item Navigate to \filename{repository/com/ngas/ngas-commons/\ngasCommonsVersion}
|
||||
\item Execute the following command\newline
|
||||
\command{java -cp ngas-commons-\ngasCommonsVersion.jar net.locusworks.commons.crypto.AES <root-password>}\newline
|
||||
Where ``root-password'' is the MySQL root password
|
||||
\end{legal}
|
||||
|
||||
Once the properties file has been modified/created, start tomcat and the application should start up as normal.
|
||||
|
||||
\section{Seed File}
|
||||
\label{seed-file}
|
||||
|
||||
All protected data such as passwords and private keys are encrypted using AES. To increase security, the AES key relies on a seed\footnotemark\
|
||||
file (see Appendex~\ref{sample-seed-file}). This file is loaded into java's \filename{SecureRandom} class to generate the AES key.
|
||||
|
||||
The \filename{portal.properties} (see Appendex~\ref{sample-portal.properties}) specifies where this seed file is located. This file should be in a protected area with strict access.
|
||||
|
||||
During the course of operations it might be necessary for the seed file to be changed. This can be done in the application provided the user has the proper permissions to do so
|
||||
(See Chapter~\ref{aesSeed}). The process will update the seed file and all protected data using the new seed.
|
||||
|
||||
Some legacy operating systems do not support setting seeds within a random number generator such as \filename{SecureRandom}; therefore, legacy systems running \portal will fall back
|
||||
to using the key defined within the code itself.
|
||||
This can pose a security so it is advise to upgrade the server in which the application runs on to a newer operating system.
|
||||
|
||||
\footnotetext{A seed is a number or vector used to initialize a pseudorandom number generator. It will generate the same output every time if the same seed is used}
|
||||
|
||||
\section{Configuring Tomcat}
|
||||
\label{conf-tomcat}
|
||||
|
||||
Tomcat cannot run on port 80 or 443 unless it is running as root which is not ideal. It is suggested to use a proxy service like \command{NGINX} or \command{Apache} to proxy 80 or 443
|
||||
traffic to redirect to tomcat.
|
||||
|
||||
\subsection{NGINX}
|
||||
NGINX can be configured to proxy 80 or 443 traffic to the tomcat server to host up the content. It can also be used to store the SSL/TLS certificates for https
|
||||
|
||||
\begin{enumerate}
|
||||
\item In the default \command{/etc/nginx/conf.d} directory add a file called \filename{portal.conf}
|
||||
\item Populate it with the values that can be found in Appendix~\ref{sample-nginx.conf}
|
||||
\item Save the file
|
||||
\item Modify \filename{/etc/nginx.conf}
|
||||
\item In the http section of the conf file add \command{include /etc/nginx/conf.d/portal.conf}
|
||||
\item Restart NGINX
|
||||
\item Navigate to the url. It should redirect to 443 and serve up the application content
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{Apache}
|
||||
Like NGINX apache can also be configured to proxy and or 443 traffic to the tomcat server and be used to store the SSL/TLS certificates.
|
||||
|
||||
\begin{enumerate}
|
||||
\item In the default \command{/etc/apache2/} directory add a file called \filename{httpd.conf}
|
||||
\item Populate it with the values that can be found in Appendix~\ref{sample-httpd.conf}
|
||||
\item Save the file
|
||||
\item Restart Apache (httpd)
|
||||
\item Navigate to the url. It should redirect to 443 and serve up the application content
|
||||
\end{enumerate}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Development.tex
|
||||
% SUBJECT : Document describing development issues in Patch Repository.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Development}
|
||||
\label{development}
|
||||
|
||||
This chapter describes how to develop, and build the \portal system. The audience for this chapter is \portal developers.
|
||||
|
||||
\section{Setup}
|
||||
\label{dev-setup}
|
||||
This section describes how to setup the \portal environment to be able to build the web application
|
||||
|
||||
\subsection{Development}
|
||||
\begin{enumerate}
|
||||
\item Clone the repository from BigMac
|
||||
\begin{enumerate}
|
||||
\item Add developers public key to BigMac account
|
||||
\item Clone the repository \newline
|
||||
\command{git clone ``ssh://git@bigmac.northgrum.com:8010/saipt/portal-webapp.git''}
|
||||
\end{enumerate}
|
||||
|
||||
\item Create/Edit \command{settings.xml} in the \command{.m2} located in the home directory. See Subsection~\ref{settings.xml}
|
||||
\item \portal requires \command{ngas-commons} library to be built prior to building the web application. See Subsection~\ref{ngas-commons}
|
||||
\item Change directories into the project and run \command{mvn clean install antrun:run@warcopy}. This could take some time to download the required libraries.
|
||||
\item Start the tomcat server and navigate to \command{http://localhost:8080/portal/} to make sure the server comes up
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{NGAS Commons}
|
||||
\label{ngas-commons}
|
||||
NGAS Commons is a common library of functions that other java applications can take advantage of.
|
||||
|
||||
To checkout the library:\newline
|
||||
\command{git clone ``ssh://git@bigmac.northgrum.com:8010/saipt/ngas-commons.git''}
|
||||
|
||||
To build:\newline
|
||||
\command{mvn clean install}
|
||||
|
||||
Note: \command{ngas-commons} needs to be built prior to building the main application
|
||||
|
||||
\section{Yarn}
|
||||
\label{yarn}
|
||||
Yarn is the new package manager used with \command{node.js} in replacement of \command{npm} it uses the same \command{pacakge.json} file that \command{npm} did.
|
||||
|
||||
To download a new client side library use the command \command{yarn add <package-name> --save}. This will add the file to the \command{node\_modules} library.
|
||||
|
||||
Next include the appropriate file into the \command{assets.js} file inside \command{portal\_client} to make sure it will be injected into the \command{index.html} file during compile time.
|
||||
|
||||
The \command{assets.js} file specifies all the vendor libraries that have to be included in the client html during build.
|
||||
|
||||
\section{Grunt}
|
||||
\label{grunt}
|
||||
Grunt\cite{grunt} allows for live reloading of client code to reflect any changes done on the client javascript/html pages during development. This requires the application to be running
|
||||
locally on port 8080. Grunt also has to be installed locally and on the users path to be able to execute properly.
|
||||
|
||||
To execute Grunt change directories to the client project \filename{portal\_client} and issue the command \command{grunt onlyServe}. This will start the proxy server and open a web browser
|
||||
that points to the proxy process on \command{127.0.0.1 port 9000}. Navigating to this url will load content from the local client content and not from the deployed client content. Making
|
||||
changes and saving the client code will automatically cause the site to refresh and will reflect the changes.
|
||||
|
||||
The deployed code is all minified and any javascript errors would not be easily debugged. Running grunt makes it reference the source material and allows the developer to debug the
|
||||
javascript that was causing the errors and also show up properly in the development console within the browser.
|
||||
|
||||
\section{Settings.xml}
|
||||
\label{settings.xml}
|
||||
Settings.xml allows for user specific keys to build the application. Each developer needs this file to build the application property
|
||||
|
||||
Sample \command{settings.xml} file can be found in Appendex~\ref{sample-settings.xml}
|
||||
|
||||
\section{IDE}
|
||||
|
||||
Most modern IDE's such as Eclipse, NetBeans, IntelliJ, can import existing maven projects. Once the project has been checked out, import into the IDE an existin maven project. Eclipse
|
||||
allows SCM checkout directly from the IDE.
|
||||
|
||||
\portal was developed using Eclipse \EclipseVersion\ and is the recommended IDE of choice.
|
||||
|
||||
\subsection{NetBeans}
|
||||
\label{netbeans}
|
||||
While the application was developed using Eclipse, the JPO\footnotemark\ classes were generated using NetBeans as they are well defined.
|
||||
\footnotetext{Java Persistence Objects}
|
||||
|
||||
To generate the JPO objects load at least the portal\_database project into netbeans. Right click on \filename{net.locusworks.portal.database.entities} package and choose
|
||||
\command{New -> Entities Classes From Database}
|
||||
|
||||
Set up the connect to connect to the portal database and choose Add All (but then remove \_flyway\_migration table) as shown in Figure~\ref{fig:netbeans-db} then click next
|
||||
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\scalebox{0.5}{\includegraphics*{figures/netbeans-database.png}}
|
||||
\caption{NetBeans Database Connection}
|
||||
\label{fig:netbeans-db}
|
||||
\end{figure}
|
||||
|
||||
In the ``Entity Classes'' section, make sure generation type is set to either ``New'' or ``Recreate'' (this can be changed by choosing the \command{\ldots} below the class name).
|
||||
|
||||
Make sure ``Generate Named Query Annotations for Persistent Fields'' and ``Generate JAXB Annotations'' are not selected as shown in Figure~\ref{fig:netbeans-ec} then click next
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\scalebox{0.5}{\includegraphics*{figures/netbeans-entityclass.png}}
|
||||
\caption{NetBeans Entity Classes}
|
||||
\label{fig:netbeans-ec}
|
||||
\end{figure}
|
||||
|
||||
\newpage
|
||||
|
||||
In the final window make sure the ``Collection Type'' is set to \command{java.util.list} and only ``Fully Qualified Database Table Names'' and ``Use Column Names in Relationships''
|
||||
are selected as shown
|
||||
in Figure~\ref{fig:netbeans-mo}.
|
||||
|
||||
This will generate all the JPO classes which map the database tables into java objects.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\scalebox{0.5}{\includegraphics*{figures/netbeans-mapping.png}}
|
||||
\caption{NetBeans Mapping Options}
|
||||
\label{fig:netbeans-mo}
|
||||
\end{figure}
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Introduction.tex
|
||||
% SUBJECT : Document describing the portal system in general terms.
|
||||
% AUTHOR : (C) Copyright 2018 by Nortrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Introduction}
|
||||
\label{introduction}
|
||||
|
||||
\portal is a website designed to be a central area where a user can schedule recurring automated tasks. The user can configure the service to connect to remote machines and execute
|
||||
scripts on those machines or perform execution of local tasks. It can also send and receive files to/from remote machines.
|
||||
|
||||
The \portal can checkout git repositories locally if need be. This allows for source controlled scripts to be utilized on the web site as well just in case certain external code needs
|
||||
to be updated before local execution can be performed.
|
||||
|
||||
\portal consists of several interacting programs.
|
||||
|
||||
\begin{enumerate}
|
||||
\item \bold{\Client}
|
||||
The client (written in javascript and html) is used by the user to create scheduled tasks, git repositories and general configuration of the \portal.
|
||||
\item \bold{\Server}
|
||||
The server (written in Java v\JavaVersion) manages the activity of the entire \portal system.
|
||||
\end{enumerate}
|
||||
|
||||
This document describes the entire \portal system's requirements, design, and implementation. If you plan to work on \portal development you should read this entire document.
|
||||
If you are a \portal administrator or user you may wish to read Chapter~\ref{deployment} describing how to deploy a \portal system.
|
||||
@@ -0,0 +1,144 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Server.tex
|
||||
% SUBJECT : Document describing design issues in the Patch Repository Server.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{\Server}
|
||||
\label{backend-server}
|
||||
|
||||
\section{Requirements}
|
||||
|
||||
\Server\ is the central connection point for any type of \portal client. This includes not only the web client, but the API and any scripts that can issue REST commands.
|
||||
\Server\ implements Stomp Messages for message passing and handling. It can send these messages internally or, utilizing websockets, back up to the client. \Server\ also
|
||||
has direct access to the database and all queries go through it to retrieve the desired information. This section describes the server's responsibility.
|
||||
|
||||
\subsection{Functional Requirements}
|
||||
|
||||
Once the \Server\ is started, it will create the message queuing processes and subscribe to them. It will also receive connections from any client trying to connect. During this attempt
|
||||
to connect the client-server interaction will pass data via websockets to make sure websockets can be utilized. If not a warning will appear on-screen indicating to to the user the
|
||||
process will function in a degradated state, otherwise no message will be passed but a green check mark will be displayed to the user.
|
||||
|
||||
The \Server\ is responsible for checking users group permissions to make sure they are granted certain authority to perform actions. These user groups are completely customizable by
|
||||
the end user but by default there are two groups pre initialized: user, \italic{user} and \italic{administrator}
|
||||
\begin{enumerate}
|
||||
\item Unauthenticated cannot access the site
|
||||
\item Authenticated users in the \italic{User} group is the default group that is granted the following permissions by default:
|
||||
\begin{enumerate}
|
||||
\item Login
|
||||
\item View Scripts Tab
|
||||
\item View Git Tab
|
||||
\end{enumerate}
|
||||
\item Autenticated users in the \italic{Administrator} group is granted complete control by default such as:
|
||||
\begin{enumerate}
|
||||
\item Add/Edit/Delete Scripts
|
||||
\item Add/Edit/Delete Git Repositories
|
||||
\item Add/Edit/Delete Credentials
|
||||
\item Add/Edit/Delete Email Templates
|
||||
\item Add/Edit/Delete Users.
|
||||
\item Add/Edit/Delete Permission Groups
|
||||
\item Add/Edit/Delete Environment Variables
|
||||
\item View/Purge system logs
|
||||
\item Modify the server configuration value
|
||||
\item Change seed value
|
||||
\item Change SMTP settings for mail
|
||||
\item Change the log level of the server logger
|
||||
\end{enumerate}
|
||||
\end{enumerate}
|
||||
|
||||
Users, with the correct permission, have the ability to add new permission groups for use and to assign to other users. A user can only belong ton one permission group.
|
||||
|
||||
It is expected for the server to respect the permissions granted to the user and not allow for actions to be performed in which the user is not allowed to perform.
|
||||
|
||||
\subsubsection{Statistics Tracking}
|
||||
|
||||
Currently there is no statistics tracking done by the \Server. It is a possiblity to be implemented in a later date in which this section of the documentation will be updated to reflect what is being tracked.
|
||||
|
||||
\subsection{Non-Functional Requirements}
|
||||
|
||||
\subsubsection{Platform}
|
||||
|
||||
\Server\ is written in Java and does not depend on a certain operating system or operatying system functions. IT will run on any platform that meets the following requirements:
|
||||
\begin{enumerate}
|
||||
\item Supports Java \JavaVersion
|
||||
\item Supports MySQL \MySQLVersion\ (only if mysql is to be ran on the same server as the application)
|
||||
\item Supports Tomcat \TomcatVersion
|
||||
\end{enumerate}
|
||||
|
||||
\subsubsection{Performance}
|
||||
Beceause slow performance on the host server does impact the performance, \Server does have strict performance requirements. Below is the minimum recommendations requirements to run \Server.
|
||||
\begin{itemize}
|
||||
\item 16 GB of RAM
|
||||
\item Dual Core CPU running at 2 GHZ or greater
|
||||
\item 8 GB of RAM allocated to the Tomcat Service
|
||||
\item 25 GB of hard drive space.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\subsubsection{Security}
|
||||
|
||||
The main server acts as the central connection point for every client, including the API and custom scripts, and most actions require authentication from each of these clients; therefore, security in \Server\
|
||||
is a high priority.
|
||||
|
||||
Every client must authenticate with \Server. Once authenticated, actions from the client are generally considered to be non-sensitive, so SSL is not necessary once a session has been established. It is
|
||||
recommended to either configure tomcat or the proxy service to use SSL/TLS to encrypt the web traffic between the client and server.
|
||||
|
||||
Passwords will be stored as a salted hash in a MySQL database column. Once \Server\ receives the password from the client, it performs a SHA-1 hash with salt on it. Since the hash is considered irreversible,
|
||||
it would be impossible to log in using that hash if one were somehow able to steal it. The database should be on an the same machine or on an isolated network with no access allowed except for the server, so
|
||||
packet sniffing efforts are not likely to produce results.
|
||||
|
||||
\subsubsection{User Characteristics}
|
||||
|
||||
\Server\ will be run and managed by administrators, who are expected to be competent in the operating system used. The user must be familiar with passing command-line arguments into programs,
|
||||
editing configuration files, and must have some experience securing their system (particularly the firewall configuration).
|
||||
|
||||
\subsubsection{Scale}
|
||||
|
||||
While the main server has high performance requirements it is unlikely the server will need to be expanded into grid computing or server clusters.
|
||||
\footnote{This may change considerably if \portal gains thousands of active users.}
|
||||
|
||||
\subsubsection{Data Formats}
|
||||
|
||||
The server reads a custom configuration file upon startup called \filename{portal.properties}. Configuration properties are formatted like:
|
||||
\command{key=value}
|
||||
|
||||
Data is passed between the client and server as a json formatted string.
|
||||
|
||||
\subsubsection{Internationalization}
|
||||
|
||||
\Server\ configuration files, databases, log outputs and debug outputs are all in US English. There are no plans to change this currently.
|
||||
|
||||
\section{Design \& Architecture}
|
||||
|
||||
The \Server\ can handle serveral different types of clients and all clients wishing to interact with the files connect to this server. This is done for two main reasons:
|
||||
\begin{enumerate}
|
||||
\item It's easier to maintain N number of types of clients under one server
|
||||
\item I'ts easier to add multiple types of clients as long as they use the API format
|
||||
\end{enumerate}
|
||||
|
||||
The server is the only connection point that will pass information back to the client.
|
||||
|
||||
\section{Compiling}
|
||||
|
||||
\Server\ is written in Java, which is a compiled language. Java files (\filename{*.java}) are compiled to \filename{*.class}. Any errors during compile time will cause the overall build to fail.
|
||||
Even with a successful build, it could still potentially fail to run. The only way to test if the program will successfully run is to provide 100\% coverage via unit testing.
|
||||
\footnote{Please see the section on testing.}
|
||||
|
||||
Eclipse's Java EE plugin is used to develop the JAVA code. Projects can be imported to Eclipse and executed from there. The program is compiled into a \filename{.war} file and cannot be directly ran from Eclipse.
|
||||
It is possible to configure Eclipse to attach to the tomcat instance and control the instance from there which will cause the program to start and stop.
|
||||
|
||||
To compile and copy the \filename{war} file to the tomcat directory when the tomcat instance is not running perform the following commands (provided proper permissions to copy the file to the tomcat directory):
|
||||
\newline
|
||||
\command{mvn clean install antrun:run@warcopy}
|
||||
|
||||
|
||||
To compile and redeploy the \filename{war} file to tomcat when tomcat is running perform the follow commands (provided the manager-script role as been assigned and specified)\newline
|
||||
\command{mvn clean install tomcat7:redeploy}
|
||||
\newline
|
||||
All 3rd party JAVA libraries will be downloaded and incorporated into the build. There is no need to manually download the 3rd party libraries.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
\chapter{Tools \& Libraries}
|
||||
\label{toolslibraries}
|
||||
|
||||
This chapter describes the tools and libraries used in the \portal development environment. Both where to get the necessary components and how to set them up are covered here.
|
||||
This chapter is only of interest to \portal developers. If you are a \portal player or administrator you do not need to read this chapter. Instead the details for setting up the
|
||||
components of a working \portal system are described in Chapter~\ref{deployment} on Deployment.
|
||||
|
||||
The following list reflects the tools and libraries used by the \portal developers.
|
||||
|
||||
\begin{itemize}
|
||||
\item Eclipse \EclipseVersion
|
||||
\item NetBeans \NetBeansVersion
|
||||
\item Java \JavaVersion
|
||||
\item Maven \MavenVersion
|
||||
\item Ant \AntVersion
|
||||
\item AngularJs \AngularJsVersion
|
||||
\item Spring \SpringVersion
|
||||
\item Hibernate \HibernateVersion
|
||||
\item Quartz \QuartzVerson
|
||||
\item JSch \JSchVersion
|
||||
\item JGit \JGitVersion
|
||||
\item Node.js \NodeVersion
|
||||
\item Yarn \YarnVersion
|
||||
\item Flyway \FlywayVersion
|
||||
\item Tomcat \TomcatVersion
|
||||
\end{itemize}
|
||||
|
||||
\section{Eclipse}
|
||||
Eclipse\cite{eclipse} provides IDEs and platforms for nearly every language and architecture such as Java, C/C++, JavaScript and PHP IDEs. It is built on extensible platforms for
|
||||
creating desktop, Web and cloud IDEs. These platforms deliver the most extensive collection of add-on tools available for software developers.
|
||||
|
||||
The \portal uses Eclipse freely to develop both the client and server side code. Eclipse is not needed to build the application. The offical version of Eclipse used by the \portal
|
||||
project is \EclipseVersion. Other nearby versions are likely to work as long as it supports Java \JavaVersion
|
||||
|
||||
\section{NetBeans}
|
||||
NetBeans\cite{netbeans} is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called modules.
|
||||
NetBeans runs on Microsoft Windows, macOS, Linux and Solaris. In addition to Java development, it has extensions for other languages like PHP, C, C++ and HTML5, Javadoc and Javascript.
|
||||
Applications based on NetBeans, including the NetBeans IDE, can be extended by third party developers.
|
||||
|
||||
The \portal uses NetBeans to generate the database entity classes for use as it is more robust than what Eclipse provides. See Chapter~\ref{development} section~\ref{netbeans} for
|
||||
more information
|
||||
|
||||
\section{Java}
|
||||
Java is the language the server is written in \cite{java}.
|
||||
|
||||
\portal uses extensive features that are provided in version \JavaVersion, therefore; previous versions of java will not be able to compile the server code.
|
||||
|
||||
\section{Maven}
|
||||
Maven is utilized for the build process \cite{maven}. It dynamically downloads the required libraries as specified in the \filename{pom.xml}
|
||||
files as to reduce the size of the overall projects. The downloaded libraries are stored within the users home directory under \filename{.m2/repository}.
|
||||
First maven will look inside the local repository for the required library and if its not found, it will download it from the internet automatically. With that being said,
|
||||
an active internet connection is required to build the web application for the first time. It is possible to configure the \filename{pom.xml} files for offline builds but requires
|
||||
the libraries to be pre staged in the local repository or a service such as Nexus.
|
||||
|
||||
To build the web application, be in the root project folder and issue the commaond \command{mvn install}. This will start the download process and run through various tasks to build
|
||||
and verify the application. If any part of the process fails to complete (such as a failed java compile or invalid javascript) the build will be terminated and will not continue until
|
||||
the errors are corrected.
|
||||
|
||||
The \portal utilizes Maven version \MavenVersion for its build process. It is possible to use older versions of Maven as long as it is version 3.0+
|
||||
|
||||
\section{Ant}
|
||||
Ant\cite{ant} is only utilized to copy the war file to the tomcat directory if tomcat is not currently running. The maven command \command{antrun:run@warcopy} is the command that will
|
||||
invoke the ant process. \portal utilizes ant version \AntVersion but older versions of Ant will work since the process of copying files has not changed
|
||||
|
||||
\section{AngularJs}
|
||||
AngularJs\cite{angularjs} is extensively used inside the client html code along with various other 3rd party javascript libraries. The list of 3rd party libraries used in the client
|
||||
can be found in \filename{assets.js}. It is not necessary to download the AngularJs library as it will be downloaded automatically along with the other vendor libraries during the build
|
||||
process. Yarn is utilized to do this task and place references to the files inside the \filename{index.html} during build. AngularJs is specifically called out because of how much it does
|
||||
inside the client and developers should be familiar with it. \portal utlizes version \AngularJsVersion of AngularJs as specified in the \filename{package.json} file.
|
||||
|
||||
\section{Spring}
|
||||
Spring Framework is the workhorse library of the server\cite{spring}. It drives every aspect of the server, from client authentication, page permissions and database transactions.
|
||||
It is responsible for converting json strings passed from the client to java objects in which can be utilized in the spring services. Spring operates on the Model View Controller aspect
|
||||
(MVC) in which the client requests information and spring returns the model to be displayed on the client page.
|
||||
|
||||
The typical workflow for spring can be shown in Figure~\ref{fig:spring-flow}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\scalebox{0.6}{\includegraphics*{figures/spring-flow.png}}
|
||||
\caption{Spring Workflow}
|
||||
\label{fig:spring-flow}
|
||||
\end{figure}
|
||||
|
||||
Spring security is utilized to make sure users do not access portions of the website they are not permitted to view. This is done through permission rules setup in the code and through
|
||||
an authorization token which is assigned to the user during login. The authentication token tells the security provider which part of the website the user has access to.
|
||||
The authentication token is populated with information that is retrieved from the permissions tables based on the users group permissions.
|
||||
|
||||
Spring websocket is utilized for the server to pass information back to the client asynchronously. Every time a user logins in they are automatically subscribed to the system websocket
|
||||
channel and their own private channel so the user can receive personal websocket messages and system wide websocket messages. This allows for the client to update the users screen when
|
||||
other users change something on the website. Without websockets the user would not know what has changed by other users unless they refresh their browser. During login, the website
|
||||
checks to see if websockets is allowed (some web site providers might block websockets). If the check passes normal processes can continue. If it fails, the site will fall back into a
|
||||
degredated state in which the user will not be able to get all the changes as specified above.
|
||||
|
||||
Spring CRUD Repository is utilized for querying the database. Developers do not need to worry about creating SQL statements as the repository will take care of that for them.
|
||||
It allows for create, read, update, and delete operations on the table the repository references. This is done through JPQL (java persistence query language) and Spring annotations.
|
||||
|
||||
Developers should consult the Spring JPA guide if more spring query methods are needed during development. The guide can be found at
|
||||
\url{https://docs.spring.io/spring-data/jpa/docs/current/reference/html/}
|
||||
|
||||
\portal utilizes Spring Framework version \SpringVersion. The developer does not need to worry about downloading this library is it will automatically be downloaded through maven during
|
||||
build time.
|
||||
|
||||
\section{Hibernate}
|
||||
Hibernate ORM\cite{hibernate} enables developers to more easily write applications whose data outlives the application process. As an Object/Relational Mapping (ORM) framework,
|
||||
Hibernate is concerned with data persistence as it applies to relational databases (via JDBC). Hibernate maps database tables to Java objects called Java Persistence Objects (JPO).
|
||||
This allows developers to create normal objects and act on them like a regular object but the changes will then persist to the database once the object has been saved. \portal utilizes
|
||||
Hibernate through the use of Spring which uses Hibernate in the background for persistence. The JPO objects are also referenced in the Spring CRUD Repositories. These objects are the
|
||||
objects the developer will use when doing CRUD operations (Create/Read/Update/Delete).
|
||||
|
||||
\portal utilizes Hibernate ORM version \HibernateVersion. The developer does not need to worry about downloading this library is it will automatically be downloaded through maven
|
||||
during build time.
|
||||
|
||||
\section{Quartz Scheduler}
|
||||
Quartz Scheduler\cite{quartz} is a richly featured, open source job scheduling library that can be integrated within virtually any Java application - from the smallest stand-alone
|
||||
application to the largest e-commerce system. Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks
|
||||
are defined as standard Java components that may execute virtually anything you may program them to do. The Quartz Scheduler includes many enterprise-class features, such as support for
|
||||
JTA transactions and clustering.
|
||||
|
||||
Quartz is freely usable, licensed under the Apache 2.0 license.
|
||||
|
||||
Sample uses of job scheduling with Quartz:
|
||||
\begin{itemize}
|
||||
\item \bold{Driving Process Workflow:} As a new order is initially placed, schedule a Job to fire in exactly 2 hours, that will check the status of that order, and trigger a
|
||||
warning notification if an order confirmation message has not yet been received for the order, as well as changing the order's status to ``awaiting intervention''.
|
||||
\item \bold{System Maintenance:} Schedule a job to dump the contents of a database into an XML file every business day (all weekdays except holidays) at 11:30 PM.
|
||||
\item Providing reminder services within an application.
|
||||
\end{itemize}
|
||||
|
||||
\portal utilizes Quartz Scheduler version \QuartzVerson to schedule all the tasks to be completed. The developer does not need to worry about downloading this library is it will automatically be downloaded through maven
|
||||
during build time.
|
||||
|
||||
\section{JSch}
|
||||
JSch\cite{jsch} is a pure Java implementation of SSH2.
|
||||
|
||||
JSch allows you to connect to an sshd server and use port forwarding, X11 forwarding, file transfer, etc., and you can integrate its functionality into your own Java programs.
|
||||
JSch is licensed under BSD style license.
|
||||
|
||||
\portal utilizes JSch version \JSchVersion. The developer does not need to worry about downloading this library is it will automatically be downloaded through maven during build time.
|
||||
|
||||
\section{JGit}
|
||||
JGit\cite{jgit} i is a pure Java implementation of the Git version control system. Git is a distributed SCM, which means every developer has a full copy of all history of every revision
|
||||
of the code, making queries against the history very fast and versatile.
|
||||
|
||||
\portal utilizes JGit version \JGitVersion. The developer does not need to worry about downloading this library is it will automatically be downloaded through maven during build time.
|
||||
|
||||
\section{Node.js}
|
||||
|
||||
Node.js\cite{nodejs} is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
|
||||
|
||||
Node.js is used to assemble and verify the client javascript and html. Node.js stores the 3rd party vendor libraries in the \filename{portal\_client} project folder under
|
||||
\filename{node\_modules} folders. Typically when using Node.js, there is a Node.js server running that serves up these 3rd party libraries to the client, but \portal does not use a
|
||||
node.js server to do this. Instead during compile time, the process looks at the \filename{assets.js} file to see which 3rd party libraries are needed and appends these files to the
|
||||
\filename{index.html} file for refence by the client.
|
||||
|
||||
Once the \filename{index.html} file has been written it is copied to the rest of the client code, then utilizing \command{jshint}, the javascript is checked for any errors. It uses
|
||||
'strict' checking to make sure there is proper syntax in the javascript such as semi-colons in the right place and proper closing tags. If the javascript check fails the whole build will
|
||||
fail and a message will tell the developer where the javascript error is.
|
||||
|
||||
Node.js is also used for live reloading of the client code. Utilizing \command{grunt}, the developer can make local changes to the client code and see the changes live on the website.
|
||||
This is done through a proxy service that points to the local content instead of the deployed content (as long as the deployed content is on the same machine as the developer is on).
|
||||
This allows the developer to make changes and not have to rebuild the whole application to see the client side changes (See Section~\ref{grunt} for more details).
|
||||
|
||||
\portal utilizes version \NodeVersion\ of Node.js. It is possible to use older versions of Node.js but it not recommended for security concerns.
|
||||
|
||||
\section{Yarn}
|
||||
\label{yarn2}
|
||||
|
||||
Yarn\cite{yarn} is a package manager program that allows for easy download of 3rd party javascript/typescript libraries. It caches every package so it never needs to download it again.
|
||||
Yarn is used as a replacement for node.js package manager (npm) and utilizes the same \filename{package.json} file as npm along with installing the packages in the same directory that
|
||||
npm (\filename{portal\_client/node\_modules}).
|
||||
|
||||
This allows for developers to switch easily from npm to yarn. During build time, maven will automatically download yarn locally to the project so it can use the local process to download
|
||||
the 3rd party libraries as specified in the \filename{package.json} file.
|
||||
|
||||
Yarn needs to be installed on the developers home path to be utilizes by the developer to install new packages. To install new packages issue the command
|
||||
\command{yarn add <package-name> --save}. This will download the request package and save the package to the \filename{package.json} file for future reference.
|
||||
|
||||
See~\ref{yarn} for more details.
|
||||
|
||||
\portal utilizes version \YarnVersion of yarn. No older version can be used at this time.
|
||||
|
||||
\section{Flyway}
|
||||
Flyway\cite{flyway} is an open source database migration tool. It strongly favors simplicity and convention over configuration. It is based around 7 basic commands: Migrate, Clean,
|
||||
Info, Validate, Undo, Baseline and Repair. Migrations can be written in SQL (database-specific syntax (such as MySQL, MSSQL, Oracle) is supported) or Java (for advanced data transformations
|
||||
or dealing with LOBs). It has a Command-line client, a Java API (also works on Android) for migrating the database on application startup and a Maven plugin.
|
||||
|
||||
\portal utilizes the sql syntax migration along with java implementaiton and maven plugin. It is not necessary to download flyway as maven will download the required lbraries automatically
|
||||
during build time.
|
||||
|
||||
Flyway allows for easy database migrations between versions from older versions of the software to new version (but not from newer to older). This allows for every deployment of the web
|
||||
application to perform the migraiton if needed to keep the database up to date. Flyway looks into the specified migration folder to execute migration scripts. These scripts can range from
|
||||
table creation, to adding data and modifying existing tables/data. \portal utilizes Flyway at two different times. The first time is during build flyway is executed to do the required
|
||||
migrations. The second time is during applcation startup to perform any migrations that need to happen on a production enviornment.
|
||||
|
||||
Flyway creates a table within the application table schema to keep track of which migrations have been applied. It also creates a checksum for each file. During migration,
|
||||
flyway will check the checksum of the file against a database entry. If no entry exists the migration is performed and an entry is entered into the flyway table. If the checksum
|
||||
matches, that migration is skipped as its already been applied. If the checksum does not match the entry, an error will be thrown and the build/startup will fail. This is to ensure that
|
||||
no previous migration files have been modified. All new modifications to existing migrations should be performed in another migration script.
|
||||
|
||||
The flyway maven plugin allows developers to perform clean, migrate, repair, info, and validate commands. Below are the maven commands that can be executed for various flyway processes
|
||||
|
||||
\begin{itemize}
|
||||
\item \command{mvn flyway:clean}\newline
|
||||
Clean drops all objects in the configured schemas. Clean is a great help in development and test. It will effectively give you a fresh start, by wiping your configured schemas
|
||||
completely clean. All objects (tables, views, procedures, \ldots) will be dropped. Needless to say: \bold{do not use against your production DB!}
|
||||
\item \command{mvn flyway:migrate}\newline
|
||||
Migrate migrates the schema to the latest version. Flyway will create the schema history table automatically if it doesn�t exist. Migrate is the centerpiece of the Flyway workflow.
|
||||
It will scan the filesystem or your classpath for available migrations. It will compare them to the migrations that have been applied to the database. If any difference is found, it
|
||||
will migrate the database to close the gap. Migrate should preferably be executed on application startup to avoid any incompatibilities between the database and the expectations
|
||||
of the code.
|
||||
\item \command{mvn flyway:repair}\newline
|
||||
Repair repairs the schema history table. Repair is your tool to fix issues with the schema history table. It has two main uses:
|
||||
\begin{itemize}
|
||||
\item Remove failed migration entries (only for databases that do NOT support DDL transactions)
|
||||
\item Realign the checksums, descriptions and types of the applied migrations with the ones of the available migrations
|
||||
\end{itemize}
|
||||
\item \command{mvn flyway:info}\newline
|
||||
Info prints the details and status information about all the migrations. Info lets developers know where they stand. At a glance they will see which migrations have already been
|
||||
applied, which other ones are still pending, when they were executed and whether they were successful or not.
|
||||
\item \command{mvn flyway:validate}\newline
|
||||
Validate validates the applied migrations against the available ones. Validate helps developers verify that the migrations applied to the database match the ones available locally.
|
||||
This is very useful to detect accidental changes that may prevent you from reliably recreating the schema.
|
||||
\end{itemize}
|
||||
|
||||
\portal utilizes version \FlywayVersion of flyway. The developer does not need to worry about downloading this library is it will automatically be downloaded through maven during build time.
|
||||
|
||||
\section{Tomcat}
|
||||
\label{tomcat2}
|
||||
Apache Tomcat\cite{tomcat}, often referred to as Tomcat Server, is an open-source Java Servlet Container developed by the Apache Software Foundation (ASF). Tomcat implements several
|
||||
Java EE specifications including Java Servlet, JavaServer Pages (JSP), Java EL, and WebSocket, and provides a "pure Java" HTTP web server environment in which Java code can run.
|
||||
|
||||
Tomcat is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation, released under the Apache License 2.0 license, and is
|
||||
open-source software.
|
||||
|
||||
While \portal was developed to run on tomcat, it is possible to be ran on other servers that support \filename{.war} files such as JBOSS, TomEE, and Wildfly.
|
||||
|
||||
Once tomcat is installed on the host server, the only configuration that needs to change is adding a user to the manager-script role. This user should be specified in
|
||||
\filename{conf/tomcat-users.xml} file under the tomcat home directory. This user and the corresponding password should be the same one as reflected in the \filename{settings.xml}
|
||||
file (see Reference~\ref{sample-settings.xml} and Section~\ref{settings.xml}). This will allow the application to redeploy to tomcat without having to shutdown deploy and startup tomcat
|
||||
after a successful build.
|
||||
|
||||
The developer just has to issues the command \command{mvn tomcat7:redeploy} to deploy the application to tomcat.
|
||||
|
||||
\portal utilizes version \TomcatVersion of Tomcat. Older or newer versions of tomcat can be used but it is not recommend to go any lower than tomcat 7
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : User.tex
|
||||
% SUBJECT : Document describing design issues in Patch Repoistory.
|
||||
% AUTHOR : (C) Copyright 2018 Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{User Guide}
|
||||
\label{userGuide}
|
||||
|
||||
This documetions how the user uses various aspects of the \portal.
|
||||
|
||||
\input{guides/Login}
|
||||
\input{guides/ScriptTab}
|
||||
\input{guides/GitTab}
|
||||
\input{guides/CredTab}
|
||||
\input{guides/EmailTab}
|
||||
\input{guides/UserTab}
|
||||
\input{guides/PermissionTab}
|
||||
\input{guides/EnvVarTab}
|
||||
\input{guides/SystemLogTab}
|
||||
\input{guides/Configuration}
|
||||
\input{guides/LogLevel}
|
||||
\input{guides/AESSeed}
|
||||
\input{guides/SMTP}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
\section{Account API}
|
||||
This section documents api calls that are associated with user accounts.
|
||||
|
||||
\subsection{Is Logged In}
|
||||
The following will check if the user is logged into the system. It would be for the local user, not a specified user. Each time a user logs in, the user is assiged a token. This method call checks to see if that token is present for that user.
|
||||
\begin{apimethod}
|
||||
{User Is Logged In}
|
||||
{account/isLoggedIn.do}
|
||||
{POST}
|
||||
{No}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/isLoggedInResp}}
|
||||
|
||||
\subsection{Login}
|
||||
The following method allows a user to log into the application
|
||||
\begin{apimethod}
|
||||
{Login}
|
||||
{account/login.do}
|
||||
{POST}
|
||||
{No}
|
||||
\begin{itemize}
|
||||
\item \Required{username}{Email of the user to login}
|
||||
\item \Required{password}{password of the user}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/loginReq}}{\input{api/sample/response/loginResp}}
|
||||
|
||||
\subsection{Logout}
|
||||
The following method logs the current user out
|
||||
\begin{apimethod}
|
||||
{Logout}
|
||||
{account/logout.do}
|
||||
{POST}
|
||||
{No}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/None}}
|
||||
|
||||
\subsection{Add User}
|
||||
The following method adds a user to the server
|
||||
\begin{apimethod}
|
||||
{Add User}
|
||||
{account/addUser.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{email}{Email associated with the user for login}
|
||||
\item \Required{password}{Default password for the user to login with}
|
||||
\item \Required{role}{Role the user belongs to}
|
||||
\item \Optional{firstName}{First name of the user to add}
|
||||
\item \Optional{lastName}{Last name of the user to add}
|
||||
\item \Optional{effectiveDate}{Date in which the user goes into effect (can acess site)}
|
||||
\item \Optional{expirationDate}{Date in which the user loses access to the site}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addUserReq}}{\input{api/sample/response/addUserResp}}
|
||||
|
||||
\subsection{Delete User}
|
||||
The following method removes a user from the server
|
||||
\begin{apimethod}
|
||||
{Delete User}
|
||||
{account/deleteUser.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{email}{Email associated with the user to delete}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deleteUserReq}}{\input{api/sample/SuccessResp}}
|
||||
|
||||
\subsection{Get All Users}
|
||||
The following method gets a list of all users (active and inactive) for the application
|
||||
\begin{apimethod}
|
||||
{Get All Users}
|
||||
{account/getAll.do}
|
||||
{GET}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getAllUsersResp}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
\section{Application Log API}
|
||||
This section documents api calls that are associated with the application logs
|
||||
|
||||
\subsection{Get All Logs}
|
||||
The following method gets a list of all the application logs
|
||||
\begin{apimethod}
|
||||
{Get All Logs}
|
||||
{logs/getAll.do}
|
||||
{GET}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getAllLogsResp}}
|
||||
|
||||
\subsection{Purge Logs}
|
||||
The following method purges logs between the start date and end date
|
||||
\begin{apimethod}
|
||||
{Purge Logs}
|
||||
{logs/purge.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{purgeStartDate}{Starting date to purge logs from}
|
||||
\item \Required{purgeEndDate}{Ending date to purge logs from}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/purgeLogReq}}{\input{api/sample/response/purgeLogResp}}
|
||||
@@ -0,0 +1,55 @@
|
||||
\section{Configuration API}
|
||||
|
||||
This section documents api calls that are associated with configuration settings.
|
||||
|
||||
\subsection{Get Configuration Value}
|
||||
The following will get a specified configuration value if that value is present in the server configuration
|
||||
\begin{apimethod}
|
||||
{Get Configuration Value}
|
||||
{config/getConfigurationValue.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{key}{Name of the configuration Value to retrieve}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/getConfValReq}}{\input{api/sample/response/getConfValResp}}
|
||||
|
||||
\subsection{Get Configuration}
|
||||
The following will get the current configuration values associated with the server as specified in the file \filename{\$TOMCAT\_HOME/conf/portal.properties}
|
||||
\begin{apimethod}
|
||||
{Get Configuration}
|
||||
{config/getConfiguration.do}
|
||||
{GET}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getConfResp}}
|
||||
|
||||
\subsection{Save Configuration}
|
||||
The following will save the server configuration values to \filename{\$TOMCAT\_HOME/conf/portal.properties}. All the parameters are option as they all do not need to be populated, just the ones that need to be changed
|
||||
\begin{apimethod}
|
||||
{Save Configuration}
|
||||
{config/saveConfiguration.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Optional{filepath}{File path to where the files are stored on the server}
|
||||
\item \Optional{dbUsername}{Username granted access to the portal tables}
|
||||
\item \Optional{dbPassword}{Password for the portal database user}
|
||||
\item \Optional{dbRootUser}{Root username for the database.}
|
||||
\item \Optional{dbRootPassword}{Password for the root user for the database}
|
||||
\item \Optional{dbHost}{URL or IP address for the database server}
|
||||
\item \Optional{dbPort}{Database port to connect on}
|
||||
\item \Optional{userExpirationDays}{Default number of days until a new user account expires}
|
||||
\item \Optional{logLevel}{Default log level that new loggers initialize with}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/response/getConfResp}}{\input{api/sample/SuccessResp}}
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
\section{Credentials API}
|
||||
This section documents api calls that are associated with script and git credentials.
|
||||
|
||||
\subsection{Get All Credentials}
|
||||
The following will get all the available credentials
|
||||
|
||||
\begin{apimethod}
|
||||
{Get All Credentials}
|
||||
{creds/do.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getAllCredsResp}}
|
||||
|
||||
\subsection{Get Credential Types}
|
||||
The following will get the available credential types allowed.
|
||||
|
||||
\begin{apimethod}
|
||||
{Get Credential Types}
|
||||
{creds/getCredentialTypes.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getCredTypesResp}}
|
||||
|
||||
\subsection{Add/Edit Credentials (Username/Password)}
|
||||
The following will add/edit username and password credentials to the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Add/Edit Credentials (Username/Password)}
|
||||
{creds/add.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name for the credentials}
|
||||
\item \Required{credentialType}{``PASSWD''}
|
||||
\item \Required{username}{Username to add}
|
||||
\item \Required{password}{Password of the user}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addCredUnameReq}}{\input{api/sample/response/addCredUnameResp}}
|
||||
|
||||
\subsection{Add/Edit Credentials (SSH Key)}
|
||||
The following will add/edit a ssh key to the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Add/Edit Credentials (SSH Key)}
|
||||
{creds/add.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name for the credentials}
|
||||
\item \Required{credentialType}{``SSH''}
|
||||
\item \Required{username}{Identity of the user who the key belongs to}
|
||||
\item \Required{key}{SSH private key}
|
||||
\item \Optional{passphrase}{Passphrase for the ssh key}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addCredSshKeyReq}}{\input{api/sample/response/addCredSshKeyResp}}
|
||||
|
||||
\subsection{Delete Credentials}
|
||||
The following will delete credentials from the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Delete Credentials}
|
||||
{creds/delete.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{uid}{Unique identifier of the credentials}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deleteCredsReq}}{\input{api/sample/response/deleteCredsResp}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
\section{File API}
|
||||
This section documents api calls associated with the patch files
|
||||
|
||||
\subsection{Download File}
|
||||
The following will allow to download a file
|
||||
\begin{apimethod}
|
||||
{Download File}
|
||||
{file/download.do}
|
||||
{GET}
|
||||
{No}
|
||||
\begin{itemize}
|
||||
\item \Required{id}{Id of the file to download}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
Sample GET request\newline
|
||||
\command{https://portal.viprcenter.com/portal/file/download.do?id=2}
|
||||
|
||||
\subsection{Delete File}
|
||||
The following will delete a file from the server
|
||||
\begin{apimethod}
|
||||
{Delete File}
|
||||
{file/delete.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{id}{The ID of the file to delete}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deleteFileReq}}{\input{api/sample/SuccessResp}}
|
||||
@@ -0,0 +1,73 @@
|
||||
\section{Git API}
|
||||
This section documents api calls that are associated with git repositories.
|
||||
|
||||
\subsection{Get All Repositories}
|
||||
The following will get all the available git repositories
|
||||
|
||||
\begin{apimethod}
|
||||
{Get All Repositories}
|
||||
{git/getAll.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getAllReposResp}}
|
||||
|
||||
\subsection{Add/Edit Git Repository}
|
||||
The following will add/edit a git repository
|
||||
|
||||
\begin{apimethod}
|
||||
{Add/Edit Git Repository}
|
||||
{git/add.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name of the repository}
|
||||
\item \Required{scm}{The git repository url to clone}
|
||||
\item \Required{branch}{The branch to checkout}
|
||||
\item \Required{directory}{Local directory to clone into (doesn't need to exist)}
|
||||
\item \Required{credentials}{The credentials to use. Requires the following:}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{uid}{Unique identifer of the credentials to use.}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addGitRepoReq}}{\input{api/sample/response/addGitRepoResp}}
|
||||
|
||||
\subsection{Pull Repository}
|
||||
The following will issue a pull command to the desired repository
|
||||
|
||||
\begin{apimethod}
|
||||
{Pull Repository}
|
||||
{git/pull.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{id}{Id of the repository to pull}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deleteGitRepoReq}}{\input{api/sample/response/addGitRepoResp}}
|
||||
|
||||
\subsection{Delete Git Repository}
|
||||
The following will delete a git repository
|
||||
|
||||
\begin{apimethod}
|
||||
{Delete Git Repository}
|
||||
{git/delete.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{id}{Id of the repository to delete}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deleteGitRepoReq}}{\input{api/sample/response/addGitRepoResp}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
\section{Logger API}
|
||||
This section documents api calls associated with the application loggers
|
||||
|
||||
\subsection{Get Loggers}
|
||||
The following will get a list of the current loggers and their log levels
|
||||
|
||||
\begin{apimethod}
|
||||
{Get Loggers}
|
||||
{logger/getLoggers.do}
|
||||
{GET}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getLoggersResp}}
|
||||
|
||||
\subsection{Set Loggers}
|
||||
The following will set the current loggers to the selected log level.
|
||||
|
||||
NOTE: the request body parameters are in a list
|
||||
|
||||
\begin{apimethod}
|
||||
{Set Loggers}
|
||||
{logger/setLoggers.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{logger}{The Logger to set the log level to}
|
||||
\item \Required{level}{The level to set the logging to}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/response/getLoggersResp}}{\input{api/sample/SuccessResp}}
|
||||
@@ -0,0 +1,121 @@
|
||||
\section{Permission API}
|
||||
|
||||
This section documents api calls that are associated with defining permissions
|
||||
|
||||
\subsection{Add Permission Category}
|
||||
|
||||
The following section will describe adding a permission category
|
||||
|
||||
\begin{apimethod}
|
||||
{Add Permission Category}
|
||||
{permissions/updatePermissionCategory.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name of the permission group }
|
||||
\item \Required{displayName}{Name to be displayed in the permissions list}
|
||||
\item \Required{enabled}{Whether or not the permission group is enabled}
|
||||
\item \Required{permissions}{permissions to add. The allowed permissions area aleady predefined by the server. Below are the required parameters that have to be set inside the permissions list.\newline \begin{itemize}
|
||||
\item \Required{permissionId}{Id of the permission to add}
|
||||
\item \Required{allowed}{whether or not the permission is enabled or not}
|
||||
\end{itemize}}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addPermGroupReq}}{\input{api/sample/response/addPermGroupResp}}
|
||||
|
||||
\subsection{Update Permission Category}
|
||||
|
||||
The following section will describe updating a permission category
|
||||
|
||||
\begin{apimethod}
|
||||
{Update Permission Category}
|
||||
{permissions/updatePermissionCategory.do}
|
||||
{POST}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name of the permission group }
|
||||
\item \Required{enabled}{Whether or not the permission group is enabled}
|
||||
\item \Required{permissions}{permissions to add. The allowed permissions area aleady predefined by the server.
|
||||
Below are the required parameters that have to be set inside the permissions list.\newline
|
||||
\begin{itemize}
|
||||
\item \Required{permissionId}{Id of the permission to add}
|
||||
\item \Required{allowed}{whether or not the permission is enabled or not}
|
||||
\end{itemize}}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/updatePermGroupReq}}{\input{api/sample/response/addPermGroupResp}}
|
||||
|
||||
\subsection{Get Permission Groups}
|
||||
|
||||
The following section will get permission groups with their associative permissions
|
||||
|
||||
\begin{apimethod}
|
||||
{Get Permission Groups}
|
||||
{permissions/getPermissionGroups.do}
|
||||
{GET}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getPermGroupResp}}
|
||||
|
||||
\subsection{Get All Permission Groups}
|
||||
|
||||
The following section will get permission groups only. Will not show the actual permissions
|
||||
|
||||
\begin{apimethod}
|
||||
{Get All Permission Groups}
|
||||
{permissions/getPermissionGroups.do}
|
||||
{GET}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getAllPermsResp}}
|
||||
|
||||
\subsection{Get Permission Categories}
|
||||
|
||||
The following section will get the different permission categories and the permissions associated with the category
|
||||
|
||||
\begin{apimethod}
|
||||
{Get All Permission Groups}
|
||||
{permissions/getPermissionGroups.do}
|
||||
{GET}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getPermCatResp}}
|
||||
|
||||
\subsection{Delete Permission Group}
|
||||
|
||||
The following section will delete a selected permission group. The return value is the deleted group
|
||||
|
||||
Note: The permission group has to be empty. No user can be long to the group to be deleted otherwise an error will be returned
|
||||
|
||||
\begin{apimethod}
|
||||
{Get All Permission Groups}
|
||||
{permissions/deletePermissionGroup.do}
|
||||
{GET}
|
||||
{Yes}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Permission group name to be deleted}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deletePermGroupReq}}{\input{api/sample/response/deletePermGroupResp}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
\section{Scripts API}
|
||||
This section documents api calls that are associated with creating and maintaining scripts.
|
||||
|
||||
\subsection{Get All Scripts}
|
||||
The following will get all the available scripts
|
||||
|
||||
\begin{apimethod}
|
||||
{Get All Scripts}
|
||||
{scripts/getAll.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getAllScriptsResp}}
|
||||
|
||||
\subsection{Get Schedule Frequency}
|
||||
The following will get a list of the available schedule frequencies
|
||||
|
||||
\begin{apimethod}
|
||||
{Get Get Schedule Frequency}
|
||||
{scripts/getScheduleFrequencies.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getScheduleFreqResp}}
|
||||
|
||||
\subsection{Get Script Type}
|
||||
The following will get a list of the types of scripts that can be created
|
||||
|
||||
\begin{apimethod}
|
||||
{Get Script Type}
|
||||
{scripts/getScriptType.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getScriptTypesResp}}
|
||||
|
||||
\subsection{Add Script Local}
|
||||
\label{add-script-Local}
|
||||
The following will a a local script to the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Add Script Local}
|
||||
{scripts/addScript.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name of the script}
|
||||
\item \Required{scriptType}{``LOCAL''}
|
||||
\item \Required{command}{The command to execute}
|
||||
\item \Optional{baseDirectory}{Local directory to start the command in}
|
||||
\item \Optional{outputDirectory}{Directory to place any output into}
|
||||
\item \Optional{parameters}{Paremetrs to be used with the command}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{parameter}{The parameter to be used}
|
||||
\end{itemize}
|
||||
\item \Optional{schedule}{Time and frequency the script should execute}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{frequency}{How often the script should trigger}
|
||||
\item \Required{startDatetime}{When the schedule should start to trigger}
|
||||
\item \Optional{endDatetime}{When the schedule should end}
|
||||
\item \Optional{maxExecution}{Number of executions before schedule stops}
|
||||
\end{itemize}
|
||||
\Optional{scriptVariables}{Environment variables specific to the script}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Name of the variable}
|
||||
\item \Required{value}{Value of the variable}
|
||||
\end{itemize}
|
||||
\Optional{scriptChain}{Follow-on scripts to execute after parent script finishes}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{childScript}{Id of the child script to execute}
|
||||
\item \Required{exitStatus}{Exit status of the parent to trigger child script}
|
||||
\end{itemize}
|
||||
\Optional{scriptEmails}{Email to send once script finishes}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{emailName}{Name of the email template to send}
|
||||
\item \Required{recipients}{List of recipients to send the email to. Requires email address}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addScriptLocalReq}}{\input{api/sample/response/addScriptLocalResp}}
|
||||
|
||||
\subsection{Update Script Local}
|
||||
|
||||
The following will update a local script on the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Update Script Local}
|
||||
{scripts/updateScript.do}
|
||||
{POST}
|
||||
{YES}
|
||||
See section~\ref{add-script-Local} for acceptable parameters and response
|
||||
\end{apimethod}
|
||||
|
||||
\subsection{Add Script Remote}
|
||||
\label{add-script-remote}
|
||||
The following will a remote script to the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Add Script Remote}
|
||||
{scripts/addScript.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name of the script}
|
||||
\item \Required{scriptType}{``REMOTE''}
|
||||
\item \Required{remote}{The remote connection information}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{scriptCredentials}{The uid of the credentials to use}
|
||||
\item \Required{url}{the IP address or url to connect to}
|
||||
\item \Required{port}{The port to connect to}
|
||||
\end{itemize}
|
||||
\item \Optional{baseDirectory}{Remote directory to start the command in}
|
||||
\item \Optional{outputDirectory}{Directory to place any output into}
|
||||
\item \Optional{parameters}{Paremetrs to be used with the command}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{parameter}{The parameter to be used}
|
||||
\end{itemize}
|
||||
\item \Optional{schedule}{Time and frequency the script should execute}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{frequency}{How often the script should trigger}
|
||||
\item \Required{startDatetime}{When the schedule should start to trigger}
|
||||
\item \Optional{endDatetime}{When the schedule should end}
|
||||
\item \Optional{maxExecution}{Number of executions before schedule stops}
|
||||
\end{itemize}
|
||||
\Optional{scriptVariables}{Environment variables specific to the script}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Name of the variable}
|
||||
\item \Required{value}{Value of the variable}
|
||||
\end{itemize}
|
||||
\Optional{scriptChain}{Follow-on scripts to execute after parent script finishes}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{childScript}{Id of the child script to execute}
|
||||
\item \Required{exitStatus}{Exit status of the parent to trigger child script}
|
||||
\end{itemize}
|
||||
\Optional{scriptEmails}{Email to send once script finishes}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{emailName}{Name of the email template to send}
|
||||
\item \Required{recipients}{List of recipients to send the email to. Requires email address}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addScriptRemoteReq}}{\input{api/sample/response/addScriptRemoteResp}}
|
||||
|
||||
\subsection{Update Script Remote}
|
||||
|
||||
The following will update a remote script on the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Update Script Remote}
|
||||
{scripts/updateScript.do}
|
||||
{POST}
|
||||
{YES}
|
||||
See section~\ref{add-script-remote} for acceptable parameters and response
|
||||
\end{apimethod}
|
||||
|
||||
\subsection{Add Script Scp}
|
||||
\label{add-script-scp}
|
||||
The following will a scp script to the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Add Script Scp}
|
||||
{scripts/addScript.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name of the script}
|
||||
\item \Required{scriptType}{``SCP''}
|
||||
\item \Required{scp}{The remote connection information}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{fromCredentials}{The uid of the credentials for the machine retriving file from}
|
||||
\item \Required{fromHost}{the IP address or url to connect to or ``LOCAL'' if the file is from the server}
|
||||
\item \Required{fromPort}{The port to connect to or 0 if the file is ``LOCAL''}
|
||||
\item \Required{toCredentials}{The uid of the credentials for the machine the files are being sent to}
|
||||
\item \Required{toHost}{the IP address or url to connect to or ``LOCAL'' to store files on the server}
|
||||
\item \Required{toPort}{The port to connect to or 0 if the file is being saved ``LOCAL''}
|
||||
\end{itemize}
|
||||
\item \Optional{baseDirectory}{Remote to look for the file}
|
||||
\item \Optional{outputDirectory}{Directory to place any files into}
|
||||
\item \Optional{schedule}{Time and frequency the script should execute}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{frequency}{How often the script should trigger}
|
||||
\item \Required{startDatetime}{When the schedule should start to trigger}
|
||||
\item \Optional{endDatetime}{When the schedule should end}
|
||||
\item \Optional{maxExecution}{Number of executions before schedule stops}
|
||||
\end{itemize}
|
||||
\Optional{scriptChain}{Follow-on scripts to execute after parent script finishes}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{childScript}{Id of the child script to execute}
|
||||
\item \Required{exitStatus}{Exit status of the parent to trigger child script}
|
||||
\end{itemize}
|
||||
\Optional{scriptEmails}{Email to send once script finishes}\newline
|
||||
\begin{itemize}
|
||||
\item \Required{emailName}{Name of the email template to send}
|
||||
\item \Required{recipients}{List of recipients to send the email to. Requires email address}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addScriptScpReq}}{\input{api/sample/response/addScriptScpResp}}
|
||||
|
||||
\subsection{Update Script Remote}
|
||||
|
||||
The following will update a scp script on the system
|
||||
|
||||
\begin{apimethod}
|
||||
{Update Script Scp}
|
||||
{scripts/updateScript.do}
|
||||
{POST}
|
||||
{YES}
|
||||
See section~\ref{add-script-scp} for acceptable parameters and response
|
||||
\end{apimethod}
|
||||
|
||||
\subsection{Manual Run Script}
|
||||
The following will manually run a script
|
||||
|
||||
\begin{apimethod}
|
||||
{Manually Run Script}
|
||||
{scripts/runScript.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{id}{Id of the script to run}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/runScriptReq}}{\input{api/sample/response/addScriptLocalResp}}
|
||||
|
||||
\subsection{Delete Script}
|
||||
The following will delete a script
|
||||
|
||||
\begin{apimethod}
|
||||
{Delete Script}
|
||||
{scripts/deleteScript.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{id}{Id of the script to delete}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/runScriptReq}}{\input{api/sample/response/addScriptLocalResp}}
|
||||
|
||||
\subsection{Delete Script Schedule}
|
||||
The following will delete a script schedule from a script
|
||||
|
||||
\begin{apimethod}
|
||||
{Delete Script Schedule}
|
||||
{scripts/deleteScriptSchedule.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{jobId}{Unique job identifier of the schedule to delete}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deleteScriptScheduleReq}}{\input{api/sample/response/deleteScriptScheduleResp}}
|
||||
|
||||
\subsection{Get Script Schedule Status Results}
|
||||
The following will get the results of the the schedule
|
||||
|
||||
\begin{apimethod}
|
||||
{Get Script Schedule Status Results}
|
||||
{scripts/getScriptScheduleStatus.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item uuid
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/getScriptStatusReq}}{\input{api/sample/response/getScriptScheduleStatusResp}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
\section{System API}
|
||||
This section documents api calls that are associated with the system environment.
|
||||
|
||||
\subsection{Get SMTP Configuration}
|
||||
The following will get the current smtp configuration
|
||||
|
||||
\begin{apimethod}
|
||||
{Get SMTP Configuration}
|
||||
{system/getSmtpConfig.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getSmtpConfigResp}}
|
||||
|
||||
\subsection{Update SMTP Configuration}
|
||||
The following will set the smtp configuration. The return value will be the same values that were set.
|
||||
|
||||
Below is the list of the smtp names that can be used:
|
||||
\begin{itemize}
|
||||
\label{list:smtp-keys}
|
||||
\item smtp.enabled
|
||||
\item mail.transport.protocol
|
||||
\item mail.smtp.port
|
||||
\item mail.smtp.host
|
||||
\item mail.smtp.auth
|
||||
\item mail.smtp.starttls.enable
|
||||
\item mail.smtp.starttls.required
|
||||
\item mail.smtp.ssl.trust
|
||||
\item smtp.from.user
|
||||
\item smtp.username
|
||||
\item smtp.password
|
||||
\item mail.debug
|
||||
\end{itemize}
|
||||
|
||||
\begin{apimethod}
|
||||
{Update SMTP Configuration}
|
||||
{system/updateSmtpConfig.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Name of the smtp configuration key}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/response/getSmtpConfigResp}}{\input{api/sample/response/getSmtpConfigResp}}
|
||||
|
||||
\subsection{Get All Environment Variables}
|
||||
|
||||
The following will get all global environment variables on the system.
|
||||
|
||||
\begin{apimethod}
|
||||
{Get All Environment Variables}
|
||||
{system/getAll.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/deleteEnvVarsResp}}
|
||||
|
||||
\subsection{Add Environment Variables}
|
||||
|
||||
The following will add global environment variables to the system.
|
||||
|
||||
Both the request and response values are in json arrays.
|
||||
|
||||
\begin{apimethod}
|
||||
{Add Environment Variables}
|
||||
{system/addEnvVars.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{name}{Unique name of the environment variable}
|
||||
\item \Required{value}{Value of the environment variable}
|
||||
\item \Required{isNew}{\command{true} if its a new environment variable or
|
||||
\command{false} if updating an existing variable}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addEnvVarsReq}}{\input{api/sample/response/addEnvVarsResp}}
|
||||
|
||||
\subsection{Delete Environment Variables}
|
||||
|
||||
The following will delete global environment variables from the system.
|
||||
|
||||
Both the request and response values are in json arrays.
|
||||
|
||||
\begin{apimethod}
|
||||
{Delete Environment Variables}
|
||||
{system/deleteEnvVars.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{id}{id of the environment variable to remove}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deleteEnvVarsReq}}{\input{api/sample/response/deleteEnvVarsResp}}
|
||||
|
||||
\subsection{Get Email Templates}
|
||||
|
||||
The following will get all the email templates on the system.
|
||||
|
||||
\begin{apimethod}
|
||||
{Get Email Templates}
|
||||
{system/getEmailTemplates.do}
|
||||
{GET}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item None
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/None}}{\input{api/sample/response/getEmailTemplateResp}}
|
||||
|
||||
\subsection{Add Email Template}
|
||||
|
||||
The following will add an email template to the system.
|
||||
|
||||
\begin{apimethod}
|
||||
{Add Email Template}
|
||||
{system/addEmailTemplate.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{emailName}{Unique name of the email template}
|
||||
\item \Required{emailSubject}{Subject of the email.}
|
||||
\item \Required{emailMessage}{Message to be sent to the recipients}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/addEmailTemplateReq}}{\input{api/sample/response/addEmailTemplateResp}}
|
||||
|
||||
\subsection{Delete Email Template}
|
||||
|
||||
The following will delete an email template from the system.
|
||||
|
||||
\begin{apimethod}
|
||||
{Delete Email Template}
|
||||
{system/deleteEmailTemplate.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{id}{Id of the template to delete}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/deleteEmailTemplateReq}}{\input{api/sample/response/addEmailTemplateResp}}
|
||||
|
||||
\subsection{Update Seed}
|
||||
The following will update the aes seed
|
||||
|
||||
\begin{apimethod}
|
||||
{Update Seed}
|
||||
{system/updateSeed.do}
|
||||
{POST}
|
||||
{YES}
|
||||
\begin{itemize}
|
||||
\item \Required{seed}{New seed value}
|
||||
\end{itemize}
|
||||
\end{apimethod}
|
||||
|
||||
\ApiData{\input{api/sample/request/updateSeedReq}}{\input{api/sample/SuccessResp}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
None
|
||||
@@ -0,0 +1,8 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"success":true,
|
||||
"body":true
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,11 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"username": "iparenteau",
|
||||
"name": "Isaac's Creds",
|
||||
"credentialType": "SSH",
|
||||
"passphrase": "foo",
|
||||
"key": "-----BEGIN RSA PRIVATE KEY-----...-----END RSA PRIVATE KEY-----"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,10 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"username": "foo",
|
||||
"password": "bar",
|
||||
"name": "FooBar",
|
||||
"credentialType": "PASSWD",
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,9 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"emailName": "Script Status 2",
|
||||
"emailSubject": "Script Status",
|
||||
"emailMessage": "<p>Script ${script_name} finished with an exit code of ${exit_status}</p>",
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,16 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"name": "JAVA_HOME",
|
||||
"value": "C:\Program Files\Java\jdk1.8.0_152",
|
||||
"isNew": true
|
||||
},
|
||||
{
|
||||
"name": "MAVEN_HOME",
|
||||
"value": "C:\tools\apache-maven-3.5.2",
|
||||
"isNew": true
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,13 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"name": "Stig Apply",
|
||||
"scm": "https://J65594@bigmac.northgrum.com/bitbucket/scm/saipt/stig-apply.git",
|
||||
"branch": "develop",
|
||||
"directory": "C:\\stigapply",
|
||||
"credentials": {
|
||||
"uid": "a7d6b897-8ec6-483c-9e68-c5a2676dcbf1",
|
||||
}
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,19 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"name": "test",
|
||||
"displayName": "Test",
|
||||
"enabled": true,
|
||||
"permissions": [
|
||||
{
|
||||
"permissionId": 1,
|
||||
"allowed": true
|
||||
},
|
||||
{
|
||||
"permissionId": 2,
|
||||
"allowed": false
|
||||
}
|
||||
]
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,38 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"name": "tomcat running",
|
||||
"command": "netstat",
|
||||
"baseDirectory": "C:\stigapply",
|
||||
"outputDirectory": "",
|
||||
"scriptType": "LOCAL",
|
||||
"parameters": [{
|
||||
"parameter": "-ano",
|
||||
},{
|
||||
"parameter": "|grep",
|
||||
},{
|
||||
"parameter": "8080",
|
||||
}],
|
||||
"schedule": [{
|
||||
"startDatetime": 1524229200673,
|
||||
"endDatetime": 1524834000000,
|
||||
"frequency": "HOURLY",
|
||||
"maxExecutions": null,
|
||||
}],
|
||||
"scriptVariables": [{
|
||||
"name": "JAVA_HOME",
|
||||
"value": "C:\Program Files\Java\jdk1.8.0_152",
|
||||
}],
|
||||
"scriptChain": [{
|
||||
"childScript": 3,
|
||||
"exitStatus": 0
|
||||
}],
|
||||
"scriptEmails": [{
|
||||
"emailName": "Script Status",
|
||||
"recipients": [{
|
||||
"email": "portalAdmin@ngc.com",
|
||||
}]
|
||||
}],
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,42 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"name": "tomcat running",
|
||||
"baseDirectory": "",
|
||||
"outputDirectory": "",
|
||||
"scriptType": "REMOTE",
|
||||
"remote": {
|
||||
"scriptCredentials": {
|
||||
"uid":"e6e99ca6-afee-4de6-ad30-9a8f12429160",
|
||||
},
|
||||
"url": "patchrepo.viprcenter.com",
|
||||
"port": 22
|
||||
},
|
||||
"parameters": [{
|
||||
"parameter": "netstat -ano",
|
||||
},{
|
||||
"parameter": "|grep 8080",
|
||||
}],
|
||||
"schedule": [{
|
||||
"startDatetime": 1524229200673,
|
||||
"endDatetime": 1524834000000,
|
||||
"frequency": "HOURLY",
|
||||
"maxExecutions": null,
|
||||
}],
|
||||
"scriptVariables": [{
|
||||
"name": "JAVA_HOME",
|
||||
"value": "C:\Program Files\Java\jdk1.8.0_152",
|
||||
}],
|
||||
"scriptChain": [{
|
||||
"childScript": 3,
|
||||
"exitStatus": 0
|
||||
}],
|
||||
"scriptEmails": [{
|
||||
"emailName": "Script Status",
|
||||
"recipients": [{
|
||||
"email": "portalAdmin@ngc.com",
|
||||
}]
|
||||
}],
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,39 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"name": "scp script",
|
||||
"baseDirectory": "/opt/tomcat",
|
||||
"outputDirectory": "",
|
||||
"scriptType": "SCP",
|
||||
"scp": {
|
||||
"fromHost": "patchrepo.viprcenter.com",
|
||||
"fromPort": 22,
|
||||
"fromCredentials": {
|
||||
"uid": ...",
|
||||
},
|
||||
"toHost": "LOCAL",
|
||||
"toPort": 0,
|
||||
"toCredentials": {
|
||||
"uid": "...",
|
||||
},
|
||||
"dataRegex": "tomcat_[0-9][0-9]_status.txt"
|
||||
},
|
||||
"schedule": [{
|
||||
"startDatetime": 1524229200673,
|
||||
"endDatetime": 1524834000000,
|
||||
"frequency": "HOURLY",
|
||||
"maxExecutions": null,
|
||||
}],
|
||||
"scriptChain": [{
|
||||
"childScript": 3,
|
||||
"exitStatus": 0
|
||||
}],
|
||||
"scriptEmails": [{
|
||||
"emailName": "Script Status",
|
||||
"recipients": [{
|
||||
"email": "portalAdmin@ngc.com",
|
||||
}]
|
||||
}],
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,13 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"password": "bar",
|
||||
"lastName": "foo",
|
||||
"firstName": "bar",
|
||||
"email": "bar@ngc.com",
|
||||
"role": "USER",
|
||||
"expirationDate": "2028-03-31T19:54:40.550Z",
|
||||
"effectiveDate": "2018-04-03T19:54:39.929Z",
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"uid": "161415ae-07fd-427e-9bf8-3d08a2af7722",
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 4
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,12 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 6,
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 6
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 5
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"name": "TEST"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 4,
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"jobId": "a3bf7cac-bba5-4cd4-bdfa-9fdbcbf08e25",
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"email": "bar@ngc.com",
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,6 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\footnotetext{Send the key name to the server}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
userExpirationDays
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,6 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\footnotetext{Send the job id to the server}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
459db38f-317f-40ad-bcf1-692c0404e7ac
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,8 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"username":"foo",
|
||||
"password":"bar"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,8 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"purgeStartDate": "2018-02-07T05:00:00.000Z",
|
||||
"purgeEndDate": "2018-03-26T04:00:00.000Z"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 4,
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,18 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"name": "test",
|
||||
"enabled": true,
|
||||
"permissions": [
|
||||
{
|
||||
"permissionId": 1,
|
||||
"allowed": true
|
||||
},
|
||||
{
|
||||
"permissionId": 2,
|
||||
"allowed": false
|
||||
}
|
||||
]
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,6 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\footnotetext{Send the seed text to the server}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
This is a seed text
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,14 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 6,
|
||||
"uid": "e6e99ca6-afee-4de6-ad30-9a8f12429160",
|
||||
"name": "Isaac's Creds",
|
||||
"key": null,
|
||||
"passphrase": null,
|
||||
"username": "iparenteau",
|
||||
"credentialType": "SSH"
|
||||
}
|
||||
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,12 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 5,
|
||||
"uid": "252be4f2-d88f-4819-9ddb-e2176364804a",
|
||||
"name": "FooBar",
|
||||
"username": "Foo",
|
||||
"password": null,
|
||||
"credentialType": "PASSWD"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,12 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 4,
|
||||
"emailName": "Script Status 2",
|
||||
"emailSubject": "Script Status",
|
||||
"emailMessage": "<p>Script ${script_name} finished with an exit code of ${exit_status}</p>",
|
||||
"createdBy": 1,
|
||||
"dateCreated": 1524165482009
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,24 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 6,
|
||||
"name": "JAVA_HOME",
|
||||
"value": "C:\Program Files\Java\jdk1.8.0_152",
|
||||
"createdBy": 1,
|
||||
"lastUpdated": 1524158738000,
|
||||
"dateCreated": 1524158738000,
|
||||
"isNew": false
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "MAVEN_HOME",
|
||||
"value": "C:\tools\apache-maven-3.5.2",
|
||||
"createdBy": 1,
|
||||
"lastUpdated": 1524158738000,
|
||||
"dateCreated": 1524158738000,
|
||||
"isNew": false
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,21 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Stig Apply",
|
||||
"scm": "https://J65594@bigmac.northgrum.com/bitbucket/scm/saipt/stig-apply.git",
|
||||
"branch": "develop",
|
||||
"directory": "C:\\stigapply",
|
||||
"credentials": {
|
||||
"id": 3,
|
||||
"uid": "a7d6b897-8ec6-483c-9e68-c5a2676dcbf1",
|
||||
"name": "Bit Bucket",
|
||||
"username": "J65594",
|
||||
"credentialType": "PASSWD"
|
||||
},
|
||||
"lastUpdated": 1523988019143,
|
||||
"createDate": 1523988019143,
|
||||
"createdBy": "Portal Admin"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,30 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 3,
|
||||
"name": "TEST",
|
||||
"displayName": "Test",
|
||||
"enabled": true,
|
||||
"permissions": [
|
||||
{
|
||||
"id": 245,
|
||||
"name": "VIEW_SCRIPTS_TAB",
|
||||
"displayName": "View Repository Bank Tab",
|
||||
"permissionCategory": "TABS",
|
||||
"permissionId": 1,
|
||||
"permissionGroupId": 3,
|
||||
"allowed": true
|
||||
},
|
||||
{
|
||||
"id": 246,
|
||||
"name": "VIEW_USER_TAB",
|
||||
"displayName": "View User Tab",
|
||||
"permissionCategory": "TABS",
|
||||
"permissionId": 2,
|
||||
"permissionGroupId": 3,
|
||||
"allowed": false
|
||||
}
|
||||
]
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,71 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 4,
|
||||
"name": "tomcat running",
|
||||
"command": "netstat",
|
||||
"scriptType": "LOCAL",
|
||||
"baseDirectory": "C:\stigapply",
|
||||
"outputDirectory": "",
|
||||
"parameters": [{
|
||||
"id": 1,
|
||||
"parameter": "-ano",
|
||||
"script": 4
|
||||
},{
|
||||
"id": 2,
|
||||
"parameter": "|grep",
|
||||
"script": 4
|
||||
},{
|
||||
"id": 3,
|
||||
"parameter": "8080",
|
||||
"script": 4
|
||||
}],
|
||||
"schedule": [{
|
||||
"id": 5,
|
||||
"jobId": "...",
|
||||
"startDatetime": 1524229201000,
|
||||
"endDatetime": 1524834000000,
|
||||
"frequency": "HOURLY",
|
||||
"maxExecutions": null,
|
||||
"currentExecutionCount": null,
|
||||
"executionStatus": null,
|
||||
"lastRun": 0,
|
||||
"script": 4
|
||||
}],
|
||||
"scriptVariables": [{
|
||||
"id": 1,
|
||||
"name": "JAVA_HOME",
|
||||
"value": "C:\Program Files\Java\jdk1.8.0_152",
|
||||
"createdBy": 1,
|
||||
"lastUpdated": 1524226391000,
|
||||
"dateCreated": 1524226391000,
|
||||
"isNew": null,
|
||||
"script": 4
|
||||
}],
|
||||
"scriptChain": [{
|
||||
"id": 1,
|
||||
"parentScript": 4,
|
||||
"childScript": 3,
|
||||
"executeAfterMin": null,
|
||||
"exitStatus": 0
|
||||
}],
|
||||
"scriptEmails": [{
|
||||
"id": 1,
|
||||
"emailName": "Script Status",
|
||||
"emailSubject": "Script Status",
|
||||
"emailMessage": "...",
|
||||
"scriptId": 4,
|
||||
"recipients": [{
|
||||
"id": 1,
|
||||
"firstName": "Portal",
|
||||
"lastName": "Admin",
|
||||
"role": "ADMIN",
|
||||
"email": "portalAdmin@ngc.com",
|
||||
"expirationDate": 2.534022324e+14,
|
||||
"effectiveDate": 1519275600000,
|
||||
"enabled": true
|
||||
}]
|
||||
}],
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,74 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 4,
|
||||
"name": "tomcat running",
|
||||
"command": "REMOTE",
|
||||
"scriptType": "REMOTE",
|
||||
"baseDirectory": "",
|
||||
"outputDirectory": "",
|
||||
"parameters": [{
|
||||
"id": 4,
|
||||
"parameter": "netstat -ano",
|
||||
"script": 6
|
||||
},{
|
||||
"id": 5,
|
||||
"parameter": "|grep 8080",
|
||||
"script": 6
|
||||
}],"schedule": [{
|
||||
"id": 5,
|
||||
"jobId": "...",
|
||||
"startDatetime": 1524229201000,
|
||||
"endDatetime": 1524834000000,
|
||||
"frequency": "HOURLY",
|
||||
"maxExecutions": null,
|
||||
"currentExecutionCount": null,
|
||||
"executionStatus": null,
|
||||
"lastRun": 0,
|
||||
"script": 4
|
||||
}],"scriptVariables": [{
|
||||
"id": 1,
|
||||
"name": "JAVA_HOME",
|
||||
"value": "C:\Program Files\Java\jdk1.8.0_152",
|
||||
"createdBy": 1,
|
||||
"lastUpdated": 1524226391000,
|
||||
"dateCreated": 1524226391000,
|
||||
"isNew": null,
|
||||
"script": 4
|
||||
}],"scriptChain": [{
|
||||
"id": 1,
|
||||
"parentScript": 4,
|
||||
"childScript": 3,
|
||||
"executeAfterMin": null,
|
||||
"exitStatus": 0
|
||||
}],"scriptEmails": [{
|
||||
"id": 1,
|
||||
"emailName": "Script Status",
|
||||
"emailSubject": "Script Status",
|
||||
"emailMessage": "...",
|
||||
"scriptId": 4,
|
||||
"recipients": [{
|
||||
"id": 1,
|
||||
"firstName": "Portal",
|
||||
"lastName": "Admin",
|
||||
"role": "ADMIN",
|
||||
"email": "portalAdmin@ngc.com",
|
||||
"expirationDate": 2.534022324e+14,
|
||||
"effectiveDate": 1519275600000,
|
||||
"enabled": true
|
||||
}]
|
||||
}],"remote": {
|
||||
"scriptId": 6,
|
||||
"scriptCredentials": {
|
||||
"id": 6,
|
||||
"uid": "e6e99ca6-afee-4de6-ad30-9a8f12429160",
|
||||
"name": "Isaac's Creds",
|
||||
"username": "iparenteau",
|
||||
"credentialType": "SSH"
|
||||
},
|
||||
"url": "patchrepo.viprcenter.com",
|
||||
"port": 22
|
||||
},
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,51 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 7,
|
||||
"name": "scp script",
|
||||
"command": "SCP",
|
||||
"scriptType": "SCP",
|
||||
"baseDirectory": "/opt/tomcat",
|
||||
"outputDirectory": "",
|
||||
"scp": {
|
||||
"id": 1,
|
||||
"scriptId": 7,
|
||||
"fromHost": "patchrepo.viprcenter.com",
|
||||
"fromPort": 22,
|
||||
"fromCredentials": {
|
||||
"id": 3,
|
||||
"uid": "a7d6b897-8ec6-483c-9e68-c5a2676dcbf1",
|
||||
"name": "Bit Bucket",
|
||||
"username": "J65594",
|
||||
"credentialType": "PASSWD"
|
||||
},
|
||||
"toHost": "LOCAL",
|
||||
"toPort": 0,
|
||||
"toCredentials": {
|
||||
"id": 3,
|
||||
"uid": "a7d6b897-8ec6-483c-9e68-c5a2676dcbf1",
|
||||
"name": "Bit Bucket",
|
||||
"username": "J65594",
|
||||
"credentialType": "PASSWD"
|
||||
},
|
||||
"dataRegex": "tomcat_[0-9][0-9]_status.txt"
|
||||
},
|
||||
"schedule": [{
|
||||
"startDatetime": 1524229200673,
|
||||
"endDatetime": 1524834000000,
|
||||
"frequency": "HOURLY",
|
||||
"maxExecutions": null,
|
||||
}],
|
||||
"scriptChain": [{
|
||||
"childScript": 3,
|
||||
"exitStatus": 0
|
||||
}],
|
||||
"scriptEmails": [{
|
||||
"emailName": "Script Status",
|
||||
"recipients": [{
|
||||
"email": "portalAdmin@ngc.com",
|
||||
}]
|
||||
}],
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,17 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 3,
|
||||
"auId": 3,
|
||||
"firstName": "bar",
|
||||
"lastName": "foo",
|
||||
"role": "USER",
|
||||
"username": "bar@ngc.com",
|
||||
"password": null,
|
||||
"email": "bar@ngc.com",
|
||||
"expirationDate": 1838145280550,
|
||||
"effectiveDate": 1522785279929,
|
||||
"enabled": true
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,11 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 8,
|
||||
"uid": "161415ae-07fd-427e-9bf8-3d08a2af7722",
|
||||
"name": "FooBar",
|
||||
"username": "foo",
|
||||
"credentialType": "PASSWD"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,24 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 6,
|
||||
"name": "JAVA_HOME",
|
||||
"value": "C:\Program Files\Java\jdk1.8.0_152",
|
||||
"createdBy": 1,
|
||||
"lastUpdated": 1524158738000,
|
||||
"dateCreated": 1524158738000,
|
||||
"isNew": false
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "MAVEN_HOME",
|
||||
"value": "C:\tools\apache-maven-3.5.2",
|
||||
"createdBy": 1,
|
||||
"lastUpdated": 1524158738000,
|
||||
"dateCreated": 1524158738000,
|
||||
"isNew": false
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,30 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 3,
|
||||
"name": "TEST",
|
||||
"displayName": "Test",
|
||||
"enabled": false,
|
||||
"permissions": [
|
||||
{
|
||||
"id": 245,
|
||||
"name": "VIEW_SCRIPTS_TAB",
|
||||
"displayName": "View Repository Bank Tab",
|
||||
"permissionCategory": "TABS",
|
||||
"permissionId": 1,
|
||||
"permissionGroupId": 3,
|
||||
"allowed": true
|
||||
},
|
||||
{
|
||||
"id": 246,
|
||||
"name": "VIEW_USER_TAB",
|
||||
"displayName": "View User Tab",
|
||||
"permissionCategory": "TABS",
|
||||
"permissionId": 2,
|
||||
"permissionGroupId": 3,
|
||||
"allowed": false
|
||||
}
|
||||
]
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,16 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 6,
|
||||
"jobId": "a3bf7cac-bba5-4cd4-bdfa-9fdbcbf08e25",
|
||||
"startDatetime": 1524229332000,
|
||||
"endDatetime": null,
|
||||
"frequency": "NOW",
|
||||
"maxExecutions": 1,
|
||||
"currentExecutionCount": 1,
|
||||
"executionStatus": 1,
|
||||
"lastRun": 1524229357000,
|
||||
"script": 4
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,20 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 3,
|
||||
"uid": "a7d6b897-8ec6-483c-9e68-c5a2676dcbf1",
|
||||
"name": "Bit Bucket",
|
||||
"username": "J65594",
|
||||
"credentialType": "PASSWD"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"uid": "e6e99ca6-afee-4de6-ad30-9a8f12429160",
|
||||
"name": "Isaac's Creds",
|
||||
"username": "iparenteau",
|
||||
"credentialType": "SSH"
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,33 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 45,
|
||||
"loggedBy": "Repo Admin",
|
||||
"eventName": "USER DELETED",
|
||||
"event": "Deleted bar foo",
|
||||
"severity": "INFO",
|
||||
"ipAddress": "127.0.0.1",
|
||||
"timestamp": 1522787487000
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"loggedBy": "Repo Admin",
|
||||
"eventName": "LOGIN",
|
||||
"event": "Logged in",
|
||||
"severity": "INFO",
|
||||
"ipAddress": "127.0.0.1",
|
||||
"timestamp": 1522787466000
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"loggedBy": "Repo Admin",
|
||||
"eventName": "EXCEPTION",
|
||||
"event": "Something went wrong. Please see logs for details",
|
||||
"severity": "ERROR",
|
||||
"ipAddress": "127.0.0.1",
|
||||
"timestamp": 1522787194000
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,20 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "ADMIN",
|
||||
"displayName": "Administrator",
|
||||
"enabled": true,
|
||||
"permissions": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "USER",
|
||||
"displayName": "User",
|
||||
"enabled": true,
|
||||
"permissions": []
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,23 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Stig Apply",
|
||||
"scm": "https://J65594@bigmac.northgrum.com/bitbucket/scm/saipt/stig-apply.git",
|
||||
"branch": "develop",
|
||||
"directory": "C:\\stigapply",
|
||||
"credentials": {
|
||||
"id": 3,
|
||||
"uid": "a7d6b897-8ec6-483c-9e68-c5a2676dcbf1",
|
||||
"name": "Bit Bucket",
|
||||
"username": "J65594",
|
||||
"credentialType": "PASSWD"
|
||||
},
|
||||
"lastUpdated": 1523988019143,
|
||||
"createDate": 1523988019143,
|
||||
"createdBy": "Portal Admin"
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,71 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[{
|
||||
"id": 4,
|
||||
"name": "tomcat running",
|
||||
"command": "netstat",
|
||||
"scriptType": "LOCAL",
|
||||
"baseDirectory": "C:\stigapply",
|
||||
"outputDirectory": "",
|
||||
"parameters": [{
|
||||
"id": 1,
|
||||
"parameter": "-ano",
|
||||
"script": 4
|
||||
},{
|
||||
"id": 2,
|
||||
"parameter": "|grep",
|
||||
"script": 4
|
||||
},{
|
||||
"id": 3,
|
||||
"parameter": "8080",
|
||||
"script": 4
|
||||
}],
|
||||
"schedule": [{
|
||||
"id": 5,
|
||||
"jobId": "...",
|
||||
"startDatetime": 1524229201000,
|
||||
"endDatetime": 1524834000000,
|
||||
"frequency": "HOURLY",
|
||||
"maxExecutions": null,
|
||||
"currentExecutionCount": null,
|
||||
"executionStatus": null,
|
||||
"lastRun": 0,
|
||||
"script": 4
|
||||
}],
|
||||
"scriptVariables": [{
|
||||
"id": 1,
|
||||
"name": "JAVA_HOME",
|
||||
"value": "C:\Program Files\Java\jdk1.8.0_152",
|
||||
"createdBy": 1,
|
||||
"lastUpdated": 1524226391000,
|
||||
"dateCreated": 1524226391000,
|
||||
"isNew": null,
|
||||
"script": 4
|
||||
}],
|
||||
"scriptChain": [{
|
||||
"id": 1,
|
||||
"parentScript": 4,
|
||||
"childScript": 3,
|
||||
"executeAfterMin": null,
|
||||
"exitStatus": 0
|
||||
}],
|
||||
"scriptEmails": [{
|
||||
"id": 1,
|
||||
"emailName": "Script Status",
|
||||
"emailSubject": "Script Status",
|
||||
"emailMessage": "...",
|
||||
"scriptId": 4,
|
||||
"recipients": [{
|
||||
"id": 1,
|
||||
"firstName": "Portal",
|
||||
"lastName": "Admin",
|
||||
"role": "ADMIN",
|
||||
"email": "portalAdmin@ngc.com",
|
||||
"expirationDate": 2.534022324e+14,
|
||||
"effectiveDate": 1519275600000,
|
||||
"enabled": true
|
||||
}]
|
||||
}],
|
||||
}]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,32 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"auId": 1,
|
||||
"firstName": "Repo",
|
||||
"lastName": "Admin",
|
||||
"role": "ADMIN",
|
||||
"username": "portalAdmin@ngc.com",
|
||||
"password": null,
|
||||
"email": "portalAdmin@ngc.com",
|
||||
"expirationDate": 2.534022324e+14,
|
||||
"effectiveDate": 1517979600000,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"auId": 2,
|
||||
"firstName": "foo",
|
||||
"lastName": "bar",
|
||||
"role": "USER",
|
||||
"username": "foo@ngc.com",
|
||||
"password": null,
|
||||
"email": "foo@ngc.com",
|
||||
"expirationDate": 1838088000000,
|
||||
"effectiveDate": 1522728000000,
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,16 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"logLevel": "INFO",
|
||||
"userExpirationDays": "3650",
|
||||
"dbRootPassword": "Em46JDIzVOWBgGFqxDrqnw==",
|
||||
"dbHost": "localhost",
|
||||
"dbPort": "3306",
|
||||
"dbRootUser": "root",
|
||||
"dbUsername": "portalAdmin",
|
||||
"filepath": "C:\\tempStorage",
|
||||
"dbPassword": "CWg48+h4q7iK4ICGaDhRd10EMQfFgthm3FjhkLd6gis="
|
||||
"aesSeedFile": "C:/development/apache-tomcat-8.5.24/conf/portal.tomcat"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,7 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"userExpirationDays": 3650
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,16 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "SSH",
|
||||
"value": "SSH Key"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "PASSWD",
|
||||
"value": "Username/Password"
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,16 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"emailName": "Script Status",
|
||||
"emailSubject": "Script Status",
|
||||
"emailMessage": "<p>Script ${script_name} finished with exit code of ${exit_status}</p>\n
|
||||
<p><strong>Results:</strong></p>\n<p>${script_results}</p>\n<p>Thank you,</p>\n
|
||||
<p>postmaster@viprcenter.com</p>",
|
||||
"createdBy": null,
|
||||
"dateCreated": null
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,22 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"logger": "AbstractObjectMessageHandler",
|
||||
"level": "INFO"
|
||||
},
|
||||
{
|
||||
"logger": "AccountController",
|
||||
"level": "ERROR"
|
||||
},
|
||||
{
|
||||
"logger": "ApplicationLogController",
|
||||
"level": "INFO"
|
||||
},
|
||||
{
|
||||
"logger": "ApplicationLogService",
|
||||
"level": "INFO"
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,56 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "TABS",
|
||||
"displayName": "Tabs",
|
||||
"permissions": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "VIEW_SCRIPTS_TAB",
|
||||
"displayName": "View Repository Bank Tab",
|
||||
"permissionCategory": "TABS"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "VIEW_USER_TAB",
|
||||
"displayName": "View User Tab",
|
||||
"permissionCategory": "TABS"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "VIEW_LOG_TAB",
|
||||
"displayName": "View System Log Tab",
|
||||
"permissionCategory": "TABS"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "VIEW_PERMISSION_TAB",
|
||||
"displayName": "View Permission Tab",
|
||||
"permissionCategory": "TABS"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "PERMISSION_TAB",
|
||||
"displayName": "Permissions Tab",
|
||||
"permissions": [
|
||||
{
|
||||
"id": 22,
|
||||
"name": "ADD_PERMS",
|
||||
"displayName": "Add/Edit Permissions",
|
||||
"permissionCategory": "PERMISSION_TAB"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"name": "DELETE_PERMS",
|
||||
"displayName": "Delete Permissions",
|
||||
"permissionCategory": "PERMISSION_TAB"
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,60 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "ADMIN",
|
||||
"displayName": "Administrator",
|
||||
"enabled": true,
|
||||
"permissions": [
|
||||
{
|
||||
"type": null,
|
||||
"id": 181,
|
||||
"name": "VIEW_SCRIPTS_TAB",
|
||||
"displayName": "View Scripts Tab",
|
||||
"permissionCategory": "TABS",
|
||||
"permissionId": 1,
|
||||
"permissionGroupId": 1,
|
||||
"allowed": true
|
||||
},
|
||||
{
|
||||
"type": null,
|
||||
"id": 182,
|
||||
"name": "VIEW_USER_TAB",
|
||||
"displayName": "View User Tab",
|
||||
"permissionCategory": "TABS",
|
||||
"permissionId": 2,
|
||||
"permissionGroupId": 1,
|
||||
"allowed": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "USER",
|
||||
"displayName": "User",
|
||||
"enabled": true,
|
||||
"permissions": [
|
||||
{
|
||||
"id": 233,
|
||||
"name": "VIEW_SCRIPTS_TAB",
|
||||
"displayName": "View Repository Bank Tab",
|
||||
"permissionCategory": "TABS",
|
||||
"permissionId": 1,
|
||||
"permissionGroupId": 2,
|
||||
"allowed": true
|
||||
},
|
||||
{
|
||||
"id": 234,
|
||||
"name": "VIEW_USER_TAB",
|
||||
"displayName": "View User Tab",
|
||||
"permissionCategory": "TABS",
|
||||
"permissionId": 2,
|
||||
"permissionGroupId": 2,
|
||||
"allowed": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,46 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "HOURLY",
|
||||
"value": "Hourly"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "DAILY",
|
||||
"value": "Daily"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "WEEKLY",
|
||||
"value": "Weekly"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "MONTHLY",
|
||||
"value": "Monthly"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "YEARLY",
|
||||
"value": "Yearly"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "NOW",
|
||||
"value": "Now"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "SPECIFIC",
|
||||
"value": "Specific"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "TRIGGERED",
|
||||
"value": "Triggered"
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,26 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 31,
|
||||
"exitStatus": 0,
|
||||
"results": "...",
|
||||
"startTime": 1524243606000,
|
||||
"endTime": 1524243606000,
|
||||
"resourceFiles": [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"exitStatus": 0,
|
||||
"results": "..",
|
||||
"startTime": 1524240727000,
|
||||
"endTime": 1524240727000,
|
||||
"resourceFiles": [
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,21 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "LOCAL",
|
||||
"value": "Local Execution"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "REMOTE",
|
||||
"value": "Remote Execution"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "SCP",
|
||||
"value": "Secure Copy"
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,31 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "smtp.enabled",
|
||||
"value": "false"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "mail.transport.protocol",
|
||||
"value": "smtp"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "mail.smtp.host",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "mail.smtp.port",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "mail.debug",
|
||||
"value": "false"
|
||||
}
|
||||
]
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,8 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"success":false,
|
||||
"body":null
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,32 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"id": 1,
|
||||
"auId": 1,
|
||||
"firstName": "foo",
|
||||
"lastName": "bar",
|
||||
"role": "USER",
|
||||
"username": "foo@ngc.com",
|
||||
"email": "foo@ngc.com",
|
||||
"expirationDate": 2.534022324e+14,
|
||||
"effectiveDate": 1517979600000,
|
||||
"enabled": true,
|
||||
"isNew": false,
|
||||
"authorities": [
|
||||
"VIEW_REPO_TAB",
|
||||
"VIEW_USER_TAB",
|
||||
"VIEW_LOG_TAB",
|
||||
"VIEW_PERMISSION_TAB",
|
||||
"VIEW_CONFIG",
|
||||
"VIEW_HASH_TYPES",
|
||||
"VIEW_FILE_INFO",
|
||||
"VIEW_LOG_LEVELS",
|
||||
],
|
||||
"stompTopics": [
|
||||
"/topic/account|system",
|
||||
"/topic/account|1"
|
||||
],
|
||||
"page": "dashboard"
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,9 @@
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\footnotetext{The return value in body is the number of logs that were purged}
|
||||
\begin{lstlisting}[language=JSON]
|
||||
{
|
||||
"success":true,
|
||||
"body":13
|
||||
}
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
@@ -0,0 +1,10 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : ApacheAppendix.tex
|
||||
% SUBJECT : ApacheApendex.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Apache Configuration}
|
||||
\label{sample-httpd.conf}
|
||||
\lstinputlisting[caption=httpd.conf]{figures/httpd.conf}
|
||||
@@ -0,0 +1,10 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Architecture.tex
|
||||
% SUBJECT : Document describing architecture issues in the entire Patch Repository system.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{NGINX Configuration}
|
||||
\label{sample-nginx.conf}
|
||||
\lstinputlisting[caption=portal.conf]{figures/portal.conf}
|
||||
@@ -0,0 +1,10 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Architecture.tex
|
||||
% SUBJECT : Document describing architecture issues in the entire Patch Repository system.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Portal Properties File}
|
||||
\label{sample-portal.properties}
|
||||
\lstinputlisting[caption=portal.properties]{figures/portal.properties}
|
||||
@@ -0,0 +1,16 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Revision.tex
|
||||
% SUBJECT : Revision history.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Revision History}
|
||||
\label{revisions}
|
||||
\begin{center}
|
||||
\begin{tabular}{|C{0.1\textwidth}|C{0.5\textwidth}|C{0.15\textwidth}|C{0.15\textwidth}|}
|
||||
\hline
|
||||
\bold{Revision Number} & \bold{Comment} & \bold{Date} & \bold{Name} \\ \hline
|
||||
1.0 & Initial documentation draft & 10 April, 2018 & Isaac Parenteau \\ \hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
@@ -0,0 +1,23 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : ApacheAppendix.tex
|
||||
% SUBJECT : ApacheApendex.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Seed File Configuration}
|
||||
\label{sample-seed-file}
|
||||
|
||||
The seed file is a phrase or random letters using the \filename{UTF-8} character set. This file is read into the encryption service, converted to binary and passed to the AES encryption
|
||||
program as the seed for java's \filename{SecureRandom} class. Since the same seed is used every time, the generated AES key is the same and all values afterwards. Any changes to this seed
|
||||
file will invalidate any data encrypted. There is a mechanism in place in the application to change the seed file value and all subsequent data provided the user has the proper permissions.
|
||||
|
||||
Sample seed value:
|
||||
|
||||
\begin{minipage}[t]{0.45\textwidth}
|
||||
\begin{verbatim}
|
||||
thisIsASecretKey
|
||||
\end{verbatim}
|
||||
\end{minipage}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% FILE : Architecture.tex
|
||||
% SUBJECT : Document describing architecture issues in the entire Patch Repository system.
|
||||
% AUTHOR : (C) Copyright 2018 by Northrop Grumman
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\chapter{Sample Settings.xml}
|
||||
\label{sample-settings.xml}
|
||||
\lstinputlisting[language=XML, caption=settings.xml]{figures/settings.xml}
|
||||
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 34 KiB |