GitLab Integration is here!

Apr 21st, 2022

Roie Schwaber-Cohen avatar

Roie Schwaber-Cohen


Aserto GitLab Integration

Today we’re happy to announce that Aserto supports GitLab as a source-code provider! You can now use both GitHub and GitLab to store and version your authorization policy code.

In order to add GitLab as a source-code provider, you first need to create a GitLab Personal Access Token.

Log in to your GitLab account, and navigate to the personal access token page.

gitlab pat

Name your token “Aserto” and assign it with an expiration date. Then, select the “api” scope:


Finally, click “Create personal access token”:

create personal access token

Copy the newly created token, head to the Aserto console, and navigate to the Connections tab.

Click on “Add a connection”:

add a connection

In the dialog, select the “gitlab-pat” provider and name your connection “gitlab-pat”. Use the display name “GitLab” and paste the newly created GitLab PAT. Finally, click “Add connection”.

add gitlab connection

To test the newly created connection, head to the “Registry” tab and click “Create a new repository”:

create a repository

Select the “Use a template…” option and click “Continue”.

use template

Select the source code provider GitLab:

select scc

Next, select the `policy-peoplefinder-abac` template and select your GitLab organization. Name your policy repository `policy-peoplefinder-abac`.

select template

Finally, name the policy repository `peoplefinder-abac` (this will be the name used for your policy repository in Aserto) and click “Create a new policy repository”.

name repository

To view the newly created repository, head back to GitLab:

peoplefinder in gitlab

Aserto automatically creates the pipeline that builds the repository and pushes it to the Aserto image registry.

gitlab pipeline

Once the pipeline is completed, you’ll see the following:

pipeline complete

When you head back to the Aserto console, open the policy repository. You’ll see the following:

policy in aserto

When you make changes to the policy and push them to the repository, the pipeline will run again and the policy will be automatically updated in the Aserto policy repository.

Roie Schwaber-Cohen avatar

Roie Schwaber-Cohen

Developer Advocate