temper-api at POST /internal/saml/reconcile to reconcile the user's team membershipscrates/temper-api/src/middleware/internal_auth.rs (the HMAC gate),crates/temper-api/src/handlers/internal_saml.rs (the handler). Operator setup:HMAC-SHA256(secret, "{timestamp}.{raw_body}") and sends tworequire_internal_signature) recomputes the MAC over the bytes it receivedtemper_core::internal_sig::MAX_SKEW_SECS); a replayed request is stale.| Header | Value |
|---|---|
X-Temper-Timestamp | Unix seconds the signature was computed at |
X-Temper-Signature | lowercase-hex HMAC-SHA256(secret, "{timestamp}.{body}") |
INTERNAL_RECONCILE_SECRET is unset the endpoint is disabled andX-Hub-Signature-256, Stripe). The signing scheme lives once intemper_core::internal_sig (shared home for the header names, the message format, and thepackages/temper-cloud/src/oauth/reconcile.ts) and the Rustinternal_sig.rs and tests/oauth/wire-contract.test.ts), so they cannot drift on the HMACcrates/temper-api/tests/internal_saml_test.rs.INTERNAL_RECONCILE_SECRET of ≥32 random bytesopenssl rand -hex 32). temper admin saml provision generates a strong one.fetch sends no meaningful Origin. Origin is a browserOrigin header to allow-list.idp memberships. Theresolve_federated_human — this endpoint was the third site hand-building aPrincipalKind::Human, and a surface that can construct one can forge one.classify and the email ladder — the email is asserted, not resolved — and onlyprovider is server config, never a payload field. The seam is handedstate.config.auth_provider_name, so the profile this endpoint resolves is the same oneauthenticate_token will resolve the AS's freshly minted token to. A payload-suppliedresolve_human_from_claims's machine-shape guard is@clients-suffixedexternal_user_id is refused here exactly as it is everywhere else.kb_saml_group_mappings — never arbitrarynative memberships (added in-app or by join-request approval) orsource='idp' rows.idp memberships, not an escalation of an existing one.internal/superpowers/specs/2026-07-02-shared-auth-orchestration-seam-design.md