Skip to content

app/: user:set-staff revokes admin connections through OAuth::disconnect_resource, not raw SQL (sc-8900) - #157

Merged
ndbroadbent merged 1 commit into
mainfrom
staff-revoke-disconnect-resource
Dec 4, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
staff-revoke-disconnect-resource

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #146: user:set-staff --staff false revoked a demoted staff member's admin connections with SQL against oauth-provider-laravel's tables (oauth_tokens, oauth_codes, oauth_families), which a schema change in that crate could silently break. It now calls the crate's own OAuth::disconnect_resource(subject, resource) (new in oauth-provider 0.1.4 / oauth-provider-laravel 0.1.2), which the crate's storage conformance suite covers on PostgreSQL, MySQL and SQLite.

  • revoke_admin_connections revokes per admin resource (/mcp/admin, the only resource that grants admin): every admin resource in the OAuth config plus mcp::admin::resource(), deduplicated. The count is still connections ended (Revoked::families), including a code-only connection, so the command's output is unchanged.
  • auth::oauth::is_admin_resource is public for that.
  • oauth-provider 0.1.3 → 0.1.4, oauth-provider-laravel =0.1.1 → =0.1.2 (Cargo.lock: only those and oauth-provider-axum/-mcp).
  • user_set_staff_false_revokes_admin_connections: the same assertions (admin token and pending admin code revoked, the mcp connection kept, "2 admin connections revoked", then "0"). Its fixture rows now carry real resources (the admin token and code on the admin resource, the mcp token on /mcp) instead of an admin-scoped token on /mcp, which the server never issues and which revoking by resource rightly leaves alone.

Gates on the build pool (docspring-dev), against a fresh postgres:17 and the existing blob store on 59000: cargo fmt --all --check, cargo clippy --locked --workspace --all-targets -- -D warnings, cargo test --locked -p visualci-app (staff_commands 7/7, the whole app suite green).

Not merging: the coordinator merges under the lock.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@ndbroadbent
ndbroadbent force-pushed the staff-revoke-disconnect-resource branch from 6fec65d to 89f50cb Compare December 4, 2026 00:19
@visualci-com

visualci-com Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #319 · 361 unchanged · no changes

This PR vs base: 16 changed, 20 added since #251, across 5 builds

docspring/visualci · journeys · build #317 · 28 unchanged · no changes

This PR vs base: 5 changed, 11 added since #248, across 5 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

…th-provider-laravel 0.1.2's OAuth::disconnect_resource, not SQL against its tables (sc-8900)
@ndbroadbent
ndbroadbent force-pushed the staff-revoke-disconnect-resource branch from ba472f1 to c7980b6 Compare December 4, 2026 02:18
@ndbroadbent
ndbroadbent merged commit 925b7f6 into main Dec 4, 2026
15 checks passed
@ndbroadbent
ndbroadbent deleted the staff-revoke-disconnect-resource branch December 4, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant