Authentication and Authorization¶
The OAuth 2.0 client credentials grant flow is preferred to handle the authentication of integration scenarios in IFS Cloud. The flow validates the application credentials - the client ID and the client secret and provides an access token and a refresh token on successful authentication. This access token can then be used to call APIs and get the relevant data as API responses.
Follow the instructions given below to obtain the access token:
Step 1 - Create a Client¶
Before you Begin
Make sure you have admin privileges in order to create a new client.
- In IFS Cloud, navigate to Solution Manager > Users and Permissions > Identity and Access Manager > IAM Client. Alternatively, search for
IAM Client
in the search bar.
-
Click on the + icon. A pop-up appears to create a new client.
-
Fill the values for Client ID and Description in the Basic panel and Username in the User Group panel as shown below.
Enable Service Accounts and Direct Access Grants in the Basic panel and disable Select from Existing Service Account Users in the User Group panel.
- Click OK.
A new IAM client is created, and a unique client secret is generated.
Step 2 - Obtain the Token Endpoint¶
-
In IFS Cloud, navigate to Solution Manager > Integration > API Explorer.
-
Select a checkbox corresponding to any API that appears in the list.
-
From the Documentation dropdown that appears above the list, click API Doc.
-
Expand the AUTHORIZATIONS section and click on the
connect URL
. -
Search for
token_endpoint
.
The value of token_endpoint
will be used as the request/access token URL to obtain the access token and refresh token in the next step.
Step 3 - Configure a New Token¶
- Access Postman and create a new request.
- In the Authorization tab, select
OAuth 2.0
as the Type from the dropdown. - Select Client Credentials as the Grant Type from the dropdown.
- Fill in the corresponding values obtained from the previous steps for Client ID, Access Token URL, and Client Secret.
- Enter the scope as
openid microprofile-jwt
. - Click Get New Access Token.
The access token
and refresh token
will appear in a pop-up. You can use this access token to authenticate future requests.