UID2-7271: add Role.CLAUDE_ACCESS for machine service-account access#649
Open
sophia-chen-ttd wants to merge 6 commits into
Open
UID2-7271: add Role.CLAUDE_ACCESS for machine service-account access#649sophia-chen-ttd wants to merge 6 commits into
sophia-chen-ttd wants to merge 6 commits into
Conversation
Introduces a new fine-grained role for Claude (and similar AI service accounts) to authenticate against uid2-admin via the Okta custom scope uid2.admin.claude-access. The role is intentionally more restrictive than MAINTAINER — it grants read access to all non-reveal endpoints plus add-only POST access, with no update, delete, or reveal operations. - Add CLAUDE_ACCESS to OktaCustomScope, wiring uid2.admin.claude-access to the new Role.CLAUDE_ACCESS from uid2-shared 11.4.21-alpha-349-SNAPSHOT - Add Role.CLAUDE_ACCESS to all applicable auth.handle() calls across 13 service files and GetClientSideKeypairsBySite annotation - Reveal endpoints (GET /api/client/reveal, GET /api/operator/reveal) explicitly excluded; enclave/add and service/add also excluded CLAUDE_ACCESS is a strict subset of MAINTAINER: every endpoint it can reach, MAINTAINER can also reach. Refs: UID2-7271 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43fcf28 to
b63e56f
Compare
Remove Role.CLAUDE_ACCESS from all add POST endpoints (client/add, client_side_keypairs/add, key/add, operator/add, service_link/add, site/add). CLAUDE_ACCESS is now read-only. Refs: UID2-7271 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…m.xml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Missed in the read-only restriction pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…GetClientSideKeypairsBySite Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Introduces
Role.CLAUDE_ACCESS(from uid2-shared11.4.21-alpha-349-SNAPSHOT) and wires the Okta custom scopeuid2.admin.claude-accessto it viaOktaCustomScope. The role is read-only — all GET endpoints except reveal endpoints. No write operations.CLAUDE_ACCESSis a strict subset ofMAINTAINER: every endpoint it can reach,MAINTAINERcan also reach.Endpoints granted CLAUDE_ACCESS
GET /api/client/metadataGET /api/client/listGET /api/client/list/:siteIdGET /api/client/keyIdGET /api/client/contactGET /api/client_side_keypairs/listGET /api/client_side_keypairs/:subscriptionIdGET /api/v2/sites/:siteId/client-side-keypairsGET /api/cloud-encryption-key/metadataGET /api/cloud-encryption-key/listGET /api/enclave/metadataGET /api/enclave/listGET /api/key/listGET /api/key/list_keyset_keysGET /api/job-dispatcher/current-jobGET /api/job-dispatcher/job-queueGET /api/keys_acl/listGET /api/operator/metadataGET /api/operator/listGET /api/partner_config/getGET /api/salt/snapshotsGET /api/service_link/listGET /api/service/listGET /api/service/list/:service_idGET /api/sharing/listsGET /api/sharing/list/:siteIdGET /api/sharing/keysetsGET /api/sharing/keyset/:keyset_idGET /api/sharing/keysets/relatedGET /api/site/listGET /api/site/:siteIdExplicitly excluded:
GET /api/client/reveal,GET /api/operator/reveal(reveal endpoints). All POST/write operations excluded.Test plan
uid2.admin.claude-accessscope can call a read endpoint (e.g.GET /api/site/list)POST /api/site/add)GET /api/client/reveal,GET /api/operator/reveal)Dependencies
Role.CLAUDE_ACCESS: IABTechLab/uid2-shared (branchsch-UID2-7271-add-claude-access-role-to-admin)Refs: UID2-7271
🤖 Generated with Claude Code