Skip to content

Commit

Permalink
added needed space into logic (#2765)
Browse files Browse the repository at this point in the history
* added needed space into logic

* updated security controls documentation to mention how NGINX is used by lower envs to connect to prod clamav server

---------

Co-authored-by: George Hudson <ghudson@teamraft.com>
Co-authored-by: Andrew <84722778+andrew-jameson@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 6, 2023
1 parent 11aef55 commit 2537687
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion docs/Security-Compliance/boundary-diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

### Data flow

Users with `OFA Admin` and (STT) `Data Analyst` roles can upload data on upload data files locally into the web application which will store the files in cloud.gov AWS S3 buckets only after the files are successfully scanned for viruses via [ClamAV](../Technical-Documentation/Architecture-Decision-Record/012-antivirus-strategy.md). Developers will deploy new code through GitHub, initiating the continuous integration process through Circle CI.
Users with `OFA Admin` and (STT) `Data Analyst` roles can upload data on upload data files locally into the web application which will store the files in cloud.gov AWS S3 buckets only after the files are successfully scanned for viruses via [ClamAV](../Technical-Documentation/Architecture-Decision-Record/012-antivirus-strategy.md). For lower environments, we use an NGINX server to function as a proxy, routing to the ClamAV-rest server in the production space. The NGINX server also functions as a gatekeeper, allowing documents for scanning to only come from backend servers, and only able to route them directly to the ClamAV-rest server.

### Code Repository and CI Pipeline

Developers will deploy new code through GitHub, initiating the continuous integration process through Circle CI.

### Environments/Spaces

Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ update_backend()
cd tdrs-backend || exit
cf unset-env "$CGAPPNAME_BACKEND" "AV_SCAN_URL"

if ["$CF_SPACE" = "tanf-prod" ]; then
if [ "$CF_SPACE" = "tanf-prod" ]; then
cf set-env "$CGAPPNAME_BACKEND" AV_SCAN_URL "http://tanf-prod-clamav-rest.apps.internal:9000/scan"
else
# Add environment varilables for clamav
Expand Down Expand Up @@ -120,7 +120,7 @@ update_backend()
# Add network policy to allow frontend to access backend
cf add-network-policy "$CGAPPNAME_FRONTEND" "$CGAPPNAME_BACKEND" --protocol tcp --port 8080

if ["$CF_SPACE" = "tanf-prod" ]; then
if [ "$CF_SPACE" = "tanf-prod" ]; then
# Add network policy to allow backend to access tanf-prod services
cf add-network-policy "$CGAPPNAME_BACKEND" clamav-rest --protocol tcp --port 9000
else
Expand Down

0 comments on commit 2537687

Please sign in to comment.