Do we need our own JWKS endpoint and can we use Azure or Entra?

John Wade -

Short answer: Yes, you need a JWKS endpoint. You sign your client assertion and subject token with your own private keys and host the matching public keys at an HTTPS address we can reach. Entra ID can't sign the client assertion for you, so you need your own signing step whatever your architecture.

What the endpoint needs

  • An HTTPS address that doesn't change and that our authentication service can reach.
  • Valid JSON with a keys array holding your public keys only. Never publish a private key, or send one to us.
  • Served as application/json. Raw GitHub file links (raw.githubusercontent.com) are served as plain text and can't be read.
  • A kid on each key that matches the kid in your token headers.
  • alg is optional. If a key includes it, it must match the alg your tokens use (RS256 or RS512).

One endpoint can hold the keys for both your client assertion and your subject token. Beta and production need separate keys and endpoints.

Hosting it

We don't have a reference architecture for this. Your cloud and security teams know your standards best, so any approach they're comfortable with works if it meets the requirements above, for example a static file in cloud storage, a web server or GitHub Pages.

Azure and Entra ID

Entra ID can't create and sign the client assertion for you, so you'll need a signing step of your own, for example a function that signs with a key held in a key vault. If your subject tokens are issued by Entra ID, you can register Entra's published keys address for the subject token. Those keys have no alg field, which is fine.

Restricting access by IP address

Our authentication service fetches your JWKS from fixed IP addresses, so you can allow only these:

Environment IP addresses
Beta 18.132.26.52, 18.170.150.151, 3.11.111.47
Production 18.133.179.145, 18.170.150.151, 3.11.111.47

Rotating keys

Publish the new public key next to the old one with a new kid, start signing with the new key, then remove the old one once nothing uses it. You don't need to tell us.

Token claims and format: API access with auto-enrolment. Errors: Why is our token exchange failing?

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk