From 092f6d2159e744c4ec959da5aed60937e264386a Mon Sep 17 00:00:00 2001
From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com>
Date: Tue, 7 Apr 2026 06:36:20 +0000
Subject: [PATCH] Fix: Add CSP header configuration guideline
Co-Authored-By: Claude Sonnet 4.5
Note that cache prevention headers are enabled for the applications with which the product is shipped by default. Therefore, you need to manually enable cache prevention headers only for all the new applications that you deploy in your server.
Configure Content Security Policy (CSP) headers
WSO2 API Manager application code is developed adhering to security guidelines, and known vulnerabilities within the package have been identified and patched. In addition, Content Security Policy (CSP) can provide an extra layer of protection by restricting how the application is framed or embedded in the browser.
+It is recommended to configure the following CSP header at the Load Balancer (LB) level to secure framing behavior and reduce clickjacking risk:
+Content-Security-Policy: frame-src 'self'; frame-ancestors 'self';
+The above policy ensures the following:
+frame-src 'self' - Restricts the sources from which content can be loaded into frames within the application to the same origin only.frame-ancestors 'self' - Prevents the application from being embedded in frames by external origins, mitigating clickjacking attacks.Increase Ephemeral Diffie-Hellman Key size
Before starting the server, open the product startup script (api-manager.sh in Linux and api-manager.bat in Windows) and enter the following with the other Java properties:
Disable client-initiated renegotiation
Enable HostName Verification
For instructions, see Enabling HostName Verification.
Increase JSESSIONID length
If required, increase the session ID length by changing the sessionIDLength attribute of the session manager in the context.xml file (stored in the <PRODUCT_HOME>/repository/conf/tomcat/context.xml directory) as shown below. The default value is 16 bytes.
Change default admin credentials
The Administrator account is configured by default. The default user name and password of the administrator account is "admin". To change the administrator credentials, you need to first sign in to the management console of the API-M server as "admin", and then use the Change Password option under Home->Configure->User Management->Users in the navigator.
For more information on how to change the password of the administrator in the API-M server, see Changing the super admin credentials.
Restrict access to the management console
For instructions, see Managing User Roles.
Enable log rotation and monitoring
<PRODUCT_HOME>/repository/conf/log4j2.properties<
You can also configure rollover based on log file size, and also it is possible to limit the number of backup
files. For details on how to configure log rotation and manage log growth details in the API-M runtime, see Managing log growth.
Prevent log forging
Log forging can be identified by appending a UUID to the log message. The conversion character '%u' can be
used in the pattern layout to log a UUID. For example, the log pattern can be set as following for AUDIT
@@ -223,7 +235,7 @@ logs so that the UUID is printed at the beginning of each log record.
For more information on configuring logging, see Setting up logging in API Manage.
Set appropriate JVM parameters
Restrict outbound connections of Publisher node
See the API-M deployment documentation for details.
Use a separate admin user account to login into the system
For more information regarding admin user accounts, see super admin configurations.
Defining callback URL regular expression
Configure client authentication
Client authentication is used to identify the application or client making a request to the WSO2 API Manager REST APIs. By default, web applications provided with WSO2 API Manager use a set of default credentials for authentication. However, it is recommended to change these default credentials to enhance security. For more details see, Configure client authentication
Disable Try-It Tool