Skip to content

Add proto definitions for API key scopes RPCs #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

DavidSGK
Copy link
Member

@DavidSGK DavidSGK commented Oct 12, 2023

Context

Task

To support frontend SDK clients using API keys without potentially exposing all of their configs, we need to implement scoping API keys. We start with implementing scoping keys to namespaces.

Details

  • Added required protobuf types and RPC methods for CRUD of API key scopes

@DavidSGK DavidSGK self-assigned this Oct 12, 2023
@DavidSGK DavidSGK marked this pull request as ready for review October 12, 2023 21:34
}

message ListAPIKeyScopesResponse {
repeated Namespace namespaces = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it took me a bit to understand that this is a list of namespaces that requested api key is scoped to, maybe give it a bit more descriptive name? Like enabled_namespaces or scoped_to_namespaces.
Also do we need to pass a full namespace object here? May be just names would be enough? I guess it depends on how it will be used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can change the name to be more descriptive!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not actually returning the full namespace object, Namespace is a new message type I added as part of this PR and it basically only contains the repo key (which is gh owner, repo name, team name) and namespace name.

@DavidSGK DavidSGK merged commit 1f4e9b0 into main Oct 13, 2023
@DavidSGK DavidSGK deleted the david-api-key-scopes-rpcs branch October 13, 2023 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants