← Back to Pull requests

dex, oauth2-proxy: refuse to render placeholder credentials #3569

Closed
unknown closed this pull request without merging on Sep 14, 2026 16:09 UTC
View on GitHub
unknown unknown commented on Aug 02, 2026 10:21 UTC
Author

Pull Request Template for Kubeflow Manifests

✏️ Summary of Changes

Both charts ship REPLACE_ME credential defaults, and nothing stopped an
installation from using them.

helm install dex ./common/dex/helm --namespace auth
helm install oauth2-proxy ./common/oauth2-proxy/helm --namespace oauth2-proxy

Today both succeed, and produce:

dex-oidc-client.OIDC_CLIENT_SECRET  = REPLACE_ME_OIDC_CLIENT_SECRET
dex-passwords.DEX_USER_PASSWORD     = REPLACE_ME_STATIC_PASSWORD_HASH
oauth2-proxy.client-secret          = REPLACE_ME_CLIENT_SECRET
oauth2-proxy.cookie-secret          = REPLACE_ME_COOKIE_SECRET

The cookie secret signs oauth2-proxy session cookies. A value anyone can read out
of this repository means anyone can forge a session.

The charts now fail before rendering while a placeholder is in place.

Two related checks

staticPassword.hash must look like bcrypt. Dex compares the submitted
password against this hash; any other value matches nothing, so the account
silently cannot log in. The chart checks the $2a$ / $2b$ / $2y$ prefix.

credentials.cookieSecret must decode to 16, 24 or 32 bytes. oauth2-proxy
uses it as an AES key. Any other length is accepted by Kubernetes and then
crash-loops the workload, which is a much worse place to find out.

Every message names the value and how to generate a correct one, for example:

credentials.cookieSecret must be 16, 24 or 32 bytes, raw or base64 encoded;
got 8 raw bytes decoding to 6. Generate one with
openssl rand -base64 32 | tr -- '+/' '-_'

Test change

tests/test_dex_helm_rollout_checksums.py rendered with the placeholder defaults
and, in one case, with staticPassword.hash=changed-password-hash, a value no
password could ever match. It now supplies real-shaped credentials. The guard
found this, which is the point of it.

📦 Dependencies

None. Applies to two merged charts and is independent of every open pull request.

#3568 also touches common/dex/helm; the two do not overlap in any file except
the chart README, and whichever merges second may need a trivial rebase.

🐛 Related Issues

Found while reviewing the Dex configuration surface for #3568.

Validation

helm template dex ./common/dex/helm -n auth                      # fails, as intended
helm template oauth2-proxy ./common/oauth2-proxy/helm -n oauth2-proxy   # fails
./tests/helm_kustomize_compare_all.sh          # every component still passes
python3 tests/test_dex_helm_rollout_checksums.py
helm lint common/dex/helm --namespace auth
helm lint common/oauth2-proxy/helm --namespace oauth2-proxy
black --check tests/ && git diff --check

The Kustomize comparison is unaffected: the CI values files supply real
credentials, so every scenario renders exactly as before.

✅ Contributor Checklist

  • I have tested these changes with kustomize. See Installation Prerequisites.

  • All commits are _signed-off_ to satisfy the DCO check.

  • I have considered adding my company to the adopters page to support Kubeflow and help the community, since I expect help from the community for my issue (see 1. and 2.).
  • ---

    You can join the CNCF Slack and access our meetings at the Kubeflow Community website. Our channel on the CNCF Slack is here #kubeflow-community-distribution.

    Diff: 467 lines (+350 / -117) across 5 files Reviewer: juliusvonkohout Review duration: 62268m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.69) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.69 · 467 lines diff across 5 files
    0.69
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    57%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.368
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.069
    Real PR Conversation Timeline
    1 comments
    "Review active on #3569"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 58.0% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 68.8% (HIGH) · Higher = larger blast radius
    68.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 58.0% · Lower = rushed or shallow review
    58.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.9% · Safe to merge
    28.9%