OAuth Configuration Guide
InfoConnect Hub, RPA Hub and the InfoConnect MCP server can authenticate callers with OAuth 2.0 instead of Basic authentication. This guide explains how to enable OAuth in each module, how the modules authenticate to each other, and how to set up each supported authorization server.
Overview
Each module has a property that selects its authentication type:
| Module | Property | Values |
|---|---|---|
| Hub | auth.type |
basic, oauth, both |
| RPA Hub | auth.type |
basic, oauth |
| MCP | mcp.auth.type |
none, basic, oauth, spring-oauth-server |
On the Hub, each value of the role claim (spring.oauth.resource.server.authority.claim) must be the name of a Hub user group, by default admin or user. See User groups and permissions. The authority.admin and authority.user properties are used only by the MCP server.
Supported OAuth configurations:
- Built-in authorization server (the
authorization_serverapplication shipped with the Hub) - AWS Cognito
- Okta
- Salesforce
- Azure AD
Every provider section below uses requests from the OAuth InfoConnect Hub folder of the Postman collection. For RPA Hub-specific OAuth settings, see the RPA Hub user manual.
Setting the authorization type
Set the authentication type in each module you want to secure with OAuth:
-
In Hub or RPA Hub, set the property
auth.typetooauth.
-
In MCP, set the property
mcp.auth.typetooauth.
Configuring communication between modules
When you secure a module with OAuth, the modules that call it must be configured with matching security properties. For example, if you enable OAuth 2.0 on RPA Hub, set the RPA security properties on the Hub. Otherwise, the Hub cannot send requests to RPA Hub.
The modules call each other as follows:
- Hub calls RPA Hub.
- MCP calls the Hub. It reads RPA Calls through the Hub.
- The Hub UI calls the Hub, RPA Hub and MCP.
For calls between modules, set the provider of the called module (for example rpa.oauth.provider) to Azure, AWS or built-in. Okta and Salesforce can secure incoming calls, but not calls between modules.
Each caller has a similar set of properties for each module it accesses. The following example shows the properties you define on the Hub to access RPA Hub:

The properties use these values:
| Value | Description |
|---|---|
| Client ID, client secret, domain | Common to most OAuth 2.0 providers. Find them in the settings of your provider. |
| Refresh token | Used by some providers. It usually stays valid for a long time; you can configure the period in the provider settings. |
| Azure scope, Azure organization | Used only with the Azure provider. Find them in the Azure settings. |
Getting a refresh token
The exact procedure depends on the provider and is described in the provider sections below. The main steps are always the same:
- Register on the chosen platform (AWS, Okta, Salesforce).
- Create users with the roles
adminanduser. Tokens differ foruserandadmin. - Send the authorization requests described in the provider section. They differ for each provider.
- Receive the refresh token, which contains information about the authenticated user.
Built-in OAuth authorization
Use the built-in authorization server when you do not want to depend on an external identity provider.
-
Run the
authorization_serverapplication. In itsapplication.properties, set your own client secret and client ID.Warning
Use the same client secret and client ID when you configure communication between modules (see Configuring communication between modules).

-
Change
basictooauthinapplication.propertiesat/opt/info-connect-hub/config/and uncomment the OAuth properties below it.

auth.type = oauth spring.oauth.resource.server.issuer-uri=http://localhost:8081 spring.oauth.resource.server.authority.admin=ROLE_admin spring.oauth.resource.server.authority.user=ROLE_user spring.oauth.resource.server.authority.claim=roleWarning
The issuer URI is also used as the domain when you configure communication between modules.

-
Start the authorization server.
-
To start the authorization server automatically, enable autostart.
-
Restart the Hub.
-
Open the Postman OAuth collection, folder Built-in oauth, and send the request BUILT_IN:Get code verifier and code challenge. It returns the
code_verifierfor the token request and thecode_challengefor generating the authorization code.
-
In the same folder, open the request BUILT_IN: Get oauth code. Copy the
code_challengefrom the application console and paste it into the same parameter of the request.
-
Copy the request URL, paste it into your browser and sign in with user or admin credentials.

-
After you sign in, the browser redirects you to a Spring page. Copy the
codeparameter from the page URL.
-
Open the request BUILT_IN: Get oauth token. Paste the copied code into the
codeparameter. Copy thecode_verifierfrom the application console and paste it into thecode_verifierparameter.
-
Send the request to receive the access token.
Note
The response also contains the refresh token, which you use when you configure communication between modules.

-
To validate the received token, send the request BUILT_IN: Validate OAuth token.
-
Use the access token to call the endpoints of the Hub.
AWS OAuth authorization
To use AWS Cognito as the OAuth provider, create a user pool in the AWS Management Console.
-
Open the AWS website.
-
Select My Account > AWS Management Console in the upper-right corner. On the login page, sign in or create your AWS account.

-
After you sign in, search for Amazon Cognito in the search box and open it.

-
Create a user pool: select User Pools > Create User Pool.

-
Enter the user pool details: the name of your application and the redirect URI. The browser redirects to this URI in a later step and returns the access code.


-
After the user pool is created, it appears in the user pool list. Open it.

-
Create a user: open the Users tab and select Create User.

-
Enter the user's email and password. The new user appears on the Users tab of your user pool.

-
Create the
adminandusergroups: open the Groups tab, select Create Group and fill in the details of each group.

-
Return to the Users tab, open the new user and add the user to the
adminorusergroup.
-
To receive a token, you first need a code. Select App Clients > Login Pages > View Login Page and sign in with the credentials of the new user.


-
After you sign in, the browser redirects you to the URI entered at the beginning. Copy the
codevalue from the URL in the address bar.
-
Collect the values needed for the token request. You need the client ID and client secret from App Clients.

You also need the domain. In the left panel, select Brand > Domain and copy the domain. You can also edit the domain there.

-
Before you get a refresh token, edit the refresh token lifetime in the user pool settings.
Warning
The default lifetime is 5 days. After that your application stops working until you receive a new refresh token, put it into the properties and restart the application.
Select User pools > your user pool > App clients > your app client > Edit.

In the opened window, edit the refresh token lifetime. You can enter a longer value, for example one year.

Select Save changes in the bottom-right corner.
-
Get the refresh token with one of the two methods below. Replace the placeholders with the values from the previous steps. The code is valid for a short time, so send the token request as soon as you receive the code.
Option 1: Request in a terminal
Send the following request.
curl -X POST \ -H "Content-Type: application/x-www-form-urlencoded" \ -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \ -d "grant_type=authorization_code" \ -d "code=YOUR_OBTAINED_CODE" \ -d "redirect_uri=YOUR_REDIRECT_URI" \ "YOUR_DOMAIN/oauth2/token"The response looks like this:
{ "access_token": "eyJraWQiOiJ....", "refresh_token": "eyJjdHkiOiJKV1QiLCJhbGciOiJSUzI1NiJ9....", "id_token": "eyJraWQiOiJ....", "token_type": "Bearer", "expires_in": 3600 }Extract the refresh token from the response and put it into the application properties file.
Option 2: Request in Postman
Send the request AWS: Get oauth token from the Postman collection.

The response is the same as in the terminal. Extract the refresh token and put it into the application properties file.

-
Using the information from the token payload, configure
application.propertiesof theinfo-connect-hubapplication:auth.type = oauth # ISSUER_URI # A website, application, or service that creates and signs JWTs. spring.oauth.resource.server.issuer-uri_OKTA=empty spring.oauth.resource.server.issuer-uri_BUILT_IN=empty spring.oauth.resource.server.issuer-uri_AWS=YOUR_ISSUER_URI spring.oauth.resource.server.issuer-uri_SALESFORCE=empty spring.oauth.resource.server.issuer-uri_AZURE=empty # MAIN_CONFIG # The configuration you use for your OAuth provider. spring.oauth.resource.server.issuer-uri=YOUR_ISSUER_URI spring.oauth.resource.server.authority.admin=ROLE_admin spring.oauth.resource.server.authority.user=ROLE_user # The parameter that contains information about the user's role when using OAuth. # Allows extracting user roles from JWT token. # For AWS use 'cognito:groups', for Azure - 'roles', for BUILT_IN server - 'role'. spring.oauth.resource.server.authority.claim=cognito:groups -
To validate the token, send the request AWS: Validate OAuth Token. Pass the token as a parameter and add
issUrlfrom the token as a parameter.
Okta OAuth authorization
-
In Okta, open Applications and select Applications from the menu.

-
Select Create App Integration.
-
Select OIDC - OpenID Connect and Web Application.

-
Create the application.



-
Open the Sign On tab and find OpenID Connect ID token. Select Edit > Issuer > Okta URL > Save.



-
Open the Directory tab and select Groups.


-
Select Add group and create one group for admins and one for users.


-
Add the user to a group and create the scope and claim that carry the group information:
-
Open the group to which you want to assign a user.

-
Select Assign people, choose the user and select the plus button.

-
Add a scope, which is named
rolehere. Later you place the claim with the user's group or role in it.

-
Open the Scopes tab, select Add Scope and set up the scope.

-
Select Add Scope and set up the scope.

-
Open the Claims tab and select Add Claim.

-
Set up the claim with these values:
name:namefilter: Match regex (admin | user)Include in: the scope from the previous steps

-
-
Update the requests in the Okta folder of the Postman collection. In the request Okta: Get OAuth Code, copy the Sign-in redirect URIs from Okta and paste them into the
redirect_uriparameter. Copy theclient_idand paste it into theclient_idparameter.


-
Copy the request, paste it into your browser and sign in. After the redirect, copy the
codeparameter from the address bar.
-
Paste the copied code into the
codeparameter of the request OKTA: Get OAuth Token and set the other parameters:redirect_uri: the Sign-in redirect URIs value copied in the previous stepclient_id: find it on the General tabclient_secret: find it on the General tab



-
Decode the token on jwt.io.

-
Using the information from the token payload, configure
application.propertiesof theinfo-connect-hubapplication:auth.type=oauth spring.oauth.resource.server.issuer-uri=<iss> spring.oauth.resource.server.issuer-uri_OKTA=<iss> # Name of the claim that contains the user's group or role spring.oauth.resource.server.authority.claim=<claim-name> # Must correspond to the names of your groups in Okta, prefixed with ROLE_ spring.oauth.resource.server.authority.admin=ROLE_admin spring.oauth.resource.server.authority.user=ROLE_user
-
To validate the token, send the request OKTA: Validate oauth token with the token in the body parameter.

Salesforce OAuth authorization
-
After you sign in to Salesforce, select the gear icon next to your profile (Setup).

-
Go to the App tab under the Platform Tools category and select App Manager.

-
Select New Connected App.

-
Configure the connected app, for example as follows:
- Enable OAuth Settings: true
- Selected OAuth Scopes: Access unique user identifiers (openid)
- Include custom attributes
- Include custom permissions



-
Scroll down the page of the new connected app and create a new custom attribute.

-
Create an attribute based on the user's role. You create the role in the next step.

-
Create a user role: in the Administration section, select Users > Roles > Add Role.




-
Assign the role to a user:
-
Open the role to which you want to assign the user.

-
Select Assign Users to Role.

-
In the Available Users Search list, select All Users.

-
Select the user to whom you want to assign the role.
-
-
Return to the connected app and select Manage Consumer Details to get the
client_idandclient_secret.

-
Copy the
client_idandclient_secretand paste them into the corresponding fields of the SALESFORCE: Get OAuth Token request in the OAuth collection. Also add the callback URL that you created when you configured the connected app.
-
After you generate the token, you receive an access token and an ID token. Use the ID token, because the access token is not in JWT format. Decode it on jwt.io.

-
Using the information from the token payload, configure
application.propertiesof theinfo-connect-hubapplication:auth.type=oauth spring.oauth.resource.server.issuer-uri=<iss> spring.oauth.resource.server.issuer-uri_SALESFORCE=<iss> # Name of the parameter from which the role or group is read spring.oauth.resource.server.authority.claim=<claim-name> # Must correspond to the names of your groups in Salesforce, prefixed with ROLE_ spring.oauth.resource.server.authority.admin=ROLE_admin spring.oauth.resource.server.authority.user=ROLE_user
-
To validate the token, send the request SALESFORCE: Validate OAuth Token. Pass your token,
client_idandclient_secretas parameters.
Azure AD OAuth authorization
-
Sign in to Azure Active Directory.
-
In the Manage category, select App registrations > New registration.


-
Use this configuration:
- Supported account type: Account in any organizational directory (Any Azure AD directory - Multitenant)

-
Set the Application ID URI: select Add next to Application ID URI and, in the pop-up window, select Save.


-
Open the App roles tab in the Manage category.

-
Select Create app role.

-
Create the roles. You need one role for admin and one for user. Use these values:
- Name:
admin/user - Allowed member type: Applications
- Value:
admin/user - Do you want to enable this app role?: true

- Name:
-
Create a client for this application: open the App registrations tab.

-
Register a new application. For two roles, register two client applications: one for the admin role and one for the user role. Use these values:
- Name: YOUR_NAME
- Supported account type: Account in any organizational directory (Any Azure AD directory - Multitenant)

-
Add API permissions: open the API permissions tab and select Add a permission.



-
Select My APIs and choose your application created in the previous step (8). Then grant admin consent for
<your organization>or ask your organization's administrator to do it.

-
Configure the
client_idandclient_secret:-
Open the Certificates and secrets tab and select New client secret.



-
Copy the
client_secretfrom the Value field and paste it into theclient_secretparameter of the request AZUREAD: Get oauth token.
-
Copy the Application ID and paste it into the
client_idparameter of the request.
-
Open All apps by selecting
<your_organization>.
-
Choose the app you created first. In the original example it is AzureADOauthExample. Copy its Application ID URI. Before you paste it into the request parameter, add
/.defaultto the URI, for exampleapi://<application-id>/.default.
-
-
Open All applications, choose your client application and select Endpoints.


-
Copy the OAuth 2.0 token endpoint (v2) and paste it into the URL field of the request AZUREAD: Get oauth token. Replace
organizationswith the value of the Directory ID.



-
You now have an access token. Decode it on jwt.io.

-
Using the information from the token payload, configure
application.propertiesof theinfo-connect-hubapplication:auth.type=oauth spring.oauth.resource.server.issuer-uri=<iss> spring.oauth.resource.server.issuer-uri_AZURE=<iss> # Name of the claim from which the role or group is read spring.oauth.resource.server.authority.claim=roles # Must correspond to the names of your groups in Azure, prefixed with ROLE_ spring.oauth.resource.server.authority.admin=ROLE_admin spring.oauth.resource.server.authority.user=ROLE_user
-
Token validation: Azure does not currently provide a validation endpoint. According to Microsoft forum posts, Microsoft is working on it.