Skip to content

The fleet key lifetimes

GET
/api/nss/key-settings
curl --request GET \
--url https://example.com/api/nss/key-settings \
--header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'

Nss.key_max_lifetime and nss.key_rotation_grace in seconds, so the create form can bound and propose an expiry and the rotate dialog can say when the previous secret stops working. Any session: the two values decide nothing on their own, and every key action is still authorised per key.

The lifetimes

Media typeapplication/json
object
data
required
object
max_lifetime_seconds
required

MaxLifetimeSeconds is nss.key_max_lifetime: the latest a new key may expire, and its expiry when none is given. 0 sets no limit, and a key created without a date then never expires.

integer
rotation_grace_seconds
required

RotationGraceSeconds is nss.key_rotation_grace: how long the previous secret stays accepted after a rotation.

integer
error
string

Example generated

{
"data": {
"max_lifetime_seconds": 1,
"rotation_grace_seconds": 1
},
"error": "example"
}

No valid session

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Nss_disabled: nss.enabled is false

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}