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

Offer query parameters for easier setup of Auth Tokens #49084

Closed
Tracked by #6
stephanie-anderson opened this issue May 15, 2023 · 8 comments
Closed
Tracked by #6

Offer query parameters for easier setup of Auth Tokens #49084

stephanie-anderson opened this issue May 15, 2023 · 8 comments

Comments

@stephanie-anderson
Copy link
Contributor

stephanie-anderson commented May 15, 2023

Problem Statement

Currently there seems to be no way to select a specific preset of privileges when creating a new auth token. We could help our users by providing those, depending on where they come from, without making the process more complicated.

Solution Brainstorm

Initially I wanted to upload source maps. In order to do so, I had to request an auth token. I ended up on this site, but had no idea which privileges should be granted (overlooked the hint in a comment):

Screenshot 2023-05-15 at 10 59 57

What was actually written in the comment was:
Screenshot 2023-05-15 at 11 00 46

What would be really great is if we would introduce kind of "presets" for auth tokens, without complicating it for our users. We could do so by introducing query parameters for the URL:
https://sentry-tutorial.sentry.io/settings/account/api/auth-tokens/new-token/

Something like
https://sentry-tutorial.sentry.io/settings/account/api/auth-tokens/new-token/?preset=sourcemaps or
https://sentry-tutorial.sentry.io/settings/account/api/auth-tokens/new-token/?setup=sourcemaps

Which would then pre-fill the privileges like that:

Screenshot 2023-05-15 at 11 06 07

And we would change it in the SDK comments to:

Screenshot 2023-05-15 at 11 06 59

Product Area

Settings - Auth

@Lms24
Copy link
Member

Lms24 commented May 15, 2023

Questions around permissions for the auth token also came up in the docs a couple of times. For example: getsentry/sentry-docs#6573

+1 on solving this via the UI/a query param

@lforst lforst changed the title Offer GET parameters for easier setup of Auth Tokens Offer query parameters for easier setup of Auth Tokens May 15, 2023
@smeubank
Copy link
Member

Related: #48690

@smeubank
Copy link
Member

it could also be considered that this would be automated in docs where the user is logged in that the token would be autofilled similar to project, org, and DSN

@getsantry
Copy link
Contributor

getsantry bot commented May 15, 2023

Routing to @getsentry/product-owners-settings-auth for triage, due by Wednesday, May 17th at 9:07 am (sfo). ⏲️

@Dhrumil-Sentry
Copy link

@stephanie-anderson @smeubank The requirement is a bit unclear to me- I'd understand if the Auth UX had a way to allow users to specify the token's purpose and then Sentry could auto-select the needed scopes.

But why do you want query parameters in the API? Since Sentry already knows what scopes to use for different use cases you already know what scopes to ask for. Is my understanding correct?

@scefali
Copy link
Member

scefali commented May 16, 2023

I am hesitant about UX to improve user tokens. We want people to use organization tokens so if they leave Sentry, things don't just break.

@Dhrumil-Sentry
Copy link

I am hesitant about UX to improve user tokens. We want people to use organization tokens so if they leave Sentry, things don't just break.

I 100% agree, Ideally, I'd like to improve the UX for internal integration tokens- "Internal Integration" is confusing to folks IMO- Either Sentry can automatically create these tokens for users when we know a project needs tokens to upload source maps, etc or We should have a very clear settings entry for Tokens in Orgs Settings- It can use the same logic behind the scenes but the users should not have to create "Internal Integrations" to get tokens

@stephanie-anderson
Copy link
Contributor Author

We're going to build proper org based auth tokens, which we will initially build to serve as CI/CD tokens (getsentry/team-sdks#6). Will close this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

7 participants