Managing user sessions
The ServiceNow AI Platform provides the ability to view and terminate individual user sessions, lock out users from the system, and make users inactive.
Regardless of the number of windows you have open in a browser, it’s considered to be one session. However, if you have two separate browsers open (such as Google Chrome and Safari), it’s considered to be two separate sessions.
- Terminating a user session effectively logs that user out of the next transaction, which is usually the next browser select. Use the terminate sessions feature when you want to perform system maintenance.
- Locking a user out of the system means they can no longer log in or generate any actions from any email messages that they send to the instance. Locking users out also terminates their sessions.
- Making a user inactive means they don't show up in any fields that reference active users on the User table.
Configure a maximum active time for user sessions
Secure your instance by enforcing a maximum time for sessions regardless of user activity.
Before you begin
Role required: admin
About this task
By default, sessions expire only after a period of inactivity. Enforcing a maximum active session time ends sessions regardless of whether a user has been active recently, including whether they recently selected to extend a session. The active session timeout should be greater than the value configured for the inactive session timeout. For example, if sessions are configured to time out after 30 minutes of inactivity, the active session timeout should be greater than 30 minutes.
Procedure
Modify user session timeout after inactivity
Specify when to time out user sessions after a period of inactivity.
Before you begin
Role required: admin
About this task
By default, after 30 minutes of inactivity in the application, the platform logs the user out automatically, unless the Remember Me check box in the login screen is selected. Making the interval longer can lead to the unnecessary maintenance of inactive sessions in memory. Adjust this timeout setting to no more than a few hours, although up to 24 hours is workable.
- Ajax calls to the server keep the session alive (such as Labels and Refreshing dashboards).
- Polling keeps the session alive when the chat desktop is open (requires the Chat plugin).
Procedure
What to do next
Administrators may also want to add the following properties to the System Properties table.
- glide.security.csrf.handle.ajax.timeout: Handles errors for timed out Ajax requests when set to true.
- glide.security.auto.resubmit.ajax: Automatically resubmits timed-out Ajax requests when set to true and the Log in to an instance check box is selected or Change the default value of the Remember me check box. A pop-up appears to users asking them to continue.
- glide.ui.auto_req.extend.session: When set to true, the system automatically extends a user's session by the value they select for the homepage refresh time. If there’s no homepage
refresh time, the standard timeout value applies. Tablet and mobile devices don’t support this property. When set to false, user sessions time out when the Remember me check box
is clear. The timeout is based on whether there’s a homepage refresh time. When there’s no homepage refresh time, the standard timeout value applies. When there’s a homepage refresh time, the user session times out after the
timeout value plus one interval of the homepage refresh time. For example, if a user selects a refresh interval of five minutes, then that session expires after the timeout value plus five minutes.Note:Users who select the Remember me check box are unaffected by session timeout properties.
Administrators can also add the following properties to configure additional timeout settings for user sessions. These additional settings help to conserve system resources:
- glide.session.unauthorized.timeout.enabled: Enables an alternate session timeout for unauthenticated, guest sessions. Guest sessions are created for HTTP requests to the instance that don’t contain authentication information. By default this property is set to true.
- glide.unauthorized.session_timeout: Specifies the time, in minutes, after an authenticated user logs out of an instance before the session ends. Set the property to a value greater than 0 and less than the value in the glide.ui.session_timeout property.
Prompting users to extend a session
Configure how much time users have to extend a session before it times out due to inactivity.
Before you begin
Role required: admin
About this task
By default, users are prompted to extend their session two minutes before it expires with an "Extend your session" dialog box. This procedure explains how to adjust the timing of when users are presented with this prompt.
Procedure
Lock out a user
Lock out a user when you don’t want the user to access the instance.
Before you begin
Procedure
- Navigate to and select the user from the list.
- Select the Locked Out check box, and update the record.
Mark a user inactive
You can mark a user inactive so the user doesn't show up in any fields that reference active users on the User table.
Before you begin
Role required: admin
About this task
If you clear the Active checkbox, the user is locked out and cannot access the instance. This functionality is controlled through a Glide property glide.authenticate.only.allow.active.user.login which will only allow the active users to access the instance.
Procedure
- Navigate to and select the user from the list.
- Clear the Active check box, and update the record.
Terminate a user session
You can terminate a user session, for example, if you’re going to perform system maintenance and users are still logged in.
Before you begin
Role required: admin