Skip to content

Commit 4338574

Browse files
committed
control plane: service accounts and API keys
Restacked onto greg/refresh-token-exchange, which carries the refresh-token GraphQL operations, the /api/v1/auth/token endpoint, and stateful bearer authentication that this branch previously bundled. This commit squashes the prior branch history (PR feedback, tenant filtering, revocation semantics, SHA-256 key hashing) into the remaining service-account delta: - internal.service_accounts and internal.api_keys tables. A service account is a non-login auth.users identity whose access is determined solely by its user_grants; its prefix is a management anchor determining who may manage it. - GraphQL operations: serviceAccounts query (tenant-filterable, paginated, with batch-loaded API keys), createServiceAccount, revokeServiceAccountGrants (the kill switch), createApiKey, revokeApiKey. - api_key grant on POST /api/v1/auth/token: verifies flow_sa_ keys against SHA-256 hashes and mints access tokens in the application layer. - ManageServiceAccounts orthogonal capability, bundled into TeamAdmin; authorized_prefixes gains a tenant filter that narrows (never widens) the caller's authorized set. - Service-account principals are denied refresh tokens, and SA synthetic emails are excluded from Stripe billing-contact selection.
1 parent 73d3226 commit 4338574

25 files changed

Lines changed: 2265 additions & 158 deletions

.sqlx/query-0345fdd9f047293893754d1bf49b62401abbe3a835320ea4373bcb80eae68620.json

Lines changed: 60 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-1197b10e75effb22aafe3e2487d7d6beb7bb1771d44e7d4afc541aa3aa2c7cda.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-1763b8eddee841679706a3c07cc5842512a7f739403af5ad6d6a45659152b7f2.json

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-28dfc47ac91ce4fa75b3ebfce2f7dfe8c7e758753e5dab63c24cc066e9ddc460.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-3ca07bc1e85a922a7b12de7a6dfeac5f15d5b8c1e5b01d10874e84710b8768af.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-4579e0bb8f7feeef9dfd6bd3385ff8b29e71847c71895cffae5b4bb193e9ff11.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-45e004513d51bbe95e3b6e6ceff4b0bf4f9a0c8da1830dcd304f5c4157ba2441.json

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-629063373c60c75e6f7f1cb17b7b6438ee7bb6cb9005397703d413f93b6a4c59.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-3284a4b8b8368d36bb286e8aaad6a12642ebfe7815281a62705bd3d7a32e2eb0.json renamed to .sqlx/query-7903341c9acaf216eafd315680b31fbe471070810a12f453b3e26b4f1cd70fcc.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-89315611b850f3d56961abaf9a32928b9fe23e87b813aabc3b6e0a834f7f06fb.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)