Skip to content

Private Key JWT reference

Overview

This reference guide covers the technical details of Private Key JWT authentication for OAuth clients in Qlik Cloud. For a step-by-step tutorial, see Authenticate with Private Key JWT.

Private Key JWT allows OAuth applications to authenticate using asymmetric cryptography (public/private key pairs) instead of shared secrets.

Supported algorithms

Qlik Cloud accepts public keys using the following signing algorithms:

AlgorithmKey TypeMin Key SizeDescription
RS256RSA2048 bitsRSASSA-PKCS1-v1_5 with SHA-256
RS512RSA2048 bitsRSASSA-PKCS1-v1_5 with SHA-512
ES384ECN/AECDSA with P-384 curve and SHA-384
Warning

RSA keys must be at least 2048 bits. For long-term production keys, 4096 bits is recommended.

JWT assertion structure

When your application requests a token, it creates a JWT assertion with the following structure.

Required JWT claims

ClaimValueNotes
iss (issuer)Your OAuth client IDMust match the client ID registered in Qlik Cloud
sub (subject)Your OAuth client IDMust match the iss claim
aud (audience)https://<TENANT>.qlikcloud.com/oauth/tokenThe token endpoint URL. No trailing slash.
jti (JWT ID)Universally unique identifier (UUID)Generate a new UUID for each token request
iat (issued at)Unix timestampWhen the assertion was issued (seconds since epoch)
exp (expiration)Unix timestampWhen the assertion expires (max 5 minutes after iat)

JWT headers

HeaderValueRequiredNotes
algRS256, RS512, or ES384YesMust match your private key type
kidKey IDYesIdentifier for tracking key versions

Example JWT payload

{
"iss": "my-oauth-client-id",
"sub": "my-oauth-client-id",
"aud": "https://my-tenant.qlikcloud.com/oauth/token",
"jti": "550e8400-e29b-41d4-a716-446655440000",
"iat": 1712525123,
"exp": 1712525423
}

JSON Web Key (JWK) format

Register your public key in JWK format with your OAuth client. The JWK must include the signing algorithm and usage metadata.

JWK field reference

FieldRSAECRequiredDescription
kidN/AN/AYesIdentifier for the key, used for tracking and rotation
ktyRSAECYesKey type: "RSA" or "EC"
algRS256, RS512ES384YesSigning algorithm that must match the private key
eYes (RSA)RSA exponent (typically "AQAB")
usesigsigYesKey usage: must be "sig" (signing)
nYes (RSA)RSA modulus (base64url-encoded)
crvYes (EC)Elliptic curve: For ES384, use "P-384"
xYes (EC)EC X coordinate (base64url-encoded)
yYes (EC)EC Y coordinate (base64url-encoded)

RSA example (RS256)

{
"kid": "my-key-1",
"kty": "RSA",
"alg": "RS256",
"e": "AQAB",
"use": "sig",
"n": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMstn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw"
}

EC example (ES384)

{
"kid": "my-ec-key-1",
"kty": "EC",
"alg": "ES384",
"crv": "P-384",
"use": "sig",
"x": "gI0GAILBdu7-ViNS8tBj...",
"y": "SLrelm8_SWcV8uAPAVLV..."
}
Was this page helpful?