site/content/en/docs/account_management/social-accounts-configuration.md
{{% alert title="Note" color="primary" %}} This is a paid feature available for Enterprise clients. {{% /alert %}}
You can now easily set up authentication with popular social services, which opens doors to such benefits as:
Currently, we offer three options:
With more to come soon. Stay tuned!
To enable authentication, do the following:
auth/userinfo.email, auth/userinfo.profile, and openid.
Click Update, and Save and Continue.For more information, see Configure Auth Consent.
For example, if you plan to deploy CVAT instance on https://localhost:8080, add https://localhost:8080
to authorized JS origins and https://localhost:8080/api/auth/social/goolge/login/callback/ to redirect URIs.
Create configuration file in CVAT:
Create the auth_config.yml file with the following content:
---
social_account:
enabled: true
google:
client_id: <some_client_id>
client_secret: <some_client_secret>
Set AUTH_CONFIG_PATH="<path_to_auth_config> environment variable.
In a terminal, run the following command:
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.override.yml up -d --build
There are 2 basic steps to enable GitHub account authentication.
For more information, see Creating an OAuth App
Fill in the name field, set the homepage URL (for example: https://localhost:8080),
and authentication callback URL (for example: https://localhost:8080/api/auth/social/github/login/callback/).
Create configuration file in CVAT:
Create the auth_config.yml file with the following content:
---
social_account:
enabled: true
github:
client_id: <some_client_id>
client_secret: <some_client_secret>
Set AUTH_CONFIG_PATH="<path_to_auth_config> environment variable.
In a terminal, run the following command:
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.override.yml up -d --build
{{% alert title="Note" color="primary" %}} You can also configure GitHub App, but don't forget to add required permissions.
In the Permission > Account permissions > Email addresses must be set to read-only. {{% /alert %}}
To enable authentication with Amazon Cognito for your CVAT instance, follow these steps:
Now, let’s dive deeper into how to accomplish these steps.
This step is optional and should only be performed if a user pool has not already been created. To create a user pool, follow these instructions:
Cognito in the list of servicesCreate user poolTo create a new app client, follow these steps:
App clients item in the menu on the leftCreate app clientApplication type: Traditional web applicationApplication name: Specify a desired name, or leave the autogenerated oneReturn URL (optional): Specify the CVAT redirect URL
(<http|https>://<cvat_domain>/api/auth/social/amazon-cognito/login/callback/).
This setting can also be updated or specified later after the app client is created.Login pages tab of the created app clientManaged login pages configuration section and edit them if needed:
Allowed callback URLs: Must be set to the CVAT redirect URLIdentity providers: Must be specifiedOAuth grant types: The Authorization code grant must be selectedOpenID Connect scopes: OpenID, Profile, Email scopes must be selectedTo configure social authentication in CVAT, create a configuration file
(auth_config.yml) with the following content:
---
social_account:
enabled: true
amazon_cognito:
client_id: <client_id>
client_secret: <client_secret>
domain: <custom-domain> or
https://<custom-cognito-prefix>.auth.us-east-1.amazoncognito.com
To find the client_id and client_secret values, navigate to the created app client page
and check the App client information section. To find domain, look for the Domain item in the list on the left.
Once the configuration file is updated, several environment variables must be exported before running CVAT:
export AUTH_CONFIG_PATH="<path_to_auth_config>"
export CVAT_HOST="<cvat_host>"
# cvat_port is optional
export CVAT_BASE_URL="<http|https>://${CVAT_HOST}:<cvat_port>"
Start the CVAT enterprise instance as usual.
That's it! On the CVAT login page, you should now see the option Continue with Amazon Cognito.