DESIGN_READY_FOR_OPERATOR_REVIEW: Bixby -> central ZITADEL account linking #161
Labels
No labels
bug
design
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/starintel-auto-research#161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Authority / state
starintel-labs/starintel-infra#39starintel-labs/starintel-infra#74starintel-infra#34,#71DESIGN_READY_FOR_OPERATOR_REVIEWThis design is not executable by RAGE until explicit operator implementation approval is recorded.
Goal
Move Bixby signed-in user authorization to the canonical StarIntel ZITADEL issuer at
auth.starintel.actorwithout changing guest Intelligence semantics, inventing a second identity system, or turning the Bixby gateway into an authorization server.Final ownership
ZITADEL /
auth.starintel.actorOwns:
starintel-bixbycapsuleOwns:
authorization.bxbprovider declaration;client-secret-keyname;It owns no password store and stores no client secret in Git.
starintel-bixby-gatewayOwns:
It does not mint human tokens or proxy user passwords.
Owner services
starintel-server, Quasar/Auto-Dig, and other owner services retain final operation-specific authorization and domain mutation authority. The gateway may attenuate authority; it may not expand it.Canonical flow
Exact endpoint paths should be resolved from ZITADEL discovery/config at implementation time rather than duplicated across unrelated StarIntel code, except the Bixby capsule must ultimately contain the concrete HTTPS authorize/token endpoints required by Samsung's contract.
Bixby application/client type
Register one dedicated Bixby client/application in the StarIntel ZITADEL project.
Use Authorization Code. Enable PKCE with S256 where compatible with the current Bixby provider flow. Bixby documentation confirms standard authorization-code + PKCE support and stores the configured client secret on Samsung servers through Developer Center Configuration & Secrets.
The exact Samsung callback URI must be registered literally in ZITADEL. No wildcard production callback.
Scope and audience model
Use stable owner-oriented capability names, not capsule-specific permissions.
Initial requested authorization:
Intelligence signed-in
openiddocuments:read,search:readOperations
starintel.autodig.read;starintel.autodig.control.Operations must not gain
operators/adminsmerely because the account exists or because Bixby login succeeded.Audience must identify the intended StarIntel Bixby/gateway resource boundary. A token minted for another StarIntel app is rejected even if its issuer is valid.
Guest Intelligence invariant
Guest Intelligence remains explicitly unauthenticated/public-safe and keeps its synthetic public-read principal path.
There are two separate request modes:
An invalid/expired/missing-scope token on a signed-in request is an auth failure. It must never silently downgrade to guest execution.
Token validation
Gateway validation must cover:
expand other required temporal claims;Unknown
kidmay trigger one bounded JWKS refresh, then fail closed. Cache lifetime/refresh must be bounded. Do not make every request depend on synchronous introspection.If future revocation requirements demand tighter-than-expiry invalidation, add bounded introspection/revocation policy separately; do not overload the first migration slice.
Delegation into private owner APIs
Do not simply forward the Bixby bearer token everywhere as a universal infrastructure credential.
Gateway calls use the gateway's own least-privilege service identity. Where owner services need the user identity for authorization/audit, pass a typed delegated-principal envelope derived from the validated token under an authenticated internal service contract.
The envelope should carry only required fields such as:
Owner services independently enforce that the gateway is authorized to assert delegated principals and that requested operations fit both service and delegated user authority.
Legacy
starintel-serverOAuth providerTreat the old provider as a compatibility/deprecation concern, not Bixby's canonical issuer.
Before any deletion:
starintel-auto-research#144remains useful historical protocol/threat-model material but is superseded on the identity-authority decision.Configuration / secrets
Infra owns:
auth.starintel.actoringress through Cloudflare -> ord-edge -> mallcop -> identity origin;Samsung Developer Center owns the Bixby-side stored client secret. Secret values never enter Git, issue bodies, Nix derivations, telemetry, or generated client artifacts.
Error contract
Gateway returns stable client-safe authentication outcomes such as:
AUTH_TOKEN_MISSINGAUTH_TOKEN_INVALIDAUTH_TOKEN_EXPIREDAUTH_ISSUER_INVALIDAUTH_AUDIENCE_INVALIDAUTH_SCOPE_REQUIREDAUTH_SUBJECT_INVALIDDo not leak token/JWKS internals or raw ZITADEL errors to Bixby.
Observability
Record safe dimensions only:
Never log access/refresh tokens, authorization codes, client secrets, cookies, PKCE verifier, raw ID token, or user password.
Adversarial review
Rejected:
starintel-serverjust to preserve old URLs;Dependency-ordered proposed implementation slices
All remain AWAITING_OPERATOR_IMPLEMENTATION_APPROVAL.
authorization.bxbwiring — concrete ZITADEL authorize/token endpoints, client ID, Developer Center secret-key reference, scopes and user authorization annotations.Mandatory RED-first targets
Slice 1
On untouched current
starintel-bixby/main, an invariant fixture must fail becausecapsules/starintel-intelligence/auth.requirements.jsonstill namesstarintel-server-core-oauthassignedInAuthority.Expected desired contract: central StarIntel identity authority /
auth.starintel.actor/ ZITADEL.Slice 2
A ZITADEL desired-state fixture with a callback URI different from the exact registered Samsung callback must fail validation. A secret value embedded in Nix/source must fail the secret-leak fixture.
Slice 3
Before production gateway auth changes:
Slice 4
Fixture must prove the gateway cannot call a privileged owner operation using only its service credential when delegated user scope is absent, and cannot elevate delegated capabilities beyond the validated token.
Slice 5
Capsule contract validation must fail if OAuth endpoints are non-HTTPS, the Developer Center secret is in source, or an authenticated endpoint lacks
authorization { user }.Acceptance
auth.starintel.actor/ ZITADEL, not the legacy server provider;Implementation approval
PENDING / AWAITING_OPERATOR_APPROVALOnly the operator may authorize implementation.