Skip to content
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

RefreshApiKey returns a JWT for the apiKey, not an actual apiKey #571

Open
joseph-wortmann opened this issue Jan 5, 2025 · 1 comment
Open

Comments

@joseph-wortmann
Copy link

The call to RefreshApiKey should return an apiKey, but It returns a JWT instead.

This makes It impossible to actually rotate keys, as the response that you get back is not a key.

This behavior occurs for both Super User and Fine Grained keys.

@joseph-wortmann
Copy link
Author

So I figured this out.

The API Key that the Credential Provider is expecting is actually a base 64 encoded JSON document that contains the "endpoint" and the "api_key", with the latter being a JWT. Both of these are returned separately in the RefreshApiKeySuccess structure as Endpoint and ApiKey, respectively, and must be combined by the user into the base64 encoded JSON as previously mentioned.

I can find nowhere in the documentation that this is called out. It is quite different than the JSON that is given for API key creation in the console. Really needs to be changed or documented.

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

No branches or pull requests

1 participant