Change token lifetime

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

  1. Prepare a manifest for the ShturvalServicePatch object. In the customvalues block, add the at_exp parameter, 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>
ParameterDescriptionData typeExample
metadata.nameName of the created PatchSSCstringshturval-auth-token
at_expToken lifetime. It is possible to set in minutes (for example, 30m), hours (24h). Default 24 hoursstring48h
  1. 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

manif

tokenmanifest2

  1. In the shturval-backend namespace of the management cluster, open the Storage section and go to the Configmaps page. Find the Configmap named authn-variables and go to the view page. Make sure that the AT_EXP key is set to the required token lifetime value. Please note! Applying ShturvalServicePatch will take a few minutes, wait for the AT_EXP value to change in Configmap.
Screenshot

tokenlfconfigmap

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

tokendashboardtokendeletepod

tokendeletepod1

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.