Skip to content

refactor(auth): validate Sentinel tokens locally - #17

Merged
BK1031 merged 1 commit into
mainfrom
bk1031/local-sentinel-jwt-validation
Sep 10, 2026
Merged

refactor(auth): validate Sentinel tokens locally#17
BK1031 merged 1 commit into
mainfrom
bk1031/local-sentinel-jwt-validation

Conversation

@BK1031

@BK1031 BK1031 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor
  • Validate Sentinel access tokens locally with cached Sentinel JWKS keys
  • Enforce RS256 signatures, expiration, and the Vault audience
  • Refresh signing keys on unknown key IDs with rate limiting
  • Keep Vault available with cached keys during Sentinel outages

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 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-10T03:33:55.396567Z d9cff9d 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.

@BK1031
BK1031 merged commit 72041ac into main Sep 10, 2026
6 checks passed
@BK1031
BK1031 deleted the bk1031/local-sentinel-jwt-validation branch September 10, 2026 03:30

@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: d9cff9df12

ℹ️ 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 on lines +63 to +65
if key := cachedSigningKey(kid); key != nil {
return key, nil
}

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 Refresh cached keys periodically to honor key revocation

When Sentinel removes a compromised or retired key while continuing to use already-cached key IDs, this early return prevents Vault from ever fetching the updated JWKS; refreshes occur only for an unknown kid. Tokens signed with the removed private key therefore remain accepted until the process restarts or an unrelated new key ID triggers a refresh, and an attacker holding that key can choose a far-future expiration. Add a bounded cache lifetime or background refresh while retaining stale keys only when a refresh actually fails.

Useful? React with 👍 / 👎.

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