Our application had undergone security test and they found issues related to cookie. Please find below risk
If the secure flag is set on a cookie, then browsers will not submit the cookie in any requests that use an unencrypted HTTP connection, thereby preventing the cookie from being trivially intercepted by an attacker monitoring network traffic. If the secure flag is not set, then the cookie will be transmitted in clear-text if the user visits any HTTP URLs within the cookie's scope. An attacker may be able to induce this event by feeding a user suitable links, either directly or via another web site. An attacker with sufficient network access could eavesdrop network traffic to capture these, then use them to hijack the user's session
Recommendation : We recommend enabling the secure and HttpOnly flags on the affected cookies
solution tried : created below DSS
prconfig/http/setsecurecookie/default and set to TRUE
prconfig/cookie/httponly/default and set to TRUE.
Issue : after setting this, we are not able to login to pega designer studio, could see below errors in log.
Error in log :An error has occurred which indicates that your browser does not support Cookies. You must enable Cookies in order to use this application
Please recommend here
PFA, request and response
- The JSESSIONID cookie still does not use „secure” cookie flag, other cookies and settings are OK
When accessing a Pega server you’ll get many differently named cookies. If you look at the name of the cookie you can mostly find out what software (or network) component is responsible for which cookie. If you go to your developer tools in your browser (F12) and look at the Application tab, you should find something like this:
For example this server is running on Amazon networking components that are responsible for the AWS named cookies and you see a JSESSIONID cookie which is put there by Tomcat.
To secure that last cookie you need to work with your Tomcat administrator. Probably an update to the web.xml is needed with something like this:
The Pega installation itself is responsible for setting 3 cookies named: Pega-Captcha, Pega-Perf and Pega-RULES. This last cookie is by far the most important one, since it holds the user session. If you want to know more about secure setting for the Pega-RULES cookie you can take a look at: