Skip to content

Commit

Permalink
Merge pull request #477 from IntersectMBO/feat/457-enable-skip-basic-…
Browse files Browse the repository at this point in the history
…auth-if-connecting-from-ba-vpn

[#457] Enable skip Basic Auth if connecting from BA VPN
  • Loading branch information
placek authored Mar 19, 2024
2 parents 8a98945 + dc2df5f commit 6eb66d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/resync-cardano-node-and-db-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
GTM_ID: ${{ secrets.GTM_ID }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
7 changes: 6 additions & 1 deletion scripts/govtool/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ $(target_config_dir)/grafana-provisioning/alerting/alerting.yml: $(template_conf
$(target_config_dir)/nginx/auth.conf: $(target_config_dir)/nginx/
@:$(call check_defined, domain)
if [[ "$(domain)" == *"sanchonet.govtool.byron.network"* ]]; then \
echo "auth_basic \"Restricted\";" > $@; \
echo 'map $$http_x_forwarded_for $$auth {' > $@; \
echo " default \"Restricted\";" >> $@; \
echo " $${IP_ADDRESS_BYPASSING_BASIC_AUTH1} \"off\";" >> $@; \
echo " $${IP_ADDRESS_BYPASSING_BASIC_AUTH2} \"off\";" >> $@; \
echo "}" >> $@; \
echo 'auth_basic $$auth;' >> $@; \
echo "auth_basic_user_file /etc/nginx/conf.d/govtool.htpasswd;" >> $@; \
else \
echo > $@; \
Expand Down

0 comments on commit 6eb66d1

Please sign in to comment.