Skip to content

fix(auth): enforce Vault token audience - #16

Merged
BK1031 merged 1 commit into
mainfrom
bk1031/remove-sentinel-all-bypass
Sep 9, 2026
Merged

fix(auth): enforce Vault token audience#16
BK1031 merged 1 commit into
mainfrom
bk1031/remove-sentinel-all-bypass

Conversation

@BK1031

@BK1031 BK1031 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
  • Reject Sentinel tokens not issued for the Vault application
  • Remove sentinel:all overrides from account and application access
  • Keep Vault authorization based on Sentinel groups and resource access groups

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T19:56:41.199557Z 04f1db9 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 04f1db9fa7

ℹ️ 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".

Comment thread vault/api/api.go
return
}
setAuthContext(c, token, claims)
if !RequestTokenHasAudience(c, config.SentinelClientID) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Accept Vault in any audience position

When Sentinel returns a valid multi-valued aud claim such as ["another-service", config.SentinelClientID], this rejects the token because setAuthContext stores only audiences[0] and RequestTokenHasAudience compares only that value. JWT audience arrays are unordered sets of intended recipients, so the middleware should test every value returned by claimStringSlice rather than requiring Vault to be first.

Useful? React with 👍 / 👎.

@BK1031
BK1031 merged commit b06feb7 into main Sep 9, 2026
7 checks passed
@BK1031
BK1031 deleted the bk1031/remove-sentinel-all-bypass branch September 9, 2026 22:51
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