Let Oomnitza be your single source of truth!
You'll get visibility of your users as data from GitLab is automatically transformed into consumable information and actionable insights.
Connect Oomnitza and GitLab in minutes
You'll get visibility of your GitLab users by creating configurable workflows to automate tasks such as:
-
- Retrieving SaaS user roles
- Getting a user's last login activity, enabling you to identify accounts that are underutilized or that can be canceled
- Deleting users, such as inactive or underutilized users.
- Onboarding and offboarding users
- Managing user access, including banning/unbanning, rejecting/approving, blocking/unblocking, and deactivating/activating users
Contents
- Before you start
- Creating workflows
-
Create user workflows
- GitLab Activate User
- GitLab Add SSH Key To User
- GitLab Approve User
- GitLab Ban User
- GitLab Block User
- GitLab Create User
- GitLab Deactivate User
- GitLab Delete SSH Key Of User
- GitLab Delete User
- GitLab Disable Two Factor Auth On User
- GitLab Get User Details
- GitLab Get User Status
- GitLab Reject User
- GitLab Set User Status
- GitLab Unban User
- GitLab Unblock User
- GitLab Update User
- Create SaaS user workflows
Before you start
Before you can create the integration with Oomnitza, you need to have added your GitLab credentials to Oomnitza.
You will also need to have added your GitLab Domain as a global variable. For further information, see Setting your GitLab Domain as a global variable.
We recommend that you also create an extended integration for GitLab users. You can use the information retrieved in these integrations to trigger workflows.
Creating workflows
Create user workflows
To create a user workflow, you must complete these steps:
- Click Configuration > Workflows
- Click Add
and select People from the list.
- Edit the Begin Block and add rules to trigger the workflow. For example, if you set the Actions to Schedule and add a rule so that the Email Equals <EmployeeEmail> you can trigger a workflow to fetch a user matching a certain name on a specific date. Refer to Using the Begin block.
- Drag and drop the API block onto the Sandbox.
- Click Edit on the API block and enter GitLab in the search field.
- Select a preset from the list below. To choose a preset, click the forward arrow (>).
- GitLab Activate User
- GitLab Add SSH Key To User
- GitLab Approve User
- GitLab Ban User
- GitLab Block User
- GitLab Create User
- GitLab Deactivate User
- GitLab Delete SSH Key Of User
- GitLab Delete User
- GitLab Disable Two Factor Auth On User
- GitLab Get User Details
- GitLab Get User Status
- GitLab Reject User
- GitLab Set User Status
- GitLab Unban User
- GitLab Unblock User
- GitLab Update User
- Select the credentials that you created in Adding your GitLab credentials to Oomnitza.
- Your Domain should be derived from the global variable you created in Setting your GitLab Domain as a global variable.
- Enter any mandatory information when prompted.
- Select Advanced Mode.
- Select the Information or Body tab. Review and ensure that the properties referenced in these locations, such as
{{gitlab_user_id}}, exist in Oomnitza and are populated with information before you run this workflow. You can create a user integration to retrieve this information before you run this workflow. -
Select the Response tab. You can map the entire response by placing
{{response}}in the Response field and mapping it to a custom long text Oomnitza field, such as API Response. Once you have the entire response, you can then parse the JSON response values to custom Oomnitza fields, as per the example below. - Connect the Blocks.
- Save, validate, and activate your workflow.
Fig: Mapping the Get User response.
Using the GitLab Activate User preset
The GitLab Activate User preset activates the specified user. The user to be activated is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Activate user
Using the GitLab Add SSH Key To User preset
The GitLab Add SSH Key To User preset creates a new key for the specified user. You need to supply the following information to add a new key:
- SSH Key Title: The key title.
- SSH Key: The new SSH Key.
- Expires At: The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).
The user to be assigned the key is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Add SSH key for user
Using the GitLab Approve User preset
The GitLab Approve User preset approves the specified user.
The user to be approved is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Approve user.
Using the GitLab Ban User preset
The GitLab Ban User preset bans the specified user.
The user to be banned is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Ban user.
Using the GitLab Block User preset
The GitLab Block User preset blocks the specified user.
The user to be blocked is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Block user.
Using the GitLab Create User preset
The GitLab Create User preset creates a user.
You need to supply the following information to add a new user:
- Username
- Full Name
Newly created users will be sent a link to create a password for their user accounts. This feature is specified in the Advanced Mode > Information tab in
The parameters: reset_password, and force_random_passwordare set to true in the Advanced Mode > Body tab. This ensures that newly created users will be sent a password reset link.
This preset is available only for administrators.
For further information, see GitLab Docs: User creation
Using the GitLab Deactivate User preset
The GitLab Deactivate User preset deactivates a user.
The user to be deactivated is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Deactivate User
Using the GitLab Delete SSH Key Of User preset
The GitLab Delete SSH Key Of User preset deletes the SSH key of the specified user.
You need to supply the SSH Key to be deleted. The user associated with the SSH key is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Delete SSH key for given user
Using the GitLab Delete User preset
The GitLab Delete User preset deletes the specified user.
If the Hard Delete checkbox is enabled, contributions that would usually be moved to Ghost User are deleted instead, as well as groups owned solely by this user.
The user to be deleted is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: User deletion
Warning
If successful, this workflow returns a204 No Contentresponse code.
Using the GitLab Disable Two Factor Auth On User preset
The GitLab Disable Two Factor Auth On User disables two-factor authentication for the specified user.
The user to be disabled is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Disable two-factor authentication
Using the GitLab Get User Details preset
The GitLab Get User Details preset gets the details of the specified user.
The user to be retrieved is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
For further information, see GitLab Docs: Single user
Using the GitLab Get User Status preset
The GitLab Get User Status preset gets the status of a user.
The user to be retrieved is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
For further information, see GitLab Docs: Get the status of a user
Using the GitLab Reject User preset
The GitLab Reject User preset rejects a user that is pending approval.
The user to be rejected is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Reject user
Using the GitLab Set User Status preset
The GitLab Set User Status preset sets the status of a user.
You need to supply the following information to set the status:
- Emoji: Name of the emoji to use as status, for example, coffee. If omitted, a speech_balloon is used. The emoji name can be one of the specified names in the Gemojione index.
- Message: Message to set as a status, for example, Gone to get coffee. It can also contain emoji codes. Cannot exceed 100 characters.
- Clear Status After: Automatically clean up the status after a time supplied in ISO 8601 format
(YYYY-MM-DDTHH:MM:SSZ), for example, 2022-09-29T17:08:01.311Z. Permitted intervals include:30_minutes,3_hours,8_hours,1_day,3_days,7_days,30_days
The user to be updated is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
For further information, see GitLab Docs: Set user status
Using the GitLab Unban User preset
The GitLab Unban User preset unbans the specified user.
The user to be unbanned is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Unban user
Using the GitLab Unblock User preset
The GitLab Unblock User preset unblocks the specified user.
The user to be unblocked is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}.
This preset is available only for administrators.
For further information, see GitLab Docs: Unblock user
Using the GitLab Update User preset
The GitLab Update User preset updates the specified user.
The user to be updated is referenced in the Advanced Mode > Information tab in the property{{gitlab_user_id}}. The parameters: email, username, and name are required in the Advanced Mode > Body tab.
This preset is available only for administrators.
For further information, see GitLab Docs: User modification
Reference articles for workflows
Create SaaS user workflows
You can create a Saas User workflow in Oomnitza using the GitLab User Role preset. This preset supplies you with the Role and Last Login Date of your SaaS users.
Prerequisites
Before you create a SaaS user workflow, you should have already run your extended user integration and selected User plus SaaS User to populate the software entry in the Software > SaaS menu.
To create a Saas User workflow using the GitLab User Role preset, complete the following steps:
- Click Configuration > Workflows
- Click Add (+) and select Software SaaS Users from the list.
- Enter the name and a description of the workflow.
- Edit the Begin block by adding the rules that will trigger the workflow. For further information see SaaS User Roles.
- Click the Blocks tab, and drag and drop the SaaS User Role retrieval block onto the canvas.
- Click the Edit icon.
- Enter GitLab in the search field and choose the GitLab User Role preset.
- Click the right arrow >.
- Enter your Credentials.
- Select the Deactivate User checkbox to deactivate the SaaS user in SaaS > GitLab > Users if they are not found in your GitLab instance.
- Click SAVE.
- Connect the blocks.
- Save, validate, and activate your workflow
To view active GitLab users in the SaaS Users UI, complete the following steps:
- Click Software from the menu.
- Select the SaaS tab, and select your software entry for GitLab.
- Click Users in the side pane.
- The Role and Last activity column will be populated with the user details to confirm that this user has been found in your GitLab SaaS.
Comments
0 comments
Please sign in to leave a comment.