System Administrators use OESECTOOL to configure and start an OAuth2 test server for PAS for OpenEdge and OpenEdge Authentication Gateway servers. Testing is limited to checking for valid or invalid responses. Testing does not provide user login and session support.

Syntax

oesectool[.sh|.bat] command [parameters]

Parameters

command
The commands include:
Command Description
startoauth2server Starts an OAuth2 test server.
-port portnumber -ports portnumber 
Note: Using -port or -ports creates a keystore.p12 file in oesectool/work, if not already present. Using -ports also creates an sslkeystore.p12 file in oesectool/work, if not already present. In addition, starting the server generates oesectool/work/oesectool.0, a PEM file containing the server certificate. If your PAS for OpenEdge instance uses the OS Trust Store, add this certificate to the OS Trust Store before running tests. See OESECTOOL utilities.
stopoauth2server Stops an OAuth2 test server.
-port portnumber -ports portnumber
parameters
The parameters include:
Parameter Description
-port portnumber HTTP port number
-ports portnumber HTTPS port number

Customize OAuth2 test server properties

Before starting an OAuth2 test server, modify the oesectool/conf/oesectool-oauth2.properties file to configure an OAuth2 test server. For more information on oesectool-oauth2.properties, see the oesectool\conf\oesectool-oauth2.properties.README file.

Start an OAuth2 server

To start an OAuth2 server, use:

oesectool startoauth2server -port 8888  
Oidc/Oauth2 Server started
        Http port:  8888
        Process id: 5008

Set up the OS Trust Store for OESECTOOL testing

If your PAS for OpenEdge instance is configured to use the OS Trust Store, complete the following steps before running OAuth2 tests. This setup is required only once per server.

  1. Start the OESECTOOL OAuth2 server using the -ports parameter to ensure the server certificate is generated:
    oesectool startoauth2server -ports portnumber
    OESECTOOL creates work/oesectool.0 containing the generated server certificate.
  2. Stop the server:
    oesectool stopoauth2server -ports portnumber
  3. Add the generated certificate to the OS Trust Store:
    • On Linux: run install_certificates.sh.
    • On Windows: run import-certificates.bat.
Note: Alternatively, use the gencert command to generate work/oesectool.0 without starting a server, then add the certificate to the OS Trust Store. For more information, seeOESECTOOL utilities.

Stop an OAuth2 server

To stop an OAuth2 server, use:

oesectool stopoauth2server -port 8888 
The result is:
Http server stopped. Port: 8888