Skip to content

fix: Resolve mountPath conflict when OIDC and JWT auth are both enabled#1272

Open
tuteng wants to merge 3 commits intomasterfrom
fix/oauth-jwt-mountpath-conflict
Open

fix: Resolve mountPath conflict when OIDC and JWT auth are both enabled#1272
tuteng wants to merge 3 commits intomasterfrom
fix/oauth-jwt-mountpath-conflict

Conversation

@tuteng
Copy link
Copy Markdown
Member

@tuteng tuteng commented May 6, 2026

(If this PR fixes a github issue, please add Fixes #<xyz>.)

Fixes #

(or if this PR is one task of a github issue, please add Master Issue: #<xyz> to link to the master issue.)

Master Issue: #

Motivation

Explain here the context, and why you're making that change. What is the problem you're trying to solve.

Modifications

Describe the modifications you've done.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 01:03
@tuteng tuteng requested review from a team as code owners May 6, 2026 01:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

@tuteng:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions Bot added the doc-info-missing This pr needs to mark a document option in description label May 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 261e3db227

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{{- if .Values.auth.authentication.enabled }}
{{- if and .Values.auth.oauth.enabled .Values.auth.oauth.brokerClientCredentialSecret }}
- mountPath: /mnt/secrets
- mountPath: /mnt/secrets/oauth
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve OAuth secret path for existing auth parameters

Changing the OAuth secretRef mount from /mnt/secrets to /mnt/secrets/oauth unconditionally breaks existing deployments that already set auth.oauth.brokerClientAuthenticationParameters.privateKey to file:///mnt/secrets/broker_client_credential.json (the documented path in values.yaml). Because brokerClientAuthenticationParameters is passed through as-is, upgrading to this commit causes the broker/proxy OAuth client credential file lookup to fail unless users manually change their values, making this a backward-incompatible auth regression even when JWT is not enabled.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the sn-platform-slim auth helper so OAuth broker credentials are mounted under a separate path, aiming to avoid the secret mount collision that occurs when OAuth/OIDC and JWT auth are enabled together.

Changes:

  • Change the OAuth credential secret mount path in sn-platform-slim from /mnt/secrets to /mnt/secrets/oauth.
  • Align the slim chart’s helper behavior with the corresponding helper in charts/sn-platform.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{{- if .Values.auth.authentication.enabled }}
{{- if and .Values.auth.oauth.enabled .Values.auth.oauth.brokerClientCredentialSecret }}
- mountPath: /mnt/secrets
- mountPath: /mnt/secrets/oauth
labuladong
labuladong previously approved these changes May 6, 2026
Only use /mnt/secrets/oauth for OIDC when JWT is also enabled, so existing
deployments that reference file:///mnt/secrets/... in their
brokerClientAuthenticationParameters continue to work when JWT is not in use.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-info-missing This pr needs to mark a document option in description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants