Page created: 31 Aug 2020
|
Page updated: 9 Feb 2021
The following example configures a JWT access token validator to use a locally stored public signing certificate to validate access token signatures. The signing certificate is assumed to have been obtained out of band and must be a PEM-encoded X.509v3 certificate.
# Add the public signing certificate to the server configuration
dsconfig create-trusted-certificate \
--certificate-name "JWT Signing Certificate" \
--set "certificate</path/to/signing-certificate.pem"
# Create the Access Token Validator
dsconfig create-access-token-validator \
--validator-name "JWT Access Token Validator" \
--type jwt \
--set enabled:true \
--set evaluation-order-index:1000 \
--set allowed-signing-algorithm:RS256 \
--set "trusted-certificate:JWT Signing Certificate"
# Match the token's subject (sub) claim to the uid attribute
# of a SCIM resource
dsconfig create-token-resource-lookup-method \
--validator-name "JWT Access Token Validator" \
--method-name "User by uid" \
--type scim \
--set scim-resource-type:Users \
--set 'match-filter:uid eq "%sub%"' \
--set evaluation-order-index:1000