Skip to content

fix(jaeger-auth): use base64-encoded cookie-secret (v7.6.0 lacks --cookie-secret-file)#52

Merged
ciprianiacobescu merged 1 commit into
mainfrom
fix/jaeger-cookie-b64-2026-05-17
May 16, 2026
Merged

fix(jaeger-auth): use base64-encoded cookie-secret (v7.6.0 lacks --cookie-secret-file)#52
ciprianiacobescu merged 1 commit into
mainfrom
fix/jaeger-cookie-b64-2026-05-17

Conversation

@ciprianiacobescu
Copy link
Copy Markdown
Contributor

Problem

PR #51 introduced --cookie-secret-file to 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 with unknown flag: --cookie-secret-file.

Per oauth2-proxy --help (v7.6.0):

--cookie-secret string — the seed string for secure cookies (optionally base64 encoded)

Solution

  1. seed-job/main.py _ensure_jaeger_cookie_secret: write base64.urlsafe_b64encode(os.urandom(32)).decode() (44 ASCII chars, no null bytes, shell-safe) instead of raw binary bytes.
  2. jaeger-auth/entrypoint.sh: read via cat (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.
  3. jaeger-auth/Dockerfile: no change needed — xxd was already absent.

Verification checklist

  • docker compose build seed-job jaeger-auth succeeds
  • docker compose up -d seed-job jaeger-auth starts clean
  • docker compose logs jaeger-auth shows oauth2-proxy listening, no unknown flag error
  • jaeger_oauth2_cookie_secret file is exactly 44 bytes (ASCII base64)

…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.
@github-actions
Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@ciprianiacobescu ciprianiacobescu merged commit 54e8f9f into main May 16, 2026
11 checks passed
@ciprianiacobescu ciprianiacobescu deleted the fix/jaeger-cookie-b64-2026-05-17 branch May 30, 2026 06:55
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