Skip to main content

keys

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

Overview

Namekeys
TypeResource
Idokta.idps.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_keysselectsubdomainafter, limitLists all identity provider (IdP) key credentials
get_identity_provider_keyselectsubdomainRetrieves a specific identity provider (IdP) key credential by kid
create_identity_provider_keyinsertsubdomain, data__x5cCreates a new X.509 certificate credential in the identity provider (IdP) key store
> Note: RSA-based certificates are supported for all IdP types. Okta currently supports EC-based certificates only for the X509 IdP type. For EC-based certificates we support only P-256, P-384, and P-521 curves.
replace_identity_provider_keyreplacesubdomainReplaces an identity provider (IdP) key credential by kid
delete_identity_provider_keydeletesubdomainDeletes a specific identity provider (IdP) key credential by kid if it isn't currently being used by an active or inactive IdP

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)
afterstringThe cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination.
limitintegerA limit on the number of objects to return

SELECT examples

Lists all identity provider (IdP) key credentials

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

INSERT examples

Creates a new X.509 certificate credential in the identity provider (IdP) key store
> Note: RSA-based certificates are supported for all IdP types. Okta currently supports EC-based certificates only for the X509 IdP type. For EC-based certificates we support only P-256, P-384, and P-521 curves.

INSERT INTO okta.idps.keys (
data__x5c,
subdomain
)
SELECT
'{{ x5c }}' --required,
'{{ subdomain }}'
RETURNING
created,
e,
expiresAt,
kid,
kty,
lastUpdated,
n,
use,
x5c,
x5t#S256
;

REPLACE examples

Replaces an identity provider (IdP) key credential by kid

REPLACE okta.idps.keys
SET
data__e = '{{ e }}',
data__kid = '{{ kid }}',
data__kty = '{{ kty }}',
data__n = '{{ n }}',
data__use = '{{ use }}',
data__x5c = '{{ x5c }}',
data__x5t#S256 = '{{ x5t#S256 }}'
WHERE
subdomain = '{{ subdomain }}' --required
RETURNING
created,
e,
expiresAt,
kid,
kty,
lastUpdated,
n,
use,
x5c,
x5t#S256;

DELETE examples

Deletes a specific identity provider (IdP) key credential by kid if it isn't currently being used by an active or inactive IdP

DELETE FROM okta.idps.keys
WHERE subdomain = '{{ subdomain }}' --required;