- The app registration — your
client_idandclient_secretwith the provider. One per bucket and service. - A user connection — one person’s grant against that registration. Many per registration.
Register the OAuth app
This is an immediate admin action. Noworkspace.yaml field, no plan or apply — it takes effect on save.
--client-id, --client-secret, or --redirect-uri flags. The whole registration is one ;-delimited value, and the key names must be exactly client_id, client_secret, and redirect_uri.
Every field is required the first time. Afterwards, omitting a field leaves it unchanged — so rotating just the redirect URI does not mean resupplying the secret. A key present but blank (
client_secret=) is rejected as an attempt to erase a credential. Omitted means “leave as-is”; blank means “make it empty,” and only one of those is allowed.connect set flags
Check what is registered
auth_type, auth_name, enabled, and redirect_uri in plaintext, plus has_client_id and has_client_secret as booleans — never the decrypted values.
This is the only way to check registration state. bucket services shows a count, and workspace.yaml and workspace sync do not reflect it at all, because app registration was deliberately kept out of the declarative surface.
Connect a user
--scope to request the service’s declared scope catalogue. OIDC subsets must include openid.
workspace service connect flags
That
--user-ref is the same value your application later sends as endUserRef, or an agent sends as X-Fused-End-User-Ref. Keep it stable.
Refresh happens without you
Nobody refreshes a token through the CLI or the SDK. The Engine refreshes eligible connections at startup and hourly, scheduling from whichever expires first. An expired access token is not a reconnect — the Engine can rotate it while the refresh token is still good. A connection becomesreconnect_required only when refresh material is missing, expired, revoked, or rejected. Then you run the same connect flow again for that bucket, service, auth name, and user reference.
One user, several tenants
A single OAuth token can front several provider sites, shops, or accounts. The Engine discovers them and picks a default when there is exactly one.X-Fused-Resource-ID or resourceId, or it fails with a structured ambiguity error. rediscover drops resources the provider no longer returns; if the default disappears, selection falls back to the ordinary rules rather than routing to a stale tenant.
Who has connected
workspace connection resources, which is about one already-connected user’s reachable tenants.
Share the bucket
Let other teams select this bucket without handing them its contents.