gitlab-user-sync | G Suite user directory and GitLab group membership
kandi X-RAY | gitlab-user-sync Summary
kandi X-RAY | gitlab-user-sync Summary
gitlab-user-sync is a Python library. gitlab-user-sync has no bugs, it has no vulnerabilities, it has build file available, it has a Strong Copyleft License and it has low support. You can download it from GitHub.
Are you using G Suite as a user directory? Do you want to simplify your process for handling joiners/leavers to your organisation? Are you also using GitLab?. This project provides a script that will synchronise membership of a group on GitLab.com (other GitLab editions have other mechanisms for single sign on) with your users in your G Suite directory (GitLab.com does support SSO for joining a group, but this handles also removing those members). It does this by having a custom attribute in your G Suite directory that corresponds to a GitLab username, and inviting those users to your GitLab group if they are not already a member. If you have any members of your group who do not have a username recorded against a corresponding user in your G Suite Directory will be removed from your group.
Are you using G Suite as a user directory? Do you want to simplify your process for handling joiners/leavers to your organisation? Are you also using GitLab?. This project provides a script that will synchronise membership of a group on GitLab.com (other GitLab editions have other mechanisms for single sign on) with your users in your G Suite directory (GitLab.com does support SSO for joining a group, but this handles also removing those members). It does this by having a custom attribute in your G Suite directory that corresponds to a GitLab username, and inviting those users to your GitLab group if they are not already a member. If you have any members of your group who do not have a username recorded against a corresponding user in your G Suite Directory will be removed from your group.
Support
Quality
Security
License
Reuse
Support
gitlab-user-sync has a low active ecosystem.
It has 1 star(s) with 0 fork(s). There are no watchers for this library.
It had no major release in the last 12 months.
gitlab-user-sync has no issues reported. There are no pull requests.
It has a neutral sentiment in the developer community.
The latest version of gitlab-user-sync is 1.0.0
Quality
gitlab-user-sync has 0 bugs and 0 code smells.
Security
gitlab-user-sync has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
gitlab-user-sync code analysis shows 0 unresolved vulnerabilities.
There are 0 security hotspots that need review.
License
gitlab-user-sync is licensed under the GPL-3.0 License. This license is Strong Copyleft.
Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.
Reuse
gitlab-user-sync releases are available to install and integrate.
Build file is available. You can build the component from source.
Installation instructions, examples and code snippets are available.
It has 77 lines of code, 5 functions and 3 files.
It has low code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA
kandi has reviewed gitlab-user-sync and discovered the below as its top functions. This is intended to give you an instant insight into gitlab-user-sync implemented functionality, and help decide if they suit your requirements.
- Main function for GitLab .
- Fetches the expected GitLab users .
- Build a directory service .
- Return a Gitlab service instance .
- Returns a dict of gitlab users .
Get all kandi verified functions for this library.
gitlab-user-sync Key Features
No Key Features are available at this moment for gitlab-user-sync.
gitlab-user-sync Examples and Code Snippets
No Code Snippets are available at this moment for gitlab-user-sync.
Community Discussions
No Community Discussions are available at this moment for gitlab-user-sync.Refer to stack overflow page for discussions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gitlab-user-sync
You will need to create a new field in your G Suite directory to hold the relevant Gitlab usernames. Select Add a Custom Attribute (or if you have a category called External Services already, edit it). Name the Category External Services and under custom fields create a field with name GitLab username, type text, visible to admin and single value (case is important in both cases). You will need to create a service account to allow the script to read from your G Suite directory. [Follow Google’s docs to create a service account](https://support.google.com/a/answer/7378726?hl=en), and ensure that the Admin SDK is enabled. Make a note of the client ID, and download the service account credentials file in JSON form. Keep this secret. Enable the service account to read from your Directory. Go to [Manage API client access](https://admin.google.com/AdminHome?chromeless=1#OGX:ManageOauthClients) and add an entry with the Client Name being the ID (long number string) of the service account, and the API scope https://www.googleapis.com/auth/admin.directory.user.readonly. Use the G Suite users panel to populate the appropriate users with their GitLab usernames. [Find out your G Suite customer ID](https://stackoverflow.com/questions/33493998/how-do-i-find-the-immutable-id-of-my-google-apps-account) and make a note of it. Create a personal API token in GitLab.com for someone who is an administrator of the group. Also keep this secret. Find out what the numeric ID of your GitLab group is. This is shown on the settings page for the group. Run the script. Configuration options are passed as environment variables.
Install this script: Classic way: python3 setup.py install Docker way: docker build -t 1500cloud/gitlab-user-sync:latest .
You will need to create a new field in your G Suite directory to hold the relevant Gitlab usernames.
Go to https://admin.google.com/u/1/ac/customschema
Select Add a Custom Attribute (or if you have a category called External Services already, edit it)
Name the Category External Services and under custom fields create a field with name GitLab username, type text, visible to admin and single value (case is important in both cases)
You will need to create a service account to allow the script to read from your G Suite directory. [Follow Google’s docs to create a service account](https://support.google.com/a/answer/7378726?hl=en), and ensure that the Admin SDK is enabled. Make a note of the client ID, and download the service account credentials file in JSON form. Keep this secret.
Enable the service account to read from your Directory. Go to [Manage API client access](https://admin.google.com/AdminHome?chromeless=1#OGX:ManageOauthClients) and add an entry with the Client Name being the ID (long number string) of the service account, and the API scope https://www.googleapis.com/auth/admin.directory.user.readonly.
Use the G Suite users panel to populate the appropriate users with their GitLab usernames.
[Find out your G Suite customer ID](https://stackoverflow.com/questions/33493998/how-do-i-find-the-immutable-id-of-my-google-apps-account) and make a note of it.
Create a personal API token in GitLab.com for someone who is an administrator of the group. Also keep this secret.
Find out what the numeric ID of your GitLab group is. This is shown on the settings page for the group.
Run the script. Configuration options are passed as environment variables. Classic way: ``` GOOGLE_CREDENTIALS_PATH=credentials.json \ GOOGLE_ADMINISTRATOR_ACCOUNT=administrator@example.com \ GOOGLE_CUSTOMER_ID=C12345678 \ GITLAB_ACCESS_TOKEN=ABCDEFABCEDF \ GITLAB_GROUP_ID=123456 \ sync-gitlab-users ``` Docker way: ``` docker run -e GOOGLE_CREDENTIALS_PATH=/secrets/credentials.json \ -e GOOGLE_ADMINISTRATOR_ACCOUNT=administrator@example.com \ -e GOOGLE_CUSTOMER_ID=C12345678 \ -e GITLAB_ACCESS_TOKEN=ABCDEFABCEDF \ -e GITLAB_GROUP_ID=123456 \ --mount src=/root/secrets/user-sync/,dst=/secrets/,readonly=true,type=bind \ 1500cloud/gitlab-user-sync:latest ``` Any changes that have been made are printed out to the terminal. As a get out clause, if the script thinks that every member who is currently in the GitLab group should be removed, it will exit without doing anything.
Install this script: Classic way: python3 setup.py install Docker way: docker build -t 1500cloud/gitlab-user-sync:latest .
You will need to create a new field in your G Suite directory to hold the relevant Gitlab usernames.
Go to https://admin.google.com/u/1/ac/customschema
Select Add a Custom Attribute (or if you have a category called External Services already, edit it)
Name the Category External Services and under custom fields create a field with name GitLab username, type text, visible to admin and single value (case is important in both cases)
You will need to create a service account to allow the script to read from your G Suite directory. [Follow Google’s docs to create a service account](https://support.google.com/a/answer/7378726?hl=en), and ensure that the Admin SDK is enabled. Make a note of the client ID, and download the service account credentials file in JSON form. Keep this secret.
Enable the service account to read from your Directory. Go to [Manage API client access](https://admin.google.com/AdminHome?chromeless=1#OGX:ManageOauthClients) and add an entry with the Client Name being the ID (long number string) of the service account, and the API scope https://www.googleapis.com/auth/admin.directory.user.readonly.
Use the G Suite users panel to populate the appropriate users with their GitLab usernames.
[Find out your G Suite customer ID](https://stackoverflow.com/questions/33493998/how-do-i-find-the-immutable-id-of-my-google-apps-account) and make a note of it.
Create a personal API token in GitLab.com for someone who is an administrator of the group. Also keep this secret.
Find out what the numeric ID of your GitLab group is. This is shown on the settings page for the group.
Run the script. Configuration options are passed as environment variables. Classic way: ``` GOOGLE_CREDENTIALS_PATH=credentials.json \ GOOGLE_ADMINISTRATOR_ACCOUNT=administrator@example.com \ GOOGLE_CUSTOMER_ID=C12345678 \ GITLAB_ACCESS_TOKEN=ABCDEFABCEDF \ GITLAB_GROUP_ID=123456 \ sync-gitlab-users ``` Docker way: ``` docker run -e GOOGLE_CREDENTIALS_PATH=/secrets/credentials.json \ -e GOOGLE_ADMINISTRATOR_ACCOUNT=administrator@example.com \ -e GOOGLE_CUSTOMER_ID=C12345678 \ -e GITLAB_ACCESS_TOKEN=ABCDEFABCEDF \ -e GITLAB_GROUP_ID=123456 \ --mount src=/root/secrets/user-sync/,dst=/secrets/,readonly=true,type=bind \ 1500cloud/gitlab-user-sync:latest ``` Any changes that have been made are printed out to the terminal. As a get out clause, if the script thinks that every member who is currently in the GitLab group should be removed, it will exit without doing anything.
Support
For any new features, suggestions and bugs create an issue on GitHub.
If you have any questions check and ask questions on community page Stack Overflow .
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page