Request a token
Send aPUT request:
PUT /latest/api/token form follow the standard IMDS layout.
The signed-JWT JSON response is part of Mount Thor’s machine-identity
contract.
expires_in is the number of seconds for which the token is valid. Request a
new token after it expires rather than storing it for reuse.
Verify the token
access_token is a JWT. A synthetic example looks like this after decoding;
the values are illustrative and the signature is not shown in full:
iss claim in the JWT payload. It identifies the service
that signed the token. It is not supplied separately in the HTTP response.
Before trusting the token:
- Read the token’s
issclaim and check it against the issuer you expect. - Fetch that issuer’s public keys from
https://<issuer>/.well-known/jwks.json. - Verify the JWT signature with those keys.
- Check the issuer, expected audience, expiry, and machine identity claims.
Errors
503: the Mac cannot currently provide a machine identity token. No unsigned token is returned.