fix(jaeger-auth): use base64-encoded cookie-secret (v7.6.0 lacks --cookie-secret-file)#52
Merged
Merged
Conversation
…okie-secret-file) oauth2-proxy v7.6.0 does not support --cookie-secret-file (unknown flag at startup). Revert to --cookie-secret by changing the seed-job to write urlsafe-base64 of 32 random bytes (44 ASCII chars; shell-safe) instead of raw binary, and update entrypoint.sh to read the file via cat and pass the value with --cookie-secret=. oauth2-proxy auto-decodes the 44-char base64 to 32 raw bytes (AES-256) at startup.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #51 introduced
--cookie-secret-fileto avoid shell null-byte truncation when passing a 32-byte binary secret. However, oauth2-proxy v7.6.0 does not support that flag — it errors at startup withunknown flag: --cookie-secret-file.Per
oauth2-proxy --help(v7.6.0):Solution
seed-job/main.py_ensure_jaeger_cookie_secret: writebase64.urlsafe_b64encode(os.urandom(32)).decode()(44 ASCII chars, no null bytes, shell-safe) instead of raw binary bytes.jaeger-auth/entrypoint.sh: read viacat(safe — no null bytes now) and pass via--cookie-secret=. oauth2-proxy auto-decodes a 44-char urlsafe-base64 string to 32 raw bytes (AES-256) at startup.jaeger-auth/Dockerfile: no change needed —xxdwas already absent.Verification checklist
docker compose build seed-job jaeger-authsucceedsdocker compose up -d seed-job jaeger-authstarts cleandocker compose logs jaeger-authshows oauth2-proxy listening, nounknown flagerrorjaeger_oauth2_cookie_secretfile is exactly 44 bytes (ASCII base64)