Limiting the number of concurrent user sessions
By default, users can have an unlimited number of concurrent sessions. For example, a user could open IBM® Software Hub in 3 different web browsers and have 3 concurrent sessions. You can optionally limit the number of concurrent sessions that a user can have.
- Who needs to complete this task?
-
To complete this task, you must have one of the following roles on the Red Hat® OpenShift® Container Platform cluster:
- Cluster administrator
- Instance administrator
- When do you need to complete this task?
- Complete this task if you want to limit the number of concurrent sessions users can have.
Repeat as needed If you have multiple instances of IBM Software Hub, repeat this task for each instance where you want to limit the number of concurrent sessions.
Before you begin
Ensure that you source the environment variables before you run the commands in this task.
About this task
product-configmap ConfigMap to limit the number of concurrent
sessions.A session is created each time the user logs in to IBM Software Hub. If the user does not log out of a session, they can end up with multiple, concurrent sessions. If you limit the number of concurrent sessions, a user's oldest session is automatically removed if the user reaches the limit. For example, if you set the limit at 3 sessions, and a user tries to open a fourth session, the user's oldest session is removed.
When a session is removed, the record for the session is be removed from the
user_sessions database table. Any attempts to use the JWT token associated with the
session return an error:
- If the user is in the web client, the user receives a 302 error.
- If the user is making API calls, the user receives a 401 error.
Procedure
To limit the number of concurrent user sessions: