Repository navigation
feat: public literature:read/usage:read API-key scopes, key rename, settable expiry - #76
Merged
Conversation
…ettable expiry
Design doc's public scope vocabulary (literature:read, usage:read) is now
what self-service keys are issued/displayed in, translated to/from the
internal dataset.read/usage.read permission names at the /me/api-keys
HTTP boundary only -- the registry, role grants, the org-admin
/orgs/{org_id}/api-keys router, and the gateway/policy-engine's existing
enforcement are all untouched. Also adds key rename (PATCH, both routers)
and an optional expires_at at creation (both routers), closing three of
gap #9's five sub-items.
Co-Authored-By: Claude Sonnet 5 <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
/me/api-keyskeys are now issued/displayed in the design doc's public scope vocabulary (literature:read,usage:read), translated to/from the internaldataset.read/usage.readpermission names at this HTTP boundary only -- the permission registry, role grants, the org-admin/orgs/{org_id}/api-keysrouter, and the gateway/policy-engine's existing enforcement are all unchanged.PATCH, both the self-service and org-admin routers), with a newAPI_KEY_RENAMEDaudit event.expires_atat creation (both routers) --expires_atalready existed in storage and inApiKeyOut, but nothing let a caller set it.Closes three of gap #9's five sub-items (API-key lifecycle): the public scope naming, key rename, and settable expiry. Not in this PR (deliberately, scoped out up front):
omni_sk_live_/omni_sk_test_prefixes + unbilled test-mode responses, and gating self-service creation on an active billing plan -- both bigger, cross-service changes.Test plan
pytest tests/test_apikeys.py tests/test_me_api_keys.py tests/test_apikey_exchange.py tests/test_route_authorization_coverage.py-- all passing, including the updated org-scoped-route-count tripwire (43 -> 44 for the new org-admin rename route)pytest, excluding two pre-existing collection errors unrelated to this change) -- 1466 passed, 2 skippeddataset.read/usage.readenforcement path is untouched (no changes outside omnibioai-auth)🤖 Generated with Claude Code