Skip to navigation

Set up Jwks Auth for an HTTP connector

View as Markdown

Not OAuth. Moveworks signs a JWT with a key it manages and rotates for you, and sends it in each API request as Authorization: Bearer <jwt>. The API checks the signature using the public keys Moveworks publishes at your org’s JWKS URL. Use it when the API verifies JWTs against a JWKS URL. Rotation is covered in How keys rotate.

Looking for the OAuth 2.0 Jwks Grant?

If your provider’s docs give a token URL or the jwt-bearer grant type, use the Jwks Grant; the key setup and JWKS URL on this page apply to it too.

Jwt Auth or Jwks Auth?

Both send the signed JWT directly as Authorization: Bearer <jwt>. They differ in who holds the key:

OptionSigning keyHow the API verifies itKey rotation
Jwt AuthYour private key or secret, uploaded to the connectorWith the public key or shared secret you give itManual: upload a new key and update the API
Jwks AuthA Moveworks-managed RSA keyAt your org’s JWKS URLAutomatic, on the rotation interval

Configure Jwks Auth

  1. Select Jwks Auth from the Auth Config dropdown.

  2. Under Jwks Auth Jwks, select Generate JWKS to generate the public and private key pair.

    Auth Config set to Jwks Auth, with the Generate JWKS button under Jwks Auth Jwks and the rotation grace period and rotation interval fields below it.

  3. Fill in the fields:

    FieldDescription
    Rotation grace period (hours), default 0In hours; both keys are served during grace. If you leave it at 0, Moveworks uses a 50-minute grace period.
    Rotation interval (days), default 30In days; how often to rotate keys.
    Jwks Auth Claims Expiry SecondsThis sets the exp claim at iat + expiry_seconds.
    Jwks Auth Claims IssuerSent as iss claim.
    Jwks Auth Claims AudienceSent as aud claim.
    Jwks Auth Claims SubjectSent as sub claim.
    Enable JTI claimSelect it to include a unique jti (JWT ID) claim in each generated token.
    Jwks Auth HeadersOptional JWT header claims such as typ. Don’t add kid; the managed key’s kid is added automatically.
    Jwks Auth Additional ClaimsOptional JWT payload claims like scope or name.
    Assertion Key (optional)Leave blank. It applies only when the JWT is exchanged for an access token with the Jwks Grant.
  4. Save the connector.

Give the API your JWKS URL

The system you’re calling verifies each JWT against your org’s public keys. Give it this URL, using the same host as your Tool Studio URL (not the -chat host):

https://<your-org-host>/.well-known/jwks.json

For example, https://acme.moveworks.com/.well-known/jwks.json.

The verifier should:

  • Always select the verification key by the JWT kid header.
  • Cache JWKS responses per its policy, but refresh on signature failures or at reasonable intervals.
  • During rotation, accept tokens signed with either the current or next kid until the grace period ends. Moveworks publishes the next key for the whole grace period before it starts signing with it, so refreshing the JWKS at least that often avoids failures.

Confirm it works

  1. Open your JWKS URL. A 200 OK response with { "keys": [ JWK, ... ] } means the keys are published.

  2. Test an action that uses the connector. Each request carries the signed JWT:

    curl -X GET "https://api.example.com/data" \
    -H "Authorization: Bearer $JWT_ASSERTION"

How the JWT is signed

  • Key type: RSA 2048, signed with RS256
  • JWK fields: kty, kid, n, e, x5c (self-signed certificate, 1-year TTL), x5t
  • Claims: iss, sub, aud, iat, exp plus any additional claims

Jwks Auth Claims Subject accepts the same per-user template as Jwt Auth, such as {{ user.email_addr }}.

Example JWKS response:

{
"keys": [
{
"kty": "RSA",
"kid": "current-key-id",
"n": "...base64url modulus...",
"e": "AQAB",
"x5c": ["...base64 DER certificate..."],
"x5t": "..."
},
{
"kty": "RSA",
"kid": "next-key-id",
"n": "...",
"e": "AQAB",
"x5c": ["..."],
"x5t": "..."
}
]
}

How keys rotate

  • Publication: The JWKS service serves the union of current and next JWKs for the org at /.well-known/jwks.json. The response includes every JWKS key in the org, including other connectors’ and webhooks’ keys, so always select by kid.
  • Rotation inputs: Rotation interval (days) and Rotation grace period (hours).
  • Grace period: when the rotation interval passes, a new key is published as next while signing continues with the current key. When the grace window ends, signing switches to the new key. Verifiers must accept tokens signed by either kid until the grace window ends.

The verifier first caches the current key, then accepts both keys during the grace window, then only the new key:

Troubleshoot Jwks Auth

  • 404 from the JWKS URL: The org has no JWKS configured, or the URL’s host isn’t your Tool Studio host. Check that the URL uses your Tool Studio host, then select Generate JWKS on the connector and save it.
  • 429 from the JWKS URL: The endpoint rate limits excessive requests. Back off and retry with exponential backoff.
  • Parsing errors in keys: Ensure the verifier’s JWK parsing follows the spec (kty, kid, n, e, optional x5c).