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
list_identity_provider_signing_keysselectsubdomainLists all signing key credentials for an identity provider (IdP)
get_identity_provider_signing_keyselectsubdomainRetrieves a specific identity provider (IdP) key credential by kid
generate_identity_provider_signing_keyinsertvalidityYears, 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, 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
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)
targetIdpIdstringid of the target IdP
validityYearsinteger (int32)expiry of the IdP key credential

SELECT examples

Lists all signing key credentials for an identity provider (IdP)

SELECT
created,
e,
expiresAt,
kid,
kty,
lastUpdated,
n,
use,
x5c,
x5t#S256
FROM okta.idps.signing_keys
WHERE 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,
subdomain
)
SELECT
'{{ validityYears }}',
'{{ 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,
@subdomain='{{ subdomain }}' --required
;