API Policies > Security policies > OAuth 2.0 authentication
  

OAuth 2.0 authentication

OAuth 2.0 is a protocol for authorization that provides specific authorization flows for web applications and helps in the secure transmission of information between API consumers and web services. You can create an OAuth 2.0 authentication policy to assign to APIs or operations that invoke a process that uses basic authentication.
API Center uses the client credentials grant type for OAuth 2.0 authentication. To enable OAuth 2.0 authentication, you must create an OAuth 2.0 client. You specify the credentials of an organization user with access to run managed APIs and managed API groups that can use the client for authentication, and generate client credentials.
Client access tokens that you use for OAuth 2.0 authentication time out after a defined timeout period. After a token times out, you can't use it. You must regenerate the token.
You set the timeout when you create the OAuth 2.0 client, and you can change it later.

Creating an OAuth 2.0 client

Create an OAuth 2.0 client that enables API consumers to access APIs with a security policy that uses OAuth 2.0 authentication.
    1On the Configuration page, click Add OAuth 2.0 Client.
    The Add OAuth 2.0 Client wizard appears.
    2Enter the user name and password of an organization user and click Next.
    The user information that you enter here must be an Allowed User of the Application Integration process.
    The Details step appears.
    3Enter a name for the client. The name is case sensitive and must be unique in the organization.
    The name can contain up to 32 characters, including ASCII letters, digits, and underscores.
    4Optionally, enter a description of the client.
    The description can contain up to 1,024 characters.
    5Enter a timeout value in minutes for the access token.
    The minimum value is 5 minutes and the maximum value is 1440 minutes or 24 hours.
    After a token times out, you can't use it. You must regenerate the token.
    6Click Next.
    The Resources step appears.
    7 Select what managed APIs or managed API groups the OAuth 2.0 client applies to:
    Click Next.
    API Center creates the client. The Generated Credentials step appears.
    8Copy the client credentials and use one of the following methods to send them to API consumers:
    9Click Finish.
    You can view the enabled OAuth 2.0 client on the Informatica OAuth 2.0 Server table on the Authorization tab of the Configuration page.
    When you create an OAuth 2.0 client, you can view all the managed APIs and managed API groups that are currently active, shared, and deprecated. When you edit an OAuth 2.0 client, you can view the list of active, shared, deprecated, and inactive managed APIs and managed API groups that are associated with the OAuth 2.0 client.

Managing OAuth 2.0 clients

After you create an OAuth 2.0 client, you can edit or delete it.
    1On the Informatica OAuth 2.0 Server table on the Authorization tab of the Configuration page, click to open the Actions menu of the OAuth 2.0 client.
    2Perform one of the following tasks:

Downloading an OAuth 2.0 clients list

You can download a list of OAuth 2.0 clients.
API Center downloads an Excel file that shows details of the OAuth 2.0 clients that were created since the time the organization was created. The file shows the client name, client description, status, the APIs that the client applies to, and the last updated time for all the OAuth 2.0 clients.
To download the list, on the Informatica OAuth 2.0 Server table on the Authorization tab of the Configuration page, click Download.

Enabling and disabling OAuth 2.0 clients

When you create an OAuth 2.0 client, it is enabled by default. You can disable the client if needed. API consumers can't use disabled OAuth 2.0 clients for authentication.
    1On the Informatica OAuth 2.0 Server table on the Authorization tab of the Configuration page, click to open the Actions menu of the OAuth 2.0 client.
    2Select Disable or Enable.
    The OAuth 2.0 client is disabled or enabled.

Accessing an API with OAuth 2.0 authentication

To access an API, API consumers generate an OAuth 2.0 authorization token and send the token to the API.
The following sections describe the stages of accessing an API that requires OAuth 2.0 authentication:
Generating an OAuth 2.0 authorization token
To generate the token, API consumers authenticate to the IDMC OAuth 2.0 server with the server URL and the OAuth 2.0 client credentials that they receive.
API consumers can use one of the following methods to provide the client credentials to the OAuth 2.0 server, based on the application or software package that they use to access the API:
Sending the token to the managed API
API consumers pass the token that they receive from the OAuth 2.0 server to the API as an Authorization header with the prefix Bearer followed by the token.

Regenerating an OAuth 2.0 client secret

You can regenerate an OAuth 2.0 client secret. When you regenerate the client secret, API Center disables the current client secret.
    1On the Informatica OAuth 2.0 Server table on the Authorization tab of the Configuration page, click to open the Actions menu of the OAuth 2.0 client.
    2Select Regenerate Secret.
    3Enter the password and click Next.
    API Center regenerates the client secret and authorization header value. You can copy the new values and send them to the API consumers.
    4Click Finish.