René's URL Explorer Experiment


Title: Database Migrations: scopes array + typed allow-list · Issue #19845 · coder/coder · GitHub

Open Graph Title: Database Migrations: scopes array + typed allow-list · Issue #19845 · coder/coder

X Title: Database Migrations: scopes array + typed allow-list · Issue #19845 · coder/coder

Description: Description Migrate API keys from a single scope column to scopes api_key_scope[] and add allow_list text[] supporting entries like workspace:, template:*, or *:*. Default/backfill existing rows to scopes=['all'] and allow_list=['*...

Open Graph Description: Description Migrate API keys from a single scope column to scopes api_key_scope[] and add allow_list text[] supporting entries like workspace:, template:*, or *:*. Default/backfill existing r...

X Description: Description Migrate API keys from a single scope column to scopes api_key_scope[] and add allow_list text[] supporting entries like workspace:<uuid>, template:*, or *:*. Default/backfill exis...

Opengraph URL: https://github.com/coder/coder/issues/19845

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Database Migrations: scopes array + typed allow-list","articleBody":"Description\n\n- Migrate API keys from a single `scope` column to `scopes api_key_scope[]` and add `allow_list text[]` supporting entries like `workspace:\u003cuuid>`, `template:*`, or `*:*`.\n- Default/backfill existing rows to `scopes=['all']` and `allow_list=['*:*']` to maintain backward compatibility.\n- Extend the existing `api_key_scope` enum with the new low-level scope names introduced in this RFC (e.g., `workspace:read`, `template:read`, `api_key:create`, etc.).\n\nKey files/areas\n\n- SQL migrations in `coderd/database/migrations/` (both up/down).\n- Generated models in `coderd/database/models.go` (via `make gen`).\n- Reference low-level scope names from `coderd/rbac/policy/policy.go` (`RBACPermissions`) when updating `api_key_scope` enum values.\n\nAcceptance criteria\n\n- Running `make gen` succeeds; compiled models expose `[]APIKeyScope` (or `[]string`) and `[]string allow_list`.\n- Existing installations upgrade without breaking token usage; no data loss.\n- Add a down migration returning to the old schema.\n- Enum updated with new low-level scope values when enum array is selected; down migration accounts for removed enum variants if needed.\n- `api_key_scope` enum includes all known `\u003cresource>:\u003caction>` from `policy.RBACPermissions` (public and internal). The public catalog exposed to users is a filtered subset defined in the low‑level catalog task; document how to update the enum when RBAC evolves.\n","author":{"url":"https://github.com/ThomasK33","@type":"Person","name":"ThomasK33"},"datePublished":"2025-09-17T13:49:50Z","url":"https://github.com/coder/coder/issues/19845"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ecfc019f-d7dc-fd6d-2658-fb1075f3be61
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE6D6:B53AF:1C71948:25CCD6D:6B0163DC
html-safe-nonce242cda45de091afcb4cab7f0c0f584d149fc95e21e3c2d30421cf051be392d29
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkQ2OkI1M0FGOjFDNzE5NDg6MjVDQ0Q2RDo2QjAxNjNEQyIsInZpc2l0b3JfaWQiOiIyODEwNjMxOTQyMjE0Mzc5MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7c2785984ce63c21d6aeb6ad118743c6a9f9cdff59dd9375dcac6ed7a4ee671a
hovercard-subject-tagissue:3426405029
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/19845/issue_layout
twitter:imagehttps://opengraph.githubassets.com/94e81db52a8706f314b0ca17c2e0e46a445d0a69e160ca6c36952a4f37d037a6/coder/coder/issues/19845
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/94e81db52a8706f314b0ca17c2e0e46a445d0a69e160ca6c36952a4f37d037a6/coder/coder/issues/19845
og:image:altDescription Migrate API keys from a single scope column to scopes api_key_scope[] and add allow_list text[] supporting entries like workspace:, template:*, or *:*. Default/backfill existing r...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameThomasK33
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/19845#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F19845
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F19845
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/19845
Reloadhttps://github.com/coder/coder/issues/19845
Reloadhttps://github.com/coder/coder/issues/19845
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/19845
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/19845
Chorehttps://github.com/coder/coder/issues?q=type:"Chore"
#19861https://github.com/coder/coder/pull/19861
Database Migrations: scopes array + typed allow-listhttps://github.com/coder/coder/issues/19845#top
#19861https://github.com/coder/coder/pull/19861
https://github.com/ThomasK33
https://github.com/ThomasK33
ThomasK33https://github.com/ThomasK33
on Sep 17, 2025https://github.com/coder/coder/issues/19845#issue-3426405029
ThomasK33https://github.com/ThomasK33
on Sep 17, 2025https://github.com/coder/coder/issues/19845#event-19751161840
API Key Scopes — Implementation Epic #19842https://github.com/coder/coder/issues/19842
ThomasK33https://github.com/ThomasK33
on Sep 17, 2025https://github.com/coder/coder/issues/19845#event-19751408141
Build-time check: DB enum contains all RBAC scopes #19846https://github.com/coder/coder/issues/19846
Built-in low-level scope catalog (resource:action) #19847https://github.com/coder/coder/issues/19847
ThomasK33https://github.com/ThomasK33
on Sep 17, 2025https://github.com/coder/coder/issues/19845#event-19754984917
matifalihttps://github.com/matifali
Chorehttps://github.com/coder/coder/issues?q=type:"Chore"
on Sep 22, 2025https://github.com/coder/coder/issues/19845#event-19833434501
ThomasK33https://github.com/ThomasK33
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#19861https://github.com/coder/coder/pull/19861
on Sep 22, 2025https://github.com/coder/coder/issues/19845#event-19845478447
ThomasK33https://github.com/ThomasK33
on Sep 22, 2025https://github.com/coder/coder/issues/19845#event-19845478847
feat: implement API key scopes database migration (#19861)https://github.com/coder/coder/commit/fb0ce389a6ceb8b9022e608ac23ab4f791b871c8
#19861https://github.com/coder/coder/pull/19861
https://docs.github.com/articles/closing-issues-via-commit-messages
fb0ce38https://github.com/coder/coder/commit/fb0ce389a6ceb8b9022e608ac23ab4f791b871c8
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/19845
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/19845
ThomasK33https://github.com/ThomasK33
Chorehttps://github.com/coder/coder/issues?q=type:"Chore"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.