Skip to content

Commit

Permalink
feat(base): add Configuration and Logger services
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Pereira committed Jan 26, 2020
1 parent 5fe2d1a commit 257c93a
Show file tree
Hide file tree
Showing 23 changed files with 1,276 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## untracked folders
build
config
dist
node_modules

Expand Down
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.0-development
File renamed without changes.
51 changes: 51 additions & 0 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Configuration

The `cxsast_custom_reporting` application relies on two types of configurations: `global configuration` and `run-time configuration`.

While `global configuration` defines how appllication will communicate with other software (e.g CxSAST, SMTP, etc.) `run-time configuration` defines the behavior and actions that will be executed.

This document describes in details both configurations over the next topics.

## Global configuration

Global configuration is defined on the `<APP-ROOT>\config\config.ini`.
The file is divided in sections where each section is have definitions of key-value pairs as the example bellow:

```ini
[sast]
url=http://localenv.net
username=cxsastuser@enterprise.net
password=cxsastuser_password

[smtp]
host=smtp.enterprise.net
port=465
username=smtpuser@enterprise.net
password=smtpuser_password
```

Currently global configuration file supports the following information:

| Key | type | M/O | Description |
| ---------- | ---------- | --- | ---------------------------------------------------------------------- |
| `[sast]` | | _M_ | defines the section relatd with CxSAST configuration |
| `url` | _`string`_ | _M_ | the url that application will use to communicate with CxSAST Manager |
| `username` | _`string`_ | _M_ | the user that will be used to communicate with CxSAST Manager |
| `password` | _`string`_ | _M_ | the user password that will be used to communicate with CxSAST Manager |
| `[smtp]` | | _M_ | defines the section related with SMTP configuration |
| `host` | _`string`_ | _M_ | the smtp host that will be used by application |
| `port` | _`number`_ | _M_ | the smtp port that will be used by application |
| `username` | _`string`_ | _M_ | the smtp user that will be used by application |
| `password` | _`string`_ | _M_ | the smtp user password that will be used by application |

## Run-Time configuration

Run-time configuration items are defined as parametes during execution and allows end users the required flexibility to execute the application in different scnearios.

Currently run-time configuration support the following parameters:

| Key | type | M/O | Description |
| ---------------- | ---------- | --- | ------------------------------------------- |
| `reportType` | _`string`_ | _M_ | The type of report that should be generated |
| `reportTemplate` | _`string`_ | _M_ | The HTML template that should be generated |
| `reportAudience` | _`string`_ | _M_ | a comma separated list of email receivers |
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-minimal
5 changes: 5 additions & 0 deletions docs/_home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CxSAST Custom Reporting

```
Add initial page content
```
2 changes: 2 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Home](/)
- [Configuration](CONFIGURATION.md)
25 changes: 25 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>CxSAST Custom Reporting</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" />
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
homepage: '_home.md',
themeColor: '#3F51B5',
name: 'CxSAST Custom Reporting',
repo: 'https://github.com/cxpsemea/cxsast_custom_reporting',
loadSidebar: true,
subMaxLevel: 2,
};
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</body>
</html>
Loading

0 comments on commit 257c93a

Please sign in to comment.