Reputation: 61
How can I made persistent changes in carbon.xml after server reboot? No matter what I change, after wso2 restart my modified carbon.xml is sent to a "backup" directory, and replaced with the "out of the box" carbon.xml file.
Upvotes: 1
Views: 568
Reputation: 1031
In my case I was using WSO2 API Manager 3.1.0 and I wanted to update the <XSSPreventionConfig>
tag in carbon.xml file. Yes, for every restart, my changes in carbon.xml get overriden by auto-generated carbon.xml file with config values coming from deployment.toml.
Then I found out that there are Jinja2 template files (.j2) in this location used to auto-generate XML files and fill them up with values from deployment.toml. wso2am-3.1.0/repository/resources/conf/templates/repository/conf/
I updated carbon.xml.j2 directly for my <XSSPreventionConfig>
changes and it works perfectly fine.
Upvotes: 1
Reputation: 1515
With the 4.5.0 carbon-kernel release, all WSO2 products such as APIM 3.0.0, IS 5.9.0 introduced a new config model. According to the new config model, there is a centralized configuration file (deployment.toml) where users add the configurations, then those configurations will be added to the respective .xml files.
So if you want to do some changes in the carbon.xml file, you have to add the relevant configs in deployment.toml file according to the new config model. With the new config model, all the changes made by you in the xml config files will be overridden by the toml configs during the server startup.
The previous configurations moved into "backup" folder when you make a new change in the deployment.toml file. This backup folder is used as a backup for the previous configs.
Please follow this documentation to refer further information on this new config model
Related documents:
https://wso2.com/blogs/thesource/2019/10/simplifying-configuration-with-WSO2-identity-server
Upvotes: 2