WSO2 API Manager 4.1.0 - Unable to update api-manager.xml - wso2

Downloaded WSO2 API Manager 4.1.0 Zip Archive
Navigated to APIM\wso2am-4.1.0\wso2am-4.1.0\repository\conf\api-manager.xml
Updated the api-manager.xml for JWTConfiguration and set EnableJWTGeneration to
true
save the api-manager.xml changes and restarted the server.
after restarting the server the api-manager.xml changes are reverting back to old values
false
Why changes are not reflecting in api-manager.xml?
Help us how to update api-manager.xml

Do not change xml configuration files directly, you should be changing deployment.toml instead.
Complete list of options can be found here
Read more about this behaviuor at Understanding the new configuration model

Edit APIM\wso2am-4.1.0\wso2am-4.1.0\repository\conf\deployment.toml
remove '#' before
[apim.jwt]
enable = true
then restart APIM

Related

Configuring the synapse properties file in wso2

How to configure the wso2/repository/conf/synapse.properties files in wso2? I need to change the synapse.global_timeout_interval value but updates to the synapse.properties seems to be overridden when the server restart.
Assuming you are using API manager product and a version that use deployment.toml for configurations, you can add following config in wso2/repository/conf/deployment.toml.
[synapse_properties]
"synapse.global_timeout_interval"=value

How i can change the User-Agent Header in WSO2 API Manager

WSO2 APIM has a default User-Agent header which is:
Synapse-PT-HttpComponents-NIO
I want to change it to something else, so i have added header mediation from the publisher run time configuration but no luck, also i tried to add this line http.user.agent.preserve=true in passthru-http.properties as many people said but whenever i restart the server it is removed from the file.
How I can accomplish it ?
I am using wso2am-3.2.0
In APIM 3.2.0, we use deployment.toml file to add/modify configurations. If you edit the configuration files directly, it will be overridden by the configs in the deployment.toml during server startup. Try adding the below values in deployment.toml found inside <APIM_HOME>/repository/conf/
[passthru_http]
'http.user.agent.preserve'=true

WSO2 Analytics 4.4.0 : Problem accessing: /analytics-dashboard. Reason: Not Found

I just installed WSO2 3.2.0 and Analytics 4.4.0 on the same machine using repositories on Debian 9.
Everything looks fine except the analytics Dashboard that I can't access for. According to the documentation here, I have to go on this url https://check.mydomain.com:9643/analytics-dashboard but all I got is this error :
Problem accessing: /analytics-dashboard. Reason: Not Found
I followed these steps to set up my domain name and enable analytics :
nano /usr/lib/wso2/wso2am/3.2.0/repository/conf/deployment.toml
[server]
hostname = "check.mydomain.com"
[apim.analytics]
enable = true
And I replaced every "localhost" string by ${server.hostname}
I followed these steps to start Analytics, API Manager and Dashboard :
service wso2sp-4.4.0-worker start
service wso2am-3.2.0 start
service wso2sp-4.4.0-dashboard start
Every service is fine regarding
service wso2sp-4.4.0-worker status
service wso2am-3.2.0 status
service wso2sp-4.4.0-dashboard status
Every other urls are working :
https://check.mydomain.com:9443/admin
https://check.mydomain.com:9443/carbon
https://check.mydomain.com:9443/devportal
https://check.mydomain.com:9443/publisher
Analytics is enabled and I can see subscription options on Publisher settings
Nothing happends on logs when I wisit https://check.mydomain.com:9643/analytics-dashboard
tail -f /usr/lib/wso2/wso2am/3.2.0/repository/logs/http_access_.2020-11-18.log
tail -f /usr/lib/wso2/wso2am/3.2.0/repository/logs/wso2carbon.log
tail -f /usr/lib/wso2/wso2sp/4.4.0/wso2/worker/logs/carbon.log
tail -f /usr/lib/wso2/wso2sp/4.4.0/wso2/dashboard/logs/carbon.log
Any help would be very appreciated, thanks.
You need to use wso2am analytics setup to configure analytics with the API manager. But I think now you are trying to use wso2 stream processor to configure the analytics and it's not supported with wso2am 3.2.
Follow the [1]documentation to download and set up the analytics.
You need to manually download the wso2am-analytics-3.2.0.zip.
if you follow the quick setup make sure wso2am-analytics-3.2.0 and wso2am folders locate in the same place. (since you installed apim via the apt installer you need to manually put anlytics setup in /usr/lib/wso2/wso2am/ folder and correctly set the path to API manager am_db in wso2am-analytics-3.2.0/conf/dashboard/deployment.yaml---> AM_DB -> jdbcUrl)
If you follow the standard setup no need to worry about the locations of wso2am pack and wso2am-analytics pack.
[1] https://apim.docs.wso2.com/en/latest/learn/analytics/configuring-apim-analytics/

How to perform following changes in tomcat configuration in WSO2IS 5.9.0?

I am trying to make /oauth2/token API call from reactjs fronted and getting CORS error.
My friend asked the same question and got answer for the same also.
Please open the link for solution.
WSO2 IS returns CORS error when wrong credentials sent
But when I am trying to perform the same in WSO2IS 5.9.0 the configuration is getting overwritten to the default config.
How to perform this in 5.9.0 using deployment.toml file?
As I have mentioned in that earlier answer you need to add the given tomcat filter in the web.xml.j2 file in the path repository/resources/conf/templates/repository/conf/tomcat. The .j2 files will not get replaced by the deployment.toml at the server startup.

Where is AuthenticationAdminService in WSO2 GREG?

I'm using WSO2 Governance and Registry version 4.1.1, I can find wsdl file of AuthenticationAdminService in wso2greg-4.1.1-src but I can't find anything by url:
https://127.0.0.1:9443/services/AuthenticationAdmin?wsdl
even after I modify HideAdminServiceWSDLs tag in carbon.xml, while other services like ResourceAdminService is available.
Can anybody help?
You need to restart the sever after modifying the parameter in carbon.xml
<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>
After that you should be able to access the wsdl in (I verified with 4.1.1 server)
https://localhost:9443/services/AuthenticationAdmin?wsdl or
http://localhost:9763/services/AuthenticationAdmin?wsdl