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 (ShturvalServicePatch) 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 custom values 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
  custom values:
    authn_variables:
      at_exp: <your parameter value>
ParameterDescriptionData typeExample
metadata.nameName of the created ShturvalServicePatchstringshturval-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, load the prepared ShturvalServicePatch using Import. To do this:
  • Click on the 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

Screenshot in the platform GUI

Screenshot in the platform GUI

  1. In the namespace shturval-backend 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

Screenshot in the platform GUI

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

Screenshot in the platform GUI Screenshot in the platform GUI

Screenshot in the platform GUI

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.