Step 1: Register the Cognite API and authentication and authorization servers
1
Sign in to Amazon Cognito
Sign in to the Amazon Cognito console as an admin. If prompted, enter your AWS credentials.
2
Select a user pool
Select an existing user pool from the list, or create a user pool.
3
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.
4
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.
5
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
1
Sign in to Amazon Cognito
Sign in to the Amazon Cognito console as an admin. If prompted, enter your AWS credentials.
2
Select a user pool
Select an existing user pool from the list, or create a user pool.
3
Select Create app client
Under Applications, select App clients, and then select Create app client.
4
Under Application type, select Traditional web application
5
Name the application
Name your application Cognite Data Fusion.
6
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.
7
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.
8
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.
9
Activate the Cognite Data Fusion sign-in page
- Under Branding, select Managed login > Create a style.
- Select the Cognite Data Fusion app client, and then select Create.