* Use Nginx + Basic Auth to secure OSS Airbyte * use local passwords * Use gradle builds * K8s setup and source values from ENV * note about disabling * add back defaults * custom 401 page * update http message * update docs * remove kube files * additional doc updates * Add a test suite * fix failure exit codes * doc updates * Add docs * bump to re-test * add more sleep in tests for CI * better sleep in test * Update docs/operator-guides/security.md Co-authored-by: Davin Chia <davinchia@gmail.com> * PR updates * test comment * change test host on CI * update tests and nginx to boot without backend * proxy updates for docker DNS * simpler test for uptime * acceptance test skips PWs * remove resolver madness * fixup tests * more proxy_pass revert * update acceptance test exit codes * relax test expectations * add temporal mount back for testing * Update docs/operator-guides/security.md Co-authored-by: swyx <shawnthe1@gmail.com> * Update airbyte-proxy/401.html Co-authored-by: swyx <shawnthe1@gmail.com> * more doc updates * Octavia CLI uses Basic Auth (#17982) * [WIP] Octavia CLI uses Basic Auth * readme * augustin: add basic auth headers to clien * augustin: add basic auth headers to client * tests passing * lint * docs * Move monkey patch to test * coerce headers into strings * monkey patch get_basic_auth_token Co-authored-by: alafanechere <augustin.lafanechere@gmail.com> * fix launch permissions * Keep worker port internal * more readme Co-authored-by: Davin Chia <davinchia@gmail.com> Co-authored-by: swyx <shawnthe1@gmail.com> Co-authored-by: alafanechere <augustin.lafanechere@gmail.com>
24 lines
687 B
Bash
24 lines
687 B
Bash
#!/bin/bash
|
|
|
|
rm /etc/nginx/nginx.conf
|
|
|
|
if [[ -z "${BASIC_AUTH_USERNAME}" ]]; then
|
|
echo "BASIC_AUTH_USERNAME is not set, skipping nginx auth"
|
|
|
|
TEMPLATE_PATH="/etc/nginx/templates/nginx-no-auth.conf.template"
|
|
else
|
|
echo "BASIC_AUTH_USERNAME is set, requiring auth for user '$BASIC_AUTH_USERNAME'"
|
|
|
|
# htpasswd for basic authentication
|
|
rm -rf /etc/nginx/.htpasswd
|
|
htpasswd -c -b /etc/nginx/.htpasswd $BASIC_AUTH_USERNAME $BASIC_AUTH_PASSWORD
|
|
|
|
TEMPLATE_PATH="/etc/nginx/templates/nginx-auth.conf.template"
|
|
fi
|
|
|
|
envsubst '${PROXY_PASS_WEB} ${PROXY_PASS_API} ${PROXY_PASS_RESOLVER}' < $TEMPLATE_PATH > /etc/nginx/nginx.conf
|
|
|
|
echo "starting nginx..."
|
|
nginx -v
|
|
nginx -g "daemon off;"
|