The identity stack
Sign-in flow
Sign in with Clerk
Receive a Clerk session
Exchange for AWS credentials
Tag the credential with the organization
Sign AWS calls
Refresh ahead of expiry
Why two systems instead of one
Clerk gives us first-class organization, role, and session management — including hosted MFA and SSO — without us having to operate it. Cognito Identity Pool is the only AWS-native way to convert a third-party JWT into short-term AWS credentials with attribute-based authorization. Wiring the two together means:- We get the user-facing experience and security features of a dedicated identity vendor.
- We get AWS-native enforcement of organization scope at the IAM and KMS layers, not just at the application layer.
- A Clerk session revocation cuts AWS access at the next credential refresh — there is no long-lived AWS key to chase.
Sign-out and revocation
User signs out
Local plaintext is purged
vault:* entry from the OS keychain, including cached plaintext data keys, and zeros the Go sidecar’s in-memory copy.Cached AWS credentials expire
Org admin can force-revoke
Organization isolation
Every record in Studio carries anorgId. Three layers enforce that boundary:
- AppSync custom Lambda authorizer. Every GraphQL request hits a Lambda that validates the Clerk JWT, extracts the active
org_id, and refuses requests where the caller’s organization does not match the requested resource’s organization. - Resolver-level filters. Every list/get/update operation is rewritten so the
orgIdfilter is non-negotiable. Strict mode rejects any query that attempts to filter on a differentorgId; lenient mode (used during the rollout) logs and rewrites. - KMS key policy condition. The per-organization customer master key in KMS will only decrypt for callers whose AWS principal tag
orgIdmatches and whosekms:EncryptionContext:orgIdmatches the wrap. If an encrypted row leaked without a matching key path, its protected fields would remain ciphertext.
Resource-level access inside an organization
Within an organization, resources can be private to a member, shared at an organization or team scope, placed in a channel, explicitly shared, or inherited from a parent. The exact options depend on the resource type.The desktop sidecar’s identity
The Go agent that runs SSH, packet capture, vault operations, and other local capabilities inherits the workstation and signed-in organization context supplied by the desktop app. It is reached over loopback and does not represent a separately authenticated human or organization member. Loopback blocks direct remote-network access but is not a sandbox from other software already running on the workstation. The agent applies origin, identity, approval, and capability checks to supported paths; the endpoint itself remains inside the local device trust boundary. See Agent and local runtime.Federation and SSO
SSO is configured at the Clerk layer per organization. Clerk supports SAML and the major OIDC providers (Microsoft Entra, Google Workspace, Okta). When SSO is in place:- The Clerk session lifetime is governed by the org’s SSO policy.
- MFA is the SSO provider’s MFA, not Clerk’s.
- Sign-out propagates from the SSO provider to Clerk to Studio’s AWS credential cache.