Salesforce

How to enable Swagger for PASOE instance

« Go Back

Information

 
TitleHow to enable Swagger for PASOE instance
URL NameHow-to-enable-Swagger-for-PASOE-instance
Article Number000112573
EnvironmentProduct: OpenEdge
Version: 11.7.4 and later, 12.x
OS: All supported platforms
Other: PASOE, Swagger
Question/Problem Description
Allowing Swagger on PASOE instance
How to enable Swagger for a PASOE instance
How to resolve Web Browser permission errors when accessing the oemanager: http://localhost:8890/oemanager -u tomcat
Steps to Reproduce
Clarifying Information
The OpenEdge Service Pack 11.7.4: New Information has a section regarding Swagger:
Manage and monitor an instance, Use Swagger UI to explore management REST APIs
This document can be found in the Product Alert:  OpenEdge Service Pack 11.7.4 Is Now Available  
Error MessageWebBrowser error:

403 forbidden
Access Denied.
Defect Number
Enhancement Number
Cause
For Web Browser permission errors. 
Possible cause:
Missing trailing backslash "/" at the end of the URL: http://<servername>:8890/oemanager/

 
Resolution

To enable Swagger for a PASOE instance:

  1. Open a PROENV shell and navigate to the working directory.
  2. Create a PASOE instance:
$   pasman create -f -p 8890 -P 8891 -s 8892 -m tomcat:tomcat -N Test <workingdirectory>/Test
  1. Deploy the oemanager service:
tcman deploy <dlc>/servers/pasoe/extras/oemanager.war
Note: If running in a production server the -f will not copy the war files to the instance directory because there are no war files in $CATALINA_HOME.
  1. Start the PASOE instance in order to have the oemanager directory properly created in \<workingdirectory>\<instancenamedirectory>\webapps
$   pasman pasoestart -I Test -restart 
  1. Navigate to the PASOE new instance directory: \<workingdirectory>\<instancenamedirectory>\webapps\oemanager\WEB-INF
a. Edit the file oemgrSecurity-container.xml,
b. Uncomment the following line (around line 35):
<!-- Access to SwaggerUI. Disabled by default, user has to uncomment the below line to enable it -->                       
<intercept-url pattern="/doc/**" method="GET" access="hasAnyRole('ROLE_PSCAdmin','ROLE_PSCOper','ROLE_PSCUser')"/>
  1. Navigate back to the working directory and then restart the PASOE instance to apply changes
$   pasman pasoestart -I Test -restart
  1. Open a web browser and type:
http://<servername>:8890/oemanager/
Note: Ensure the URL has trailing backslash / at the end.
 
  1. User and Password (tomcat/tomcat)
  2. Swagger page should be loaded. If not, please verify the steps above and then stop and restart the PASOE instance, with the OpenEdge Explorer Console or tcman stop/start.
For more details about how to access/use Swagger UI please review the following information at Progress Hub:
Progress Information Hub:
https://docs.progress.com/bundle/pas-for-openedge-management/page/Enable-Swagger-UI-for-management-REST-API-access.html
Workaround
Notes
References to Other Documentation:

Progress Information Hub -> Manage Progress Application Server (PAS) for OpenEdge - > Monitor PAS for OpenEdge instances -> Use Swagger UI to explore management REST APIs -> Enable Swagger UI for management REST API access:
https://docs.progress.com/bundle/pas-for-openedge-management/page/Enable-Swagger-UI-for-management-REST-API-access.html

Progress Article:
Swagger on PASOE: Does work with any .war REST services   
 
Keyword Phrase
Last Modified Date11/9/2021 3:13 PM

Powered by