Skip to content

Scoped access token form pre-selects all actions when adding a resource #48175

Closed

Description

@dhruv2x

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When creating a scoped Personal Access Token (Account → Access Tokens →
Generate token → scoped), adding a resource under Configure permissions
pre-selects all of that resource's actions (read, write, create, delete)
instead of a minimal default. The access dropdown shows "N selected" with every
checkbox ticked.

If the token is created without manually deselecting, it's granted every action
for that resource, more than a scoped, least-privilege token should default
to.

To Reproduce

  1. Go to the Dashboard → Account → Access Tokens.
  2. Click Generate token and choose the scoped option.
  3. Under Configure permissions, open the resource picker and add a resource
    that has more than one action.
  4. Look at the added row's access dropdown.

Observed: the dropdown reads "N selected" and all action checkboxes are
checked.

Expected behavior

A newly added resource should default to a single least-privilege action,
read when available, otherwise the first available action, leaving the user
to opt into anything more.

Screenshots

N/A : account/token pages are platform-only, so this reproduces on the hosted
dashboard (not self-hosted Studio).

System information

  • Dashboard: current master
  • Area: apps/studio : scoped access token creation form

Additional context

Root cause is in the add-resource handler, which seeds the new permission row
with the resource's full action list rather than a single default action.

Activity

  1. added
    bug
    on Jul 22, 2026
  2. added
    external-issue
    on Jul 22, 2026
  3. coderabbitai commented on Jul 22, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #48011 - fix: scoped PAT creation form error messages are hidden [merged]
    #48176 - fix(studio): default scoped PAT permissions to read [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  4. added
    frontend
    pr-opened
    and removed on Jul 22, 2026
  5. awaseem commented on Jul 23, 2026

    @awaseem
    Contributor

    This isn't even out to users btw, its behind a flag since we're actively working on it...

    Closing not relevant

  6. dhruv2x commented on Jul 23, 2026

    @dhruv2x
    Author

    I know it hasn’t been released to users yet, but could I ask what kind of fix we’re planning for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugexternal-issuefrontendpr-opened

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions