Setup JSON Web Key Store (JWKS)
Last updated
Last updated
Singpass uses JSON Object Signing and Encryption (JOSE) standards to ensure the security and integrity of data transmitted during authentication and authorization processes. The technologies involved signing using JSON Web Signature (JWS) and optionally encrypted using JSON Web Encryption (JWE).
The relying party (RP) is expected to generate a set of asymmetric private and public keys and provide the public keys to Singpass in JSON Web Key (JWK) format. JWK format provides a standard JSON representation for cryptographic keys which will be used in the following (non-exhaustive) scenarios in the later steps:
Signature JWK used to verify the signature of the client assertion JWT presented during the token request
Encryption JWK is used to encrypt an ID token. This is mandatory if the requires both UUID and NRIC
Generate a set of asymmetric private and public keys for signing. The signature JWK should have the following attributes:
Below is an example of an EC signing key using P-256 and a key ID "sig-2024"
for kid generated via Mkjwk.
Do not use these sample signing keys for actual integration as the private key has been exposed.
Below is an example of an EC encryption key using P-256, alg ECDH-ES+A128KW, and a key ID "enc-2024" for kid generated via Mkjwk.
Do not use these sample signing keys for actual integration as the private key has been exposed.
Paste the keys in the following format to the JWKS verifier:
Example of Both Signature and Signing JWK
Click Verify to verify the JSON Web Key Set (JWKS) provided meets the Singpass's requirement.
If you passed the verification, your JSON Web Key Sets (JSON) are ready to be used for the later steps.
Must have key ”use” of value ”sig”.
Must have key “kid” field with a key id. Will be used by Singpass to select the relevant key to verify the client assertion.
Generate a set of asymmetric private and public keys for encryption. This is mandatory only if the requires both UUID and NRIC. Else can proceed to step 3.
Must have key ”use” of value ”enc”.
Must have key “kid” field with a key id. Will be used by Singpass to select the relevant key to verify the client assertion.
Must have key “crv” of value: P-256, P-384 or P-521.
Must have key “alg” of value: ECDH-ES+A128KW, ECDH-ES+A192KW, or ECDH-ES+A256KW.
Use to verify whether the keys generated meet Singpass's requirements.
The JWKS verifier can only validate the JWK if it's provided in a valid JSON format. is an example of an online JSON formatter.
Configure your Singpass Application via the
If you have already configured it, proceed to call the