APP-17524: Add is_default to APIKeyWithAuthorizations - #896
Open
Cecily Munn (cecilyViam) wants to merge 2 commits into
Open
Cecily Munn (cecilyViam) wants to merge 2 commits into
Cecily Munn (cecilyViam) wants to merge 2 commits into
Conversation
Lets ListKeys/GetRobotAPIKeys callers see each key's active-default status without a per-key InternalAuthService/IsKeyDefault round trip. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NhhSiphB4cdbSJ2qvGHUj6
Cecily Munn (cecilyViam)
marked this pull request as ready for review
September 15, 2026 13:20
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
Adds
bool is_default = 3toviam.app.v1.APIKeyWithAuthorizations, soListKeysandGetRobotAPIKeysresponses can carry each key's active-default status directly.Why
The app frontend currently issues one
InternalAuthService/IsKeyDefaultRPC per API key to render the org/machine API-keys pages. For the viam-dev org (~2,300 keys) a single page load fires ~8,000 requests (with retries), which browsers reject withERR_INSUFFICIENT_RESOURCES— see APP-17524. The backing store already has this bit on the same documentListKeysreads; this field lets the app return it in the list response and delete the N+1.Consumed by the companion app PR (draft): viamrobotics/app — populates the field in
IdentityAuthorizationToPbAPIKeyWithAuthorizationsand drops the per-key query fan-out from the UI.🤖 Generated with Claude Code