Skip to main content

Session management

After initial authentication, session management features verify that each access request comes from an authenticated source. Pega Platform™ creates a session object for the user and assigns a randomly generated, unique session ID. This session ID includes more than 128 bits of entropy to prevent collisions and guessing attempts. The session ID does not contain sensitive information and only identifies the user’s session.

Pega Platform encrypts the session ID and includes it as a cookie in HTTP responses. Clients return the cookie in subsequent requests. Pega Platform decrypts the cookie and uses the HTTPOnly setting to prevent client-side access.

Session management consists of three layers:

  • Browser session: Encrypted cookies maintain the session.
  • Pega server session: The system stores user-specific data in memory.
  • Application server session: The server manages the HTTP lifecycle.

Each request includes a session cookie. Pega Platform validates the cookie to confirm secure, continuous access without repeated logins. The platform monitors sessions and enforces timeouts and concurrent session limits to protect resources and maintain security.

In Pega Platform, you can define the session management policies, including:

  • Session timeouts.
  • Automatic termination of user sessions.
  • Cross-site request forgery (CSRF).
  • Cross-origin resource sharing (CORS).
  • Deactivation of users after successive days of inactivity.

Session timeouts

Pega Platform requires reauthentication from users who are inactive for a certain period of time. The system requires login credentials before resuming the browser session. Reauthentication prevents malicious or unauthorized users from hijacking the browser session. 

If the application server or another external facility manages the session timeout, clear the timeout checkbox if your organization uses an authentication service. 

You configure the session timeout in the following areas, depending on the security policies of the organization:

  • On the Advanced tab of the Access Group. 
  • In the Advanced configuration settings section of the authentication service (except for Custom/Anonymous/Kerberos type) by selecting the Use access group timeout checkbox. 
  • On the Custom tab of the authentication service for custom and Kerberos facilities by selecting the Use PegaRULES Timeout checkbox. 

Automatic termination of user sessions

To terminate active user sessions after a specific amount of time (for example, 8 hours), create a custom timeout activity by using pxSessionTimer to display the logout screen. 

Cross-site request forgery

Configure CSRF settings to prevent attacks that cause users to make unintentional changes. Pega Platform uses a token-based mitigation strategy to protect against CSRF. The system assigns one or more unique tokens to each session by using a cryptographically secure random number generator. These tokens appear in URLs and must be present in all requests that change the application state. 

When CSRF mitigation is enabled, Pega Platform checks each incoming request for a valid token. If the token is missing or invalid, the system rejects the request. This validation prevents attackers from forcing users to perform unwanted actions.

CSRF protection targets state-changing requests that attackers initiate through social engineering. This protection does not prevent data theft directly because attackers cannot view the response to forged requests. However, by blocking unauthorized state changes, CSRF protection secures critical operations such as fund transfers, password changes, and Case updates.

For more information, see Enabling and configuring Cross-Site Request Forgery settings.

Cross-origin resource sharing

CORS policies define how browsers and servers determine whether to allow cross-origin requests. In Pega Platform, CORS policies apply only to REST services and only to browser-based requests. This distinction is important: CORS does not apply to server-side integrations, Java-based service consumers, or API testing tools such as Postman. CORS applies only when JavaScript code running in a browser attempts to send cross-origin requests to Pega REST services.

CORS enables servers to allow specific cross-origin requests by relaxing the browser's same-origin policy in a controlled way. By default, browsers restrict JavaScript from accessing resources on domains other than the one that served the web page. This restriction helps prevent malicious scripts from retrieving sensitive data across sites. CORS defines a standardized method that servers use to specify which cross-origin requests are permitted, supporting secure and legitimate cross-domain communication.

Implementing CORS policies supports security and reduces costs while allowing controlled access to resources from other systems or websites.

Deactivation of users after successive days of inactivity

As a best practice, inactive users cannot log in to Pega Platform. Each operator ID has a defined number of days of inactivity before the system automatically disables it. However, you can manually disable a user at any time if necessary. Enable security policies for user authentication and session management to improve application security. You can control the strength of user IDs and passwords, manage session timeouts and disable operator IDs, and control the auditing of login events.

Session management architectural considerations for LSA

When designing enterprise Pega applications, Lead System Architects should consider several key architectural decisions related to session management:

Timeout strategy design

Balance security and usability by configuring session timeouts that meet compliance requirements without disrupting user workflows. Use pxSessionTimer-based warning dialogs to notify users before automatic logout and reduce the risk of data loss.

Concurrent session policies

Decide whether to allow multiple active sessions per user or enforce single-session restrictions. Pega Platform automatically disconnects older sessions when the concurrent session limit is reached, which improves usability while maintaining security.

Integration session management

Design authentication and session coordination across system boundaries. For OAuth 2.0 integrations, align token lifetimes with Pega session timeouts. For single sign-on, ensure session synchronization between the identity provider and Pega Platform.

Performance and scalability

In high-volume environments, session management affects system resources. Use stateless session designs for API-intensive applications, apply Data Page caching to reduce memory usage, and configure load balancing with session affinity to support horizontal scaling.

Security hardening

Apply defense-in-depth techniques to secure sessions. Enable HTTPOnly and Secure cookie flags, configure CSRF protection, define CORS policies for APIs, and audit session timeout settings regularly to support alignment with security standards.

Check your knowledge with the following interaction:


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice