Use AliCloud as an OmniAuth authentication provider
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, Self-managed
You can enable the AliCloud OAuth 2.0 OmniAuth provider and sign in to GitLab using your AliCloud account.
Create an AliCloud application
Sign in to the AliCloud platform and create an application on it. AliCloud generates a client ID and secret key for you to use.
-
Sign in to the AliCloud platform.
-
Go to the OAuth application management page.
-
Select Create Application.
-
Fill in the application details:
- Application Name: This can be anything.
- Display Name: This can be anything.
- Callback URL: This URL should be formatted as
'GitLab instance URL' + '/users/auth/alicloud/callback'
. For example,http://test.gitlab.com/users/auth/alicloud/callback
.
Select Save.
-
Add OAuth scopes in the application details page:
- Under the Application Name column, select the name of the application you created. The application’s details page opens.
- Under the Application OAuth Scopes tab, select Add OAuth Scopes.
- Select the aliuid and profile checkboxes.
- Select OK.
-
Create a secret in the application details page:
- Under the App Secrets tab, select Create Secret.
- Copy the SecretValue generated.
Enable AliCloud OAuth in GitLab
-
On your GitLab server, open the configuration file.
-
For Linux package installations:
sudo editor /etc/gitlab/gitlab.rb
-
For self-compiled installations:
cd /home/git/gitlab sudo -u git -H editor config/gitlab.yml
-
-
Configure the common settings to add
alicloud
as a single sign-on provider. This enables Just-In-Time account provisioning for users who do not have an existing GitLab account. -
Add the provider configuration. Replace
YOUR_APP_ID
with the ID on the application details page andYOUR_APP_SECRET
with the SecretValue you got when you registered the AliCloud application.-
For Linux package installations:
gitlab_rails['omniauth_providers'] = [ { name: "alicloud", app_id: "YOUR_APP_ID", app_secret: "YOUR_APP_SECRET" } ]
-
For self-compiled installations:
- { name: 'alicloud', app_id: 'YOUR_APP_ID', app_secret: 'YOUR_APP_SECRET' }
-
-
Save the configuration file.
-
Reconfigure GitLab if you installed using the Linux package, or restart GitLab if you installed from source.
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support