Every request made to Turnkey must include a signature over the POST body attached as a HTTP header. Our secure enclave applications use this signature to verify the integrity and authenticity of the request.
signature
(DER-encoded)signature
publicKey
: the public key of API key, note that only P-256 keys (API_KEY_CURVE_P256) are currenlty supportedsignature
: the signature produced by the API keyscheme
: SIGNATURE_SCHEME_TK_API_P256
X-Stamp
header{"organization_id": "1234", "type": "ACTIVITY_TYPE_CREATE_API_KEYS", "params": {"for": "example"}
, the webauthn challenge is the string 7e8b4653fc7e51dc119cea031942f4693b4742ceca4dda269b925802b38b2147
TextEncoder().encode("7e8b4653fc7e51dc119cea031942f4693b4742ceca4dda269b925802b38b2147")
)credentialId
: the id of the webauthn authenticatorauthenticatorData
: the authenticator data produced by Webauthn assertionclientDataJson
: the client data produced by the Webauthn assertionsignature
: the signature produced by the Webauthn assertionX-Stamp-Webauthn
headerX-Stamp-Webauthn
and X-Stamp-WebAuthn
are considered equivalent)
X-Stamp-Webauthn: {"authenticatorData":"UaQZ...","clientDataJson":"eyJ0...","credentialId":"Grf...","signature":"MEQ..."}
--no-post
option to generate stamps without sending anything over the network. This is a useful tool should you have trouble with debugging stamping-related logic. A sample command might look something like: