feat: add token_vault_privileged_access support for clients#1430
Draft
harshithRai wants to merge 2 commits into
Draft
feat: add token_vault_privileged_access support for clients#1430harshithRai wants to merge 2 commits into
harshithRai wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1430 +/- ##
=========================================
Coverage ? 80.23%
=========================================
Files ? 163
Lines ? 7534
Branches ? 1663
=========================================
Hits ? 6045
Misses ? 800
Partials ? 689 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Adds support for the
token_vault_privileged_accessproperty on clients, which hardens a privileged Token Vault worker by restricting the caller IPs, connections, and scopes it may use at runtime.clientsschema - newtoken_vault_privileged_accessobject with two properties:ip_allowlist(array of strings) - IPv4/IPv6 addresses or CIDR ranges permitted to call token exchange on behalf of the client.grants(array of objects) - connection/scope pin objects, each withconnection(name) andscopes(array). Max 5 connections; max 20 scopes total (enforced server-side).credentialsis intentionally excluded - Auth0 returns it as credential references (id), and the Deploy CLI never syncs IDs. Privileged-client credentials are managed directly on the tenant.node-auth0bump required - the installed SDK (v6.0.0) already ships these types.Early Access: Enforcement of
ip_allowlistandgrantsis gated by thetoken_vault_subject_type_jwt_ea_rolloutfeature flag. When the flag is off, the fields are accepted but not stored or returned.Example shape
YAML:
JSON (directory format):
{ "name": "My Token Vault Privileged App", "app_type": "non_interactive", "token_vault_privileged_access": { "ip_allowlist": ["192.168.1.0/24", "10.0.0.1"], "grants": [ { "connection": "google-oauth2", "scopes": ["https://www.googleapis.com/auth/calendar.readonly"] }, { "connection": "slack", "scopes": ["chat:write", "channels:read"] } ] } }🔬 Testing
test/tools/auth0/handlers/clients.tests.jsverifyingtoken_vault_privileged_access(ip_allowlist+grants) passes through on client create.📝 Checklist