Issue
When the default servlet mapping is modified in Pega Cloud environments, the APIs using defined authentication in the service package stop working and result in a 401 error.
Symptoms and Impact
The * URL pattern defines the default servlet for requests made to the context root of /prweb in a URL. For example, the URL http://<hostname>/prweb displays the standard Pega Platform login page by default.
When * URL pattern is moved to a different servlet such as PRAuth, and the WebStandard is disabled for that servlet, the API calls made to http://<hostname>/prweb/api stop functioning. This behavior is incorrect because the authentication for /api calls is determined by the service package and not the servlet mapping.
Steps to reproduce
Perform the following actions to reproduce the error:
- In the header of Dev Studio, click Configure > System > Settings > Servlet & Filter Management > Servlet. The image below shows the Servlet Management tab:
- Identify the servlet that you want to edit, click the More icon, and then select Configure. The following figure shows an example of the servlet configuration dialog box:
- Under URL patterns, click Add and enter the * URL pattern.
- Click Update.
- Restart your environment from My Pega Cloud.
- Make an API call to http://<hostname>/prweb/api.
Root Cause
A defect in Pega’s rule or code which breaks the APIs using defined authentication in the service package when the default servlet mapping is modified in Pega Cloud environments.
Solution
To resolve this error, update to Pega Platform 23.1.3, see Pega Platform 23.1.3 Patch Resolved Issues.
OR
As a workaround, apply the following hotfixes:
- HFIX-B2182 on Pega Platform 23.1.2
- HFIX-B2184 on Pega Platform 24.1.1
- HFIX-B2185 on Pega Platform 8.8.5