Skip to content

feat(gateway): sync nginx Basic Auth from .env with admin≠user split - #15

Merged
BehRoooz merged 3 commits into
mainfrom
fix-auth
Jul 26, 2026
Merged

feat(gateway): sync nginx Basic Auth from .env with admin≠user split#15
BehRoooz merged 3 commits into
mainfrom
fix-auth

Conversation

@BehRoooz

Copy link
Copy Markdown
Owner

Summary

This change makes nginx Basic Auth credentials a single local source of truth in .env, then generates matching htpasswd files and wires the same values into Streamlit and smoke tests—with admin and public user kept separate.

  • Added GATEWAY_ADMIN_* and GATEWAY_USER_* to .env.example (real secrets stay in gitignored .env).
  • Added scripts/load_gateway_env.sh + scripts/prepare_gateway_auth.sh, exposed as make gateway-auth.
  • Generation refuses identical admin/user usernames or passwords.
  • Writes:
    - nginx/.htpasswd-admin → ops routes (/api/v1 admin paths, /mlflow, /api/train)
    - nginx/.htpasswd-user → predict routes (/api/predict/*, predict-go-*)
  • Streamlit prefills the public user from Compose/GATEWAY_USER*.
  • Smoke uses admin for job/health/artifact calls and user for predict-go-from-fasta.
  • Docs updated in root README, nginx README, Streamlit README, and smoke README.

Why

Local 401s came from htpasswd drifting away from what the UI/smoke used (and from shared/reused credentials). This keeps nginx, Streamlit, and smoke aligned without putting passwords in git.

BehRoooz added 3 commits July 26, 2026 23:11
Introduce load/prepare scripts and GATEWAY_* placeholders so nginx
auth files are generated from .env with distinct admin vs public users.
Introduce load/prepare scripts and GATEWAY_* placeholders so nginx
auth files are generated from .env with distinct admin vs public users.
Clarify admin vs public-user credentials across README, nginx, UI, and smoke docs.
@BehRoooz
BehRoooz merged commit e001d2c into main Jul 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant