Skip to main content

signing_keys

Creates, updates, deletes, gets or lists a signing_keys resource.

Overview​

Namesigning_keys
TypeResource
Idokta.idps.signing_keys

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
createdstring (date-time)Timestamp when the object was created (example: 2016-01-03T18:15:47.000Z)
estringThe exponent value for the RSA public key (example: AQAB)
expiresAtstring (date-time)Timestamp when the object expires (example: 2016-01-03T18:15:47.000Z)
kidstringUnique identifier for the key (example: your-key-id)
ktystringIdentifies the cryptographic algorithm family used with the key (example: RSA)
lastUpdatedstring (date-time)Timestamp when the object was last updated (example: 2016-01-03T18:15:47.000Z)
nstringThe modulus value for the RSA public key (example: 101438407598598116085679865987760095721749307901605456708912786847324207000576780508113360584555007890315805735307890113536927352312915634368993759211767770602174860126854831344273970871509573365292777620005537635317282520456901584213746937262823585533063042033441296629204165064680610660631365266976782082747)
usestringIntended use of the public key (example: sig)
x5carrayBase64-encoded X.509 certificate chain with DER encoding
x5t#S256stringBase64url-encoded SHA-256 thumbprint of the DER encoding of an X.509 certificate (example: wzPVobIrveR1x-PCbjsFGNV-6zn7Rm9KuOWOG4Rk6jE)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_identity_provider_signing_keyselectidpId, kid, subdomainRetrieves a specific identity provider (IdP) key credential by kid
list_identity_provider_signing_keysselectidpId, subdomainLists all signing key credentials for an identity provider (IdP)
generate_identity_provider_signing_keyinsertvalidityYears, idpId, subdomainGenerates a new X.509 certificate for an identity provider (IdP) signing key credential to be used for signing assertions sent to the IdP. IdP signing keys are read-only.
> Note: To update an IdP with the newly generated key credential, update your IdP using the returned key's kid in the signing credential.
clone_identity_provider_keyexectargetIdpId, idpId, kid, subdomainClones an X.509 certificate for an identity provider (IdP) signing key credential from a source IdP to target IdP
> Caution: Sharing certificates isn't a recommended security practice.

> Note: If the key is already present in the list of key credentials for the target IdP, you receive a 400 error response.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idpIdstringid of IdP
kidstringUnique id of the IdP key credential
subdomainstring(default: my-org)
targetIdpIdstringid of the target IdP
validityYearsinteger (int32)expiry of the IdP key credential

SELECT examples​

Retrieves a specific identity provider (IdP) key credential by kid

SELECT
created,
e,
expiresAt,
kid,
kty,
lastUpdated,
n,
use,
x5c,
x5t#S256
FROM okta.idps.signing_keys
WHERE idpId = '{{ idpId }}' -- required
AND kid = '{{ kid }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;

INSERT examples​

Generates a new X.509 certificate for an identity provider (IdP) signing key credential to be used for signing assertions sent to the IdP. IdP signing keys are read-only.
> Note: To update an IdP with the newly generated key credential, update your IdP using the returned key's kid in the signing credential.

INSERT INTO okta.idps.signing_keys (
validityYears,
idpId,
subdomain
)
SELECT
'{{ validityYears }}',
'{{ idpId }}',
'{{ subdomain }}'
RETURNING
created,
e,
expiresAt,
kid,
kty,
lastUpdated,
n,
use,
x5c,
x5t#S256
;

Lifecycle Methods​

Clones an X.509 certificate for an identity provider (IdP) signing key credential from a source IdP to target IdP
> Caution: Sharing certificates isn't a recommended security practice.

> Note: If the key is already present in the list of key credentials for the target IdP, you receive a 400 error response.

EXEC okta.idps.signing_keys.clone_identity_provider_key
@targetIdpId='{{ targetIdpId }}' --required,
@idpId='{{ idpId }}' --required,
@kid='{{ kid }}' --required,
@subdomain='{{ subdomain }}' --required
;