Repository navigation
[ASE-253] Add project-scoped user API keys - #749
Merged
Merged
Conversation
added 12 commits
April 16, 2026 16:35
BetterAndBetterII
marked this pull request as ready for review
April 17, 2026 02:23
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.
What changed
user_api_keysentity with hashed storage, status/expiry metadata, and last-used trackingase_pat_project-scoped user API keys can call/api/v1/platform/...with project and scope enforcementWhy
OpenASE already had agent/runtime tokens and human RBAC, but users could not safely mint their own long-lived project-scoped API keys for external automation. This change fills that gap without exposing browser sessions or reusing agent runtime credentials.
Validation
PATH=$HOME/.local/go1.26.1/bin:$PATH go test ./internal/agentplatformPATH=$HOME/.local/go1.26.1/bin:$PATH go test ./internal/httpapi -run 'TestAgentPlatformAcceptsProjectScopedUserAPIKeys|TestHTTPAPIErrorMappings|TestSecuritySettingsRouteReturnsCurrentBoundary'PATH=$HOME/.local/go1.26.1/bin:$PATH go test ./internal/service/userapikey ./internal/repo/userapikey ./internal/repo/agentplatformPATH=$HOME/.local/go1.26.1/bin:$HOME/.nvm/versions/node/v22.22.1/bin:$PATH make openapi-generatePATH=$HOME/.nvm/versions/node/v22.22.1/bin:$PATH pnpm --dir web exec vitest run src/lib/features/settings/components/security-settings-user-api-keys.test.tsNotes
security-settings.test.tssuite still reflects older UI copy and panel structure, so validation stayed focused on the new API-key panel path added in this change.