Convert an RSA public key (base64-encoded DER, the “Public key” that
Keycloak shows for a realm key) into ONE JWK, an entry of C_AUTHZ’s
jwks. The issuer string becomes the key’s kid: give the
issuer (iss) of the tokens, never *. The JWK is printed to stdout.
(Source dir: utils/c/pkey_to_jwks.)
Usage¶
keycloak_pkey_to_jwks --iss <issuer> <base64-der-public-key>| Option | Purpose |
|---|---|
--iss | Issuer of the tokens (the realm’s URL), used as the JWK kid. Required. |
Example:
keycloak_pkey_to_jwks --iss https://auth.example.com/realms/example MIIBIjANBgkq...{
"kid": "https://auth.example.com/realms/example",
"description": "",
"use": "sig",
"kty": "RSA",
"alg": "RS256",
"n": "<base64url modulus>",
"e": "AQAB"
}See also¶
Auth, permissions, TLS — how Yuneta uses JWKS for JWT verification.