feat: add token_vault_privileged_access support for clients - #1430
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1430 +/- ##
==========================================
+ Coverage 80.23% 80.26% +0.02%
==========================================
Files 163 163
Lines 7533 7544 +11
Branches 1663 1665 +2
==========================================
+ Hits 6044 6055 +11
Misses 800 800
Partials 689 689 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
harshithRai
marked this pull request as ready for review
July 27, 2026 09:42
| - 'channels:read' | ||
| ``` | ||
| > **Note:** The `credentials` sub-object of `token_vault_privileged_access` is **not** managed by the Deploy CLI. On read, Auth0 returns it as credential references (`id`) rather than names or key material, and the Deploy CLI never syncs IDs. Manage the privileged client's credentials directly on the tenant. |
Contributor
There was a problem hiding this comment.
token_vault_privileged_access.credentials is never stripped on export, so an export→deploy round-trip re-sends stale credential IDs.
Contributor
Author
There was a problem hiding this comment.
Fixed. You're right that the original approach re-sent stale credential IDs on round-trip.
Made the field export-only: credentials stripped on export, and the whole object stripped on create/update - so nothing stale is ever re-sent. Verified end-to-end on an EA tenant; tests + docs updated.
harshithRai
marked this pull request as draft
July 27, 2026 21:14
…ng stale credential IDs
harshithRai
marked this pull request as ready for review
July 28, 2026 13:19
kushalshit27
approved these changes
Jul 29, 2026
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: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).token_vault_privileged_accessis exported for visibility but is not deployed - it is stripped from create/update payloads. The Management API requires acredentialsarray (tenant-specific credentialidreferences) whenever the object is sent; those ids are never persisted by the CLI because they are not portable across tenants. Sending the object without them fails validation (Missing required property: credentials), and sending exported ids would re-send stale references on a cross-tenant deploy. Managetoken_vault_privileged_accessdirectly on the tenant.node-auth0bump required - the installed SDK (v6.0.0) already ships these types.Early Access:
token_vault_privileged_accessrequires thetoken_vault_subject_type_jwt_ea_rolloutfeature flag on the tenant, and writes additionally require thecreate:/update:client_token_vault_privileged_accessscopes. Since the field is export-only in the CLI, these requirements affect only manual configuration on the tenant.Exported shape
credentialsis stripped;ip_allowlistandgrantsare kept for visibility.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
Unit Tests:
in
test/tools/auth0/handlers/clients.tests.js:token_vault_privileged_accessshape.credentialswhile keepingip_allowlist/grants.token_vault_privileged_accessobject.Manual Tests:
Verified end-to-end on a live EA-enabled tenant: configured a privileged worker, ran export→import, and confirmed the exported file omits
credentials, the import completes with no validation error, and the worker's on-tenant config is left intact.📝 Checklist