Change token lifetime
Раздел «For cluster administrators»: быстрый переход по подразделам
На этой странице
In the Shturval platform, by default the token is valid for 24 hours. If necessary, you can change the validity period by applying the ShturvalServicePatch (PatchSSC) resource to the Authentication Control Module (shturval-auth) specification (ssc) by running:
Actions are performed in the management cluster
- Prepare a manifest for the ShturvalServicePatch object. In the
customvaluesblock, add theat_expparameter, as in the example below.
Example ShturvalServicePatch
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
name: <resource name>
spec:
shturvalServiceConfigName: shturval-auth
customvalues:
authn_variables:
at_exp: <your parameter value>
| Parameter | Description | Data type | Example |
|---|---|---|---|
metadata.name | Name of the created PatchSSC | string | shturval-auth-token |
at_exp | Token lifetime. It is possible to set in minutes (for example, 30m), hours (24h). Default 24 hours | string | 48h |
- In the management cluster, import the prepared ShturvalServicePatch using manifest import. To do this:
- Click on the manifest import icon located to the left of the user name. Upload the manifest file or drag the ShturvalServicePatch manifest into the window that opens. Verify and click Download.
Screenshot


- In the
shturval-backendnamespace of the management cluster, open the Storage section and go to the Configmaps page. Find the Configmap namedauthn-variablesand go to the view page. Make sure that theAT_EXPkey is set to the required token lifetime value. Please note! Applying ShturvalServicePatch will take a few minutes, wait for theAT_EXPvalue to change in Configmap.
Screenshot

- From the dashboard of namespace
shturval-backend, go to the load page with the nameauthn, the Pods tab will open. Delete the sub namedauthn. Afterwards, the pod will restart.
Screenshot



Wait for the pod to restart.
Please note! The changed lifetime will only be applied to new tokens; the validity period of previously received tokens will not change.