elchicodepython / elchicodepython/SARF

Improve SARF configuration using Yaml variables

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

SARF configuration could be simplified using variables.

Example:

```yaml
defaults:
rabbitmq_queue_conf: &default_rabbitmq_conf
type: "rabbit"
connection_string: "tcp://"

ftp_base_storage_backend: &ftp_storage_options
type: ftp
conf: &ftp_storage_conf
user: "sarf"
password: "sarf"
host: "127.0.0.1"

ftp_full_storage_backend: &ftp_full_storage_backend
upload: *ftp_storage_options
download: *ftp_storage_options

crud:
psql_connection: &psql_connection
host: "127.0.0.1"
port: 5432
user: "sarf"
password: "changeme"
database: "sarf"

messages:
tools:
<<: *default_rabbitmq_conf
queue: tools

reports:
<<: *default_rabbitmq_conf
queue: reports

notifications:
<<: *default_rabbitmq_conf
queue: notifications

storage_backend:
tools:
__baseconf: &__base_tools_storage_backend
<<: *ftp_storage_conf
basedir: /ftp/sarf/tools
upload: *__base_tools_storage_backend
download: *__base_tools_storage_backend

reports:
__baseconf: &__base_tools_storage_backend
<<: *ftp_storage_conf
basedir: /ftp/sarf/reports
upload: *__base_tools_storage_backend
download: *__base_tools_storage_backend

crud:
companies:
type: psql
conf:
<<: *psql_connection
table: companies

projects:
type: psql
conf:
<<: *psql_connection
table: companies

reports:
type: psql
conf:
<<: *psql_connection
table: companies

vulnerabilities:
type: psql
conf:
<<: *psql_connection
table: companies

vuln_templates:
type: psql
conf:
<<: *psql_connection
table: companies
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.