You must enable OAuth2 and create an OAuth2 application in Access Manager that Secure API Manager uses to obtain the OAuth tokens for the API authorizations. If you have multiple Identity Server clusters that you want Secure API Manager to reference, you must perform the following steps for each Identity Server cluster in Access Manager.
The Key Manager in the API Gateway uses this OAuth2 application to create, update, and delete OAuth2 applications and to generate tokens. This OAuth2 application must have a scope that allows full access to OAuth2 management (urn:netiq.com:nam:scope:oauth:registration:full) and the user associated with the token must have the roles NAM_OAUTH2_DEVELOPER and NAM_OAUTH2_ADMIN assigned.
Use the following information to enable OAuth2, create an OAuth2 application, and assign the proper rights in Access Manager.
Enable OAuth2 in Access Manager as follows:
Log in to the Access Manager Administration Console.
Click Devices > Identity Servers > IDP Cluster.
In the Enabled Protocols section, select OAuth & OpenID Connect.
Click OK.
Click Update All to update all of the Identity Servers.
Select All Configurations, then click OK to perform the update.
Create a new scope for the OAuth application as follows:
Click Devices > Identity Servers > IDP Cluster.
Click the OAuth & OpenID Connect tab.
Click New to create a custom resource server for Secure API Manager.
Specify a unique name for the resource server.
(Conditional) If you have more than one Identity Cluster, select the appropriate Identity Cluster.
Click Finish.
Click the resource server you just created.
Click the Scope tab, then click New.
Use the following information to create the scope:
Specify the name of the scope. For example, am_application_scope.
Specify a detailed description to explain what this scope does.
Select Custom Claims/Permissions to allow Access Manager to provide the authorization tokens for the APIs in Secure API Manager.
Deselect this option. By not using this option, the APIs can make the calls and receive the tokens without requiring user interaction.
Ensure that this option is not selected. By not using this option, the APIs can make the calls and receive the tokens without requiring user interaction.
Click Next.
Add a new, randomly named claim as follows:
On Step 2 of 2, click New to create a custom claim.
Specify a name for the custom claim. For example,APIGatewayRandomPermission.
Click OK.
Select the new claim.
Click Add > Add to Access Token.
Click Finish, then click OK.
Define the global settings as follows:
NOTE:You might have already configured the global settings for other OAuth2 applications. The following settings are the minimum settings required for Secure API Manager to work with Access Manager. For more information, see Defining Global Settings
in the NetIQ Access Manager 4.5 Administration Guide.
On the OAuth & OpenID Connect tab, click the Global Settings tab.
Use the following information to define the global settings:
Specify an LDAP attribute that stores the token refresh information. This can be any attribute in the LDAP directory that accepts a long text string or use a stream attribute. For example, personalTitle.
Select the following options:
Authorization Code
Implicit
Resource Owner Credentials
Client Credentials
Select the following options:
Access Token
ID Token
Refresh Token
Ensure that you deselect this option. It is enabled by default. If you revoke the Access Manager tokens, Secure API Manager cannot validate the API requests.
Specify the duration in minutes for the length of time before the access token and ID token becomes invalid. Set this value to what is appropriate for your environment because this is a global setting.
Specify the duration in minutes for the length of time before the refresh token becomes invalid. Set this value to what is appropriate for your environment because this is a global setting.
Click Apply.
Create an OAuth2 client application as follows:
Click Devices > Identity Servers > Edit > OAuth & OpenID Connect > Client Applications > Register New Client.
Use the following information to create the OAuth2 application:
Specify a name for the application. For example, Secure API Manager Administration.
Select Web Based as the client type.
Specify the URI of the Access Manager Identity Server. For example:
https://IDP-dns=name:port/nidp/oauth2
Select all of the options except SAML 2.0 Assertion.
Select all of the token types listed.
Click OpenID Connect Configuration and configure an algorithm for the Oauth token as follows:
In the ID Token Signed Response Algorithm field, select RS256.
Set the additional fields to what is appropriate for your environment. For more information, see Defining Global Settings
in the NetIQ Access Manager 4.5 Administration Guide.
Click Token Timeout Configuration, then set the value of Access Token and ID Token Timeout to be 525600 minutes, which is one year.
Click Register Client.
Record the Client ID and Secret of the newly created client application so you can use them later in the Identity Server configuration in Secure API Manager.
Grant OAuth2 developer and administrative roles to an Access Manager administrator as follows:
Determine which Access Manager user is the designated OAuth2 administrator.
In the Access Manager Administration Console, click Policies > Policies.
Click New to create a new role for the OAuth2 administrator.
NOTE:You can use an existing role but you must add the following Actions to the role. For more information, see Creating Roles
in the NetIQ Access Manager 4.5 Administration Guide.
For the Type, select Identity Server: Roles.
Specify a detailed description for the policy so it is easy to remember that it is the policy for Secure API Manager access.
In the Condition Group, click the New drop-down menu, then select LDAP Attribute.
In the LDAP Attribute field, click GUID, then find and select cn.
In the Value field, click LDAP Attribute, then find and select Data Entry Field.
Specify the name of the administrator user that is the administrator for OAuth in your Access Manager environment.
In the Actions section, select Activate Role, then add the following two roles:
NAM_OAUTH2_DEVELOPER
NAM_OAUTH2_ADMIN
Click OK twice.
Click Apply Changes, then click Close.
(Conditional) If you created a new policy, click Edit IDP > Roles > Select the new policy > Enable. If the policy does not appear in the list, click Manage Policies, then click the new policy to enable it.
Click Save to create the new policy or enable an existing policy.
Update all Identity Servers with the configuration changes as follows:
In the Access Manager Administration Console, click Identity Servers.
Click Update All to reconfigure all of the nodes in the cluster for the Identity Servers.