Skip to main content

keys

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

Overview​

Namekeys
TypeResource
Idokta.authorizationservers.keys

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
algstringThe algorithm used with the Key. Valid value: RS256
estringRSA key value (public exponent) for Key binding
kidstringUnique identifier for the key
ktystringCryptographic algorithm family for the certificate's keypair. Valid value: RSA
nstringRSA modulus value that is used by both the public and private keys and provides a link between them
statusstringAn ACTIVE Key is used to sign tokens issued by the authorization server. Supported values: ACTIVE, NEXT, or EXPIRED
A NEXT Key is the next Key that the authorization server uses to sign tokens when Keys are rotated. The NEXT Key might not be listed if it hasn't been generated. An EXPIRED Key is the previous Key that the authorization server used to sign tokens. The EXPIRED Key might not be listed if no Key has expired or the expired Key was deleted.
usestringAcceptable use of the key. Valid value: sig

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_authorization_server_keyselectauthServerId, keyId, subdomainRetrieves an Authorization Server Key specified by the keyId
list_authorization_server_keysselectauthServerId, subdomainLists all of the current, future, and expired Keys used by the Custom Authorization Server
rotate_authorization_server_keysexecauthServerId, subdomainRotates the current Keys for a Custom Authorization Server. If you rotate Keys,
the ACTIVE Key becomes the EXPIRED Key, the NEXT Key becomes the ACTIVE Key,
and the Custom Authorization Server immediately begins using the new active
Key to sign tokens.

> Note: Okta rotates your Keys automatically in AUTO mode. You can rotate Keys
yourself in either mode. If Keys are rotated manually, you should invalidate any intermediate cache.
and fetch the Keys again using the Keys endpoint.

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
authServerIdstringid of the Authorization Server
keyIdstringid of the certificate key
subdomainstring(default: my-org)

SELECT examples​

Retrieves an Authorization Server Key specified by the keyId

SELECT
_links,
alg,
e,
kid,
kty,
n,
status,
use
FROM okta.authorizationservers.keys
WHERE authServerId = '{{ authServerId }}' -- required
AND keyId = '{{ keyId }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;

Lifecycle Methods​

Rotates the current Keys for a Custom Authorization Server. If you rotate Keys,
the ACTIVE Key becomes the EXPIRED Key, the NEXT Key becomes the ACTIVE Key,
and the Custom Authorization Server immediately begins using the new active
Key to sign tokens.

> Note: Okta rotates your Keys automatically in AUTO mode. You can rotate Keys
yourself in either mode. If Keys are rotated manually, you should invalidate any intermediate cache.
and fetch the Keys again using the Keys endpoint.

EXEC okta.authorizationservers.keys.rotate_authorization_server_keys
@authServerId='{{ authServerId }}' --required,
@subdomain='{{ subdomain }}' --required
@@json=
'{
"use": "{{ use }}"
}'
;