Skip to content

Offer query parameters for easier setup of Auth Tokens #49084

Closed

Description

@stephanie-anderson

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

Activity

  1. Lms24 commented on May 15, 2023

    @Lms24
    Member

    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

  2. changed the title [-]Offer GET parameters for easier setup of Auth Tokens[/-] [+]Offer query parameters for easier setup of Auth Tokens[/+] on May 15, 2023
  3. smeubank commented on May 15, 2023

    @smeubank
    Contributor

    Related: #48690

  4. smeubank commented on May 15, 2023

    @smeubank
    Contributor

    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

  5. getsantry commented on May 15, 2023

    @getsantry
    Contributor

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

  6. Dhrumil-Sentry commented on May 15, 2023

    @Dhrumil-Sentry
    Contributor

    @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?

  7. scefali commented on May 16, 2023

    @scefali
    Contributor

    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.

  8. Dhrumil-Sentry commented on May 16, 2023

    @Dhrumil-Sentry
    Contributor

    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

  9. stephanie-anderson commented on Jun 1, 2023

    @stephanie-anderson
    ContributorAuthor

    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.

  10. locked and limited conversation to collaborators on Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions