Skip to content

vault: add generic authorizer with jwt auth support#21714

Open
prashantkumar1982 wants to merge 12 commits intodevelopfrom
codex/vault-gwt-auth-authorizer
Open

vault: add generic authorizer with jwt auth support#21714
prashantkumar1982 wants to merge 12 commits intodevelopfrom
codex/vault-gwt-auth-authorizer

Conversation

@prashantkumar1982
Copy link
Contributor

@prashantkumar1982 prashantkumar1982 commented Mar 26, 2026

Summary

This adds the Vault auth abstraction needed for gateway-side JWT support while keeping current behavior unchanged because JWT auth remains disabled.

What changed

  • add a generic Authorizer used by both the Vault gateway handler and the Vault capability gateway handler
  • model two first-class auth mechanisms: AllowListBasedAuth and JWTBasedAuth
  • add a shared AuthResult contract and a shared RequestReplayGuard
  • implement JWT auth validation plumbing behind JWTBasedAuth, gated internally and failing closed when disabled
  • rename the old request-authorizer/replay-guard types and files to reflect the new mechanism names

Behavior

  • runtime behavior is unchanged today because JWT auth is still disabled
  • allowlist-based auth remains the active mechanism for existing traffic

…th-authorizer

# Conflicts:
#	core/capabilities/vault/gw_handler.go
#	core/capabilities/vault/gw_handler_test.go
#	core/services/ocr2/delegate.go
@github-actions
Copy link
Contributor

github-actions bot commented Mar 26, 2026

✅ No conflicts with other open PRs targeting develop

@github-actions
Copy link
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is pretty much just a rename of previous request_authorizer.go file

@trunk-io
Copy link

trunk-io bot commented Mar 26, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cl-sonarqube-production
Copy link

- Cap JWKS response body to 1 MB to prevent resource exhaustion
- Make all AuthResult fields unexported with accessor methods
- Add iat claim validation to JWT parser
- Annotate unreachable return in allowlist retry loop
- Fix misleading test name for digest verification delegation

Made-with: Cursor
@prashantkumar1982 prashantkumar1982 force-pushed the codex/vault-gwt-auth-authorizer branch from 77cda12 to 68f66e2 Compare March 26, 2026 06:43
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