How to Enable OAuth endpoints in OAG

The OAuth service is not available in the basic installation. You must deploy it manually.

1.Set up API Gateway OAuth 2.0
However, there is a convenience script in $VDISTDIR/samples/scripts/oauth for deploying the OAuth 2.0 Services Listener, supporting policies and sample apps, this can be run from $VDISTDIR/samples/scripts with:

Linux:
./run.sh oauth/deployOAuthConfig.py --type=authzserver

Windows:
run.bat oauth\deployOAuthConfig.py –type=authzserver

The parameters for the script are as follows:

Usage: deployOAuthConfig.py [options]

Options:
-h, –help show this help message and exit
-u USERNAME, –username=USERNAME
The user to connect to the topology (default ‘admin’)
-p PASSWORD, –password=PASSWORD
The password for the user to connect to the topology
connect user (default ‘changeme’)
–port=PORT The port the Client Application Registry is listening on
(default 8089)
–admin=ADMIN The Client Application Registry admin name (default
regadmin)
–adminpw=ADMINPW The Client Application Registry admin password
(default changeme)
–type=TYPE The deployment type: “authzserver”, “clientdemo” or
“all” (default all)
-g GROUP, –group=GROUP
The group name
-n SERVICE, –service=SERVICE
The service name

2.Enable OAuth endpoints
In the Policy Studio tree view, select Listeners > API Gateway > OAuth 2.0 Services > Ports.
Right-click the OAuth 2.0 Interface in the panel on the right, and select Edit.
Select Enable Interface in the dialog.
Click the Deploy button in the toolbar.
Enter a description and click Finish.

One thought on “How to Enable OAuth endpoints in OAG

Leave a comment