The Time-To-Live (TTL) value for Knox JSON Web Tokens (JWT) is now configurable. The
Custom TTL support for Knox JWT tokens feature allows you to adjust token lifetimes beyond
the default 60 minutes to better align with your specific security
policies, compliance requirements, or workflow needs.
-
Enter maintenance mode by calling the
POST
/cluster/[***CLUSTER-ID***]/maintenance/enter API request and
provide the following configuration as the request body:
{
"operation": "PatchCluster"
}
To get the Cluster-ID:
-
On the Cloudera Data Engineering UI, go to the
Administration left-navigation option.
-
Click the Service Details icon for the
respectiveCloudera Data Engineering Service.
-
Copy the
Cluster-ID.
-
Call
PATCH /cluster/[***CLUSTER-ID***] and provide the
following patch request to enable the knox.knoxTokenTTLMs
configuration property to configure the Knox JWT token TTL:
{
"config": {
"properties": {
"knox.knoxTokenTTLMs": "[***TTL-VALUE***]"
}
}
}
Example
In this example, the default 60 minutes
(3600000 milliseconds) TTL value is modified to
8 hours (28800000 milliseconds).
{
"config": {
"properties": {
"knox.knoxTokenTTLMs": "28800000"
}
}
}
-
Exit maintenance mode by calling the following API request:
POST /cluster/[***CLUSTER-ID***]/maintenance/quit
You can configure the Knox JWT token TTL during a new Cloudera Data Engineering Service creation using the Cloudera Data Engineering UI. For more information, see Configuring TTL for Knox JWT tokens for a new Cloudera Data Engineering Service.