Step 1: Register the Cognite API and authentication and authorization servers
Sign in to Amazon Cognito
Sign in to the Amazon Cognito console as an admin. If prompted, enter your AWS credentials.
Register the Cognite API:
- Under Branding, select Domain.
- Under Resource servers, select Create resource server.
- In Resource server name, enter Cognite API.
- In Resource server identifier, enter https://cognitedata.com.
-
Under Custom scopes, add two scopes:
- Scope name:
IDENTITYand description:identity - Scope name:
user_impersonationand description:User impersonation.
- Scope name:
- Select Create resource server.
Register the resource server
Register the resource server for Cognito service account authentication:
- Under Branding, select Domain.
- Under Resource servers, select Create resource server.
- In Resource server name, enter Service account.
- In Resource server identifier, enter https:/. (NOTE: It’s https:/ and not https:// )
-
Under custom scopes, add a scope:
- Scope name: IDENTITY and description: identity
- Scope name: {{cluster}}.cognitedata.com and description: audience.
- Select Create resource server.
Register a Cognite authorization server
- Under Applications, select App clients > Create app client.
- Under Application type, select Machine-to-machine application.
- Name your application Cognite authorization server and select Create app client. The client secret is created automatically.
-
In App client information, select Edit.
- Under Authentication flows, select ALLOW_USER_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_REFRESH_TOKEN_AUTH, and then select Save changes.
-
Under the Login pages tab, select Edit.
- In Identity providers, select Cognito user pool.
- In OAuth 2.0 grant types, select Client credentials.
- In Custom scope, select {{cluster}}.cognitedata.com.
- At the bottom of the page, select Save changes.
Step 2: Register the Cognite Data Fusion application
Sign in to Amazon Cognito
Sign in to the Amazon Cognito console as an admin. If prompted, enter your AWS credentials.
Create a client secret
In Return URL, enter https://auth.cognite.com/oauth2/external/callback, and select Create app client. The client secret is created automatically.
In App client information, select Edit
- Under Authentication flows, select ALLOW_USER_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_REFRESH_TOKEN_AUTH, and then select Save changes.
Under the Login pages tab, select Edit
- In Identity providers, select Cognito user pool.
- In OAuth 2.0 grant types, select Authorization code grant.
- In OpenID Connect scopes, select Email, OpenID, and Profile.
- In Custom scopes, select https://cognitedata.com/user_impersonation.
- At the bottom of the page, select Save changes.