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

Ease of use: Add validation that org_id isn't used with API Keys/SA Tokens #1296

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

julienduchesne
Copy link
Member

Closes #1157
A source of confusion that we get occasionally get questions about is when users try to create org resources with an API key
API keys are org-scoped already and when they are used, the org header will be ignored by the API

This means that the resources will still be created but not where the user expects

This PR adds a validation on the Create function of every resource. If org_id is set and we're using an API key, then throw an error instead of the unexpected behavior

…okens

Closes #1157
A source of confusion that we get occasionally get questions about is when users try to create org resources with an API key
API keys are org-scoped already and when they are used, the org header will be ignored by the API
This means that the resources will still be created but not where the user expects

This PR adds a validation on the Create function of every resource. If org_id is set and we're using an API key, then throw an error instead of the unexpected behavior
@julienduchesne julienduchesne requested a review from a team as a code owner January 22, 2024 19:00
Copy link

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

@julienduchesne julienduchesne merged commit c2152fb into master Jan 24, 2024
24 checks passed
@julienduchesne julienduchesne deleted the julienduchesne/org-id-validation branch January 24, 2024 17:35
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.

Org_id ignored when creating roles
2 participants