Configuring session timeouts
============================

As an Administrator, you can configure session timeouts for Data Science & AI Workbench platform users, to help you adhere to your organization's security standards or enforce policies.

You'll use the Administrative Console's Authentication Center to set the various parameters related to session timeouts:

#. Open the |circle-user| **My Account** dropdown menu and select *Admin Console*.
#. Select |link-out| **Manage Users** to access the Keycloak user interface (UI). 
#. Log in using your Keycloak admin account credentials.
#. Select **Realm Setting** from the left-hand navigation.
#. Click the **Tokens** tab at the top to display the following:

    .. thumbnail:: ../../images/realm-tokens.png
        :align: center

#. Use the available configuration options to specify maximum thresholds for each aspect of user sessions, including the following:

   * Time limits for idle browser sessions and single sign on (SSO) tokens
   * Lifespans for OpenID access tokens
   * Time limits for login-related actions, such as resetting a forgotten password

   ======================================= ==================================================================================
   Configuration option                    Description
   ======================================= ==================================================================================
   Revoke Refresh Token                    If enabled, limits refresh tokens to one-time use           
   SSO Session Idle                        User will be logged out of session if inactive for this length of time
   SSO Session Max                         Maximum time a user session can remain active, regardless of activity 
   Offline Session Idle                    Amount of time an offline session can be idle before the access token is revoked
   Access Token Lifespan                   Amount of time an access token will remain valid, before expiring
   Access Token Lifespan For Implicit Flow Timeout for access tokens created with Implicit Flow--no refresh token is provided
   Client login timeout                    Maximum time a client can take to complete the authorization process
   Login timeout                           Maximum time a user can take to authenticate before the process restarts 
   Login action timeout                    Maximum time a user can spend on any one page in the authentication process
   User-Initiated Action Lifespan          Maximum time before a user-initiated action (e.g., forgot password email) expires
   Default Admin-Initiated Action Lifespan Maximum time before an admin-initiated action (e.g., issue token to user) expires
   Override User-Initiated Action Lifespan Use to optionally configure different timeouts for each user-initiated action
   ======================================= ==================================================================================

#. Click **Save** to save your changes to the Workbench platform.

.. |circle-user| raw:: html
   
   <svg height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 496c-54 0-103.9-17.9-144-48v0c0-61.9 50.1-112 112-112h64c61.9 0 112 50.1 112 112v0c5.3-4 10.4-8.2 15.4-12.6C409.1 370.6 354.5 320 288 320H224c-66.5 0-121.1 50.6-127.4 115.4C47.2 391.5 16 327.4 16 256C16 123.5 123.5 16 256 16s240 107.5 240 240s-107.5 240-240 240zm0 16A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm80-304a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zm-80-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"/></svg>

.. |link-out| raw:: html

    <svg height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M320 33c0-18.2 14.8-33 33-33H480c17.7 0 32 14.3 32 32V159c0 18.2-14.8 33-33 33c-8.7 0-17.1-3.5-23.3-9.7L404 130.6 235.3 299.3c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L381.4 108 329.7 56.3C323.5 50.1 320 41.7 320 33zm33-1c-.5 0-1 .4-1 1c0 .3 .1 .5 .3 .7L478.3 159.7c.2 .2 .4 .3 .7 .3c.5 0 1-.4 1-1V32H353zM0 96C0 60.7 28.7 32 64 32H208c8.8 0 16 7.2 16 16s-7.2 16-16 16H64C46.3 64 32 78.3 32 96V448c0 17.7 14.3 32 32 32H416c17.7 0 32-14.3 32-32V304c0-8.8 7.2-16 16-16s16 7.2 16 16V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z"/></svg>
          