Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 13 OAuth Server : Configuration Setup of OAuth Server Authorization

Configuration Setup of OAuth Server Authorization
This section explains the configuration setup required to use the OAuth server.
Set OAuth Server Properties
To enable the OAuth server, set the OAuth server properties using the Config UI as follows:
1.
Navigate to ASG_HOME/bin directory.
2.
Type asg-configui command to start the Config UI.
3.
   http://localhost:9200/ConfigUI
4.
5.
On the Home page on the Config UI, select the Gateway Engine Properties from the drop-down list.
6.
Expand the Gateway Engine Properties node.
7.
Click the SECURITY > Security tab.
8.
Expand the OAuth node to see the OAuth server properties.
9.
The OAuth server properties described in the Security Properties can be set in the ASG_CONFIG_HOME/asg.properties file. See Runtime Properties of Core Engine for OAuth server properties names and description.
Refer to the ASG_CONFIG_HOME/asg.properties file for the example values of OAuth server related properties.
Enable OAuth Authorization For Gateway (Set Adapter Properties)
The OAuth server uses the following adapters for authenticating owner, client, and to retrieve the scopes for authorizing the client to access resources.
Owner Adapter
The OAuth server provides the following options to authenticate the user credentials:
File
By default, the OAuth server provides the file- based owner adapter. To use the file-based owner adapter, follow these steps:
1.
2.
On the home page on the Config UI, select the Gateway Engine Properties from the drop-down list.
3.
Expand the Gateway Engine Properties node.
4.
Click the SECURITY > Security tab.
5.
Expand the OAuth node.
6.
7.
Click the Save button to save changes.
8.
Set the owner credentials in the ASG_HOME\examples\OAuth\resources\owner.properties file.
The owner adapter properties can be set in ASG_CONFIG_HOME\asg.properties file, as follows:
1.
Navigate to the ASG_CONFIG_HOME directory.
2.
Edit the asg.properties file in a text editor.
4.
Save changes to the asg.properties file.
LDAP
To use the LDAP-based owner adapter, follow these steps:
1.
Navigate to the ASG_CONFIG_HOME directory.
2.
Edit the asg.properties file in a text editor.
3.
   tibco.clientVar.oauth.owner.adapter.class=com.tibco.asg.oauth.identity.provider.jndildap.OwnerAdapterService
4.
For example, ldapserver.api.tibco.com
For example, uid=admin,ou=system
For example, ou=people,ou=na,dc=example,dc=org
For example, uid={0},ou=employee,ou=tsi,o=tibco
In this string, the variable {0} represents the name of the user. The code substitutes the user name for this variable, and passes the resulting boolean expression to the LDAP server. The LDAP server matches that search expression against user objects to find a match. The search result must contain exactly one match. This is required for bind mode (not in admin (search) mode).
5.
Save changes to the asg.properties file.
Client Adapter
The OAuth server provides the following options to validate the client ID and client secret of an application:
File
By default, the OAuth server provides the file- based owner adapter. To use the file-based owner adapter, follow these steps:
1.
2.
On the home page on the Config UI, select the Gateway Engine Properties from the drop-down list.
3.
Expand the Gateway Engine Properties node.
4.
Click the SECURITY > Security tab.
5.
Expand the OAuth node.
6.
7.
Click the Save button to save changes.
8.
Set the properties for the client adapter in the ASG_HOME\examples\OAuth\resources\client.properties file.
The client adapter properties can also be set in the ASG_CONFIG_HOME/asg.properties file, as follows:
1.
Navigate to the ASG_CONFIG_HOME directory.
2.
Edit the asg.properties file in a text editor.
4.
Save changes to the asg.properties file.
TIBCO API Exchange Manager
To use the portal engine of TIBCO API Exchange Manager as the client adapter for the OAuth server, follow these steps:
1.
2.
On the home page on the Config UI, select the Gateway Engine Properties from the drop-down list.
3.
Expand the Gateway Engine Properties node.
4.
Click the SECURITY > Security tab.
5.
Expand the OAuth node.
6.
http://portal_host_name:9122
where, portal_host_name is the name of machine running the portal engine of TIBCO API Exchange Manager
.
The client adapter properties are defined in the ASG_CONFIG_HOME/asg.properties file, as follows:
Scope Adapter
TIBCO API Exchange Gateway uses the scope adapter to manage the scope for a specific owner. By default, the OAuth server provides the following options for scope adapter:
File
To use the file-based scope adapter, follow these steps:
1.
2.
On the home page on the Config UI, select the Gateway Engine Properties from the drop-down list.
3.
Expand the Gateway Engine Properties node.
4.
Click the SECURITY > Security tab.
5.
Expand the OAuth node.
6.
7.
Click the Save button to save changes.
8.
Set the properties for the scope adapter in the ASG_HOME\examples\OAuth\resources\scope.properties file.
The scope adapter properties can also be set in the ASG_CONFIG_HOME/asg.properties file, as follows:
1.
Navigate to the ASG_CONFIG_HOME directory.
2.
Edit the asg.properties file in a text editor.
4.
Save changes to the asg.properties file.
LDAP
To use the LDAP-based scope adapter, follow these steps:
1.
Navigate to the ASG_CONFIG_HOME directory.
2.
Edit the asg.properties file in a text editor.
3.
   tibco.clientVar.oauth.scope.adapter.class=com.tibco.asg.oauth.identity.provider.jndildap.ScopeAdapterService
4.
Non-Default (Custom) Adapter For Owner, Client and Scopes
To use the other resources such as database to authenticate the client, owner and manage the scopes, implement the custom adapters, which can be integrated to the interface provided by TIBCO API Exchange Gateway.
See OAuth Service Provider Interface chapter for details.
Start OAuth Server
The OAuth server is integrated within TIBCO API Exchange Gateway. The OAuth server is run as a Core Engine instance.
To start an instance of OAuth server, follow these steps:
1.
2.
3.
On the Windows platform, type the following command:
   asg-engine -u asg-caching-core -a ASG_Configuration
On the UNIX platform, type the following command:
   ./asg-engine -u asg-caching-core -a ASG_Configuration

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved