Vault refactor to support jwt auth and allowlist auth based ownership model#22525
Vault refactor to support jwt auth and allowlist auth based ownership model#22525prashantkumar1982 wants to merge 17 commits into
Conversation
CORA - Pending Reviewers
Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown For more details, see the full review summary. |
|
I see you updated files related to
|
|
✅ No conflicts with other open PRs targeting |
… into vault-owner-refactor
Trigger CI. Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
| nodeTenantID, errTenant := cresettings.Default.TenantID.GetOrDefault(ctx, v.limitsFactory.Settings) | ||
| if errTenant != nil { | ||
| v.lggr.Errorw("failed to resolve CRE TenantID setting", "method", req.Method, "requestID", req.ID, "error", errTenant) | ||
| return nil, fmt.Errorf("failed to resolve TenantID from CRE settings: %w", errTenant) | ||
| } | ||
| if claims.TenantID != nodeTenantID { | ||
| v.lggr.Debugw("JWT tenant id does not match node TenantID CRE setting", "method", req.Method, "requestID", req.ID, "orgID", claims.OrgID, "claimsTenantID", claims.TenantID, "nodeTenantID", nodeTenantID) | ||
| return nil, fmt.Errorf("%w: jwt tenant id %d node tenant id %d", ErrJWTTenantIDCresettingsMismatch, claims.TenantID, nodeTenantID) |
There was a problem hiding this comment.
It would be possible to add a type of limiter that does an equality check, though it wouldn't fit right with the numeric metrics code, so probably not worth pursuing unless we need to rely on those errors types.
|




Design: Vault DON design doc (new) — JWT behavior, tenant semantics, and workflow-owner derivation.
This PR implements the job-spec and runtime wiring for that model. Below is repository-specific detail (paths, deployment helpers, tests); the doc remains the authoritative design reference.
Requires smartcontractkit/chainlink-common#2068.
Tenant ID from job specs
For Vault JWT,
TenantIDis fetched from job-specauth0, together withissuerURLandaudience:auth0.tenantID→JWTBasedAuthConfig.TenantID.[pluginConfig.auth0]TOMLtenantID(seeworker-vault.tmpl).