Keycloak vs authentik for GitLab SSO

Keycloak fits GitLab sign-in inside a wider Keycloak estate. authentik fits teams that want its documented GitLab guide and SCIM option. Choose the GitLab tier first, since OIDC group membership and SCIM need Premium or Ultimate.

On this page

Keycloak or authentik for GitLab SSO: which one fits your instance

Keycloak fits when GitLab sign-in belongs to a wider Keycloak estate, where the same server brokers logins to external OpenID Connect or SAML providers or federates users from LDAP or Active Directory for other applications too. authentik fits when you want the GitLab guide its project maintains and the SCIM option that guide documents. Either choice is limited by your GitLab tier: OpenID Connect and SAML sign-in for GitLab Self-Managed are listed for Free, Premium and Ultimate, while OIDC group membership and SCIM provisioning need Premium or Ultimate. The general product comparison has its own page and is not repeated here, so confirm the integration gaps below with GitLab and each vendor before you make the choice final.

On the Keycloak path, GitLab's OpenID Connect documentation includes a Configure Keycloak section with an omniauth_providers example that uses the label Keycloak and the scopes openid, profile and email. Before you copy it, confirm two requirements: GitLab only talks to a Keycloak server served over HTTPS, and Keycloak must sign tokens with a public key algorithm. Keycloak's Server Administration Guide documents a SCIM API for provisioning users into Keycloak, which is the inbound direction. Ask Keycloak and GitLab to confirm whether Keycloak can push users or groups out to GitLab before you plan joiner and leaver handling. Group-based access also depends on an OIDC group claim, which GitLab ties to Premium or Ultimate.

On the authentik path, the GitLab guide supports both SAML and OpenID Connect, you choose one method, and its support level is listed as authentik. Check your authentik version first: the 2026.5 line changed SAML issuer and OAuth redirect URI types, so the guide gives different steps for older versions. Enabling omniauth_auto_sign_in_with_provider sends every sign-in straight to authentik, so test the fallback first. authentik notes that users can still reach GitLab's own login at /users/sign_in?auto_sign_in=false, and you should confirm an administrator can use that path before you turn auto sign-in on. For provisioning, authentik says GitLab SCIM for self-managed instances requires Premium or Ultimate plus SAML single sign-on, and that it covers users but not groups, so plan group membership separately.

SAML or OpenID Connect: choosing the sign-in protocol for GitLab

Choose OpenID Connect when you want GitLab to sign users in through its OmniAuth openid_connect provider and your identity provider issues OIDC tokens. GitLab's OIDC documentation includes a Configure Keycloak section with an example omniauth_providers block, labeled Keycloak, that requests the openid, profile and email scopes. The Keycloak example is a starting point for the client you create in the realm.

  • HTTPS only: GitLab can only talk to a Keycloak server that uses HTTPS, so the realm's endpoints and the redirect URI must be served over TLS to the GitLab host.
  • Public key token signing: Keycloak must be set to sign tokens with public key algorithms. A mismatch tends to surface at the first sign-in attempt, so test the client's signing setting before you open access.
  • Group membership needs a higher tier: OIDC group membership requirements are listed for Premium and Ultimate. On the Free tier, expect sign-in without OIDC group membership, and confirm the current tier table with GitLab before you design group-based access.
  • Automatic redirect: authentik's GitLab guide warns that enabling omniauth_auto_sign_in_with_provider sends every sign-in to the identity provider. Users can still reach GitLab's own login at /users/sign_in?auto_sign_in=false, so decide on that fallback before you enable the setting.

Before the first test, confirm the HTTPS endpoint, the signing algorithm and the group rules with your GitLab administrator, and check the client fields against the Keycloak Server Administration Guide.

What GitLab requires from its identity provider

Confirm which GitLab features your tier includes before you pick an identity provider, because the choice between Keycloak and authentik does not change them. For GitLab Self-Managed, OpenID Connect and SAML sign-in are listed in the Free, Premium and top tiers, so basic single sign-on does not require a paid plan. Group membership from OpenID Connect is a Premium and top-tier feature, and GitLab.com group SAML SSO is listed for Premium and the top tier only. If your access model depends on groups, plan for a paid GitLab tier from the start and confirm the current tier table with GitLab, since the tier decides which settings you can use. The two protocols also carry different transport and signing rules, which the next paragraph covers for Keycloak.

GitLab's OpenID Connect documentation has a Configure Keycloak section, and it sets two rules for Keycloak specifically. GitLab can only talk to a Keycloak server that uses HTTPS, so the public URL, the certificate chain and any reverse proxy in front of Keycloak must serve HTTPS before you register the client. Keycloak must also be set to sign tokens with public-key algorithms, so check the signing algorithm on the client before you test sign-in. The example omniauth_providers block in that section uses the label Keycloak and requests the openid, profile and email scopes, so keep those scopes in the client configuration. Authentik's GitLab guide supports both SAML and OpenID Connect, but you choose one method, so decide which protocol you will use before you configure either side.

Provisioning is where the sources differ in scope. Authentik's guide says GitLab SCIM for self-managed instances requires GitLab Premium or the top tier plus SAML single sign-on, and that GitLab SCIM supports user provisioning but not group provisioning. Because that guide ties SCIM to SAML, a team that wants OpenID Connect sign-in and SCIM together must confirm that combination with GitLab before designing around it. Keycloak's Server Administration Guide documents a SCIM API, listed as supported in the 26.8 release notes, but that API lets external systems provision users into Keycloak. The supplied material does not document how GitLab's SCIM behaves with Keycloak, so test user and group handling in a non-production group before you plan around it.

Keycloak and authentik against GitLab's requirements, side by side

This table sets GitLab's sign-in, group, transport and provisioning requirements side by side for Keycloak and authentik. Most GitLab tier rules apply to both identity providers, so the rows on protocols, provisioning and auto sign-in show where the two differ. Where a cell asks you to confirm a point, check it with GitLab or the identity provider's vendor before you commit to a design.

RequirementKeycloakauthentik
GitLab tier for sign-in (OIDC and SAML)Free, Premium and Ultimate for OIDC and SAML on GitLab Self-ManagedFree, Premium and Ultimate for OIDC and SAML on GitLab Self-Managed
OIDC group membership tierPremium or Ultimate. Confirm the group claim mapping in your Keycloak client.Premium or Ultimate. Confirm the group claim mapping in your authentik provider.
HTTPS and token signingGitLab requires HTTPS and public key signing algorithms for tokens. Set both in Keycloak.GitLab requires HTTPS and public key signing algorithms. Confirm the signing key setting on the authentik provider.
GitLab integration guide and supportGitLab's OIDC docs include a Configure Keycloak section with an omniauth example. Confirm who supports it with GitLab.authentik's GitLab guide covers SAML and OIDC. Choose one method. Support listed as authentik.
Protocols for this appOIDC and SAML 2.0 are both supported. The GitLab example documented for Keycloak is OIDC.OIDC and SAML are both offered, and the guide has you choose one for GitLab.
SCIM user provisioning into GitLabKeycloak's SCIM API provisions users into Keycloak, so GitLab SCIM needs a separate check with GitLab.GitLab SCIM for self-managed needs Premium or Ultimate plus SAML SSO. Supports users only.
Group provisioning into GitLabConfirm with GitLab whether group provisioning can come from a Keycloak SCIM path.GitLab SCIM covers users only. Confirm how group membership will be set up.
Auto sign-in behaviorConfirm with GitLab and your Keycloak client how auto sign-in redirects behave.With auto sign-in on, every sign-in goes to authentik. Keep a GitLab login path at /users/sign_in?auto_sign_in=false
Current release linesKeycloak 26.8.1, released October 13, 2026.authentik 2026.8.4, released October 14, 2026. Security fixes listed for 2026.5.x and 2026.8.x.

How GitLab SSO setup differs for Keycloak and authentik

With Keycloak, you build the GitLab connection by hand in the Keycloak admin console, then point GitLab at the resulting client. GitLab's OpenID Connect documentation includes a Configure Keycloak section with an example omniauth_providers block, so most of the work sits on the Keycloak side.

  • Client creation: Create a client in the Keycloak admin console with OpenID Connect or SAML 2.0 support, matching the method you chose for GitLab, and enter the callback values GitLab expects.
  • HTTPS: GitLab can only talk to a Keycloak server that uses HTTPS, so the certificate and endpoint must work before you test sign-in.
  • Token signing: Set Keycloak to sign tokens with public key algorithms, which GitLab requires for Keycloak.
  • omniauth_providers block: Add the example block to your GitLab configuration with the label Keycloak and the openid, profile and email scopes.
  • Provisioning scope: Keycloak's SCIM API lets external systems provision users into Keycloak. It does not create GitLab accounts, so decide separately how GitLab users are created.

Before you test, confirm that the HTTPS endpoint, the signing algorithm and the scopes in GitLab match the values configured in the Keycloak client.

How a GitLab sign-in moves between the browser, GitLab and the identity provider

The flow starts when a user opens GitLab's sign-in page and chooses the identity provider. GitLab redirects the browser to Keycloak or authentik, which authenticates the user and returns either a SAML assertion or an OIDC authorization code through the browser. GitLab validates that response before it creates the session. Check that the redirect endpoints, callback URLs and HTTPS settings match on both sides, since mismatches usually fail at the validation step. If omniauth auto sign-in is enabled, the provider button disappears and sign-ins go straight to the provider. Keep the /users/sign_in?auto_sign_in=false path documented for administrators who need GitLab's own login.

Illustrative flow for SAML or OIDC, drawn from neither vendor's documentation.

GitLab SSO provisioning: users and groups with Keycloak or authentik

Single sign-on and provisioning are separate decisions for GitLab. The cards below separate what each identity provider can push into GitLab from what GitLab itself requires, because the GitLab tier you license decides which options exist at all.

User provisioning with authentik

authentik's GitLab guide supports SAML and OpenID Connect, and you choose one method. Its SCIM provider is optional: it works as a optional backchannel that pushes user records to the application, so sign-in can run without it. For a self-managed GitLab, the SCIM path requires GitLab's Premium tier or the tier above it, plus SAML single sign-on. If your license does not cover that, plan a separate process for creating and removing accounts, and confirm the tier rules on GitLab's pricing page before go-live.

authentik GitLab guide

Group provisioning limits

This is the constraint teams most often miss. authentik's guide states that does not provision groups, so GitLab SCIM handles users only and group membership has to come from another mechanism. OpenID Connect group membership in GitLab also requires Premium or the higher tier. Decide early which groups drive GitLab roles, because group membership is the usual input for project access. Check GitLab's documentation for group behavior on your exact version before you write access rules.

GitLab OIDC docs

Keycloak: inbound SCIM only

Keycloak's SCIM API lets external systems provision users into Keycloak, so Keycloak receives identity data. That fits designs where an HR system or directory tool is the source of truth. The documented Keycloak paths, however, show no path that pushes users or groups from Keycloak into GitLab. A Keycloak design should therefore assume GitLab accounts and groups are handled through sign-in or a separate process. Confirm the outbound question with Keycloak and GitLab before you commit to the architecture.

Keycloak admin guide

Deprovisioning and role mapping

Removing access is the test that matters most. No documented path confirms how either design removes a user, blocks a sign-in, or changes a GitLab role when someone leaves or changes teams. Role mapping from identity claims or groups carries the same uncertainty. Test this on a staging GitLab instance before sign-off. Connect the chosen provider, then test user deactivation, group removal, role change and an existing session. Record exactly what GitLab does in each case, and only then approve the design for production.

Documented limits that shape the choice

Two documented constraints should shape the design before any configuration starts. First, authentik's GitLab guide warns that enabling GitLab's omniauth_auto_sign_in_with_provider setting sends every sign-in to authentik. If authentik is unavailable, administrators need a known path to GitLab's own login, which the guide places at /users/sign_in?auto_sign_in=false. Test that path, and record who holds those credentials, before you turn auto sign-in on. Second, GitLab's OpenID Connect documentation says it can only talk to a Keycloak server that uses HTTPS, and that Keycloak must sign tokens with public key algorithms. Confirm the certificate chain GitLab will trust and the signing algorithm on the Keycloak client before the first test login, because a mismatch here only shows up when users try to sign in.

Provisioning is the second limit. authentik's guide says GitLab SCIM for self-managed instances requires GitLab Premium or Ultimate plus SAML single sign-on, and that GitLab SCIM handles user provisioning but does not handle group provisioning. If your access model depends on GitLab group membership being pushed from the identity provider, plan that work outside SCIM or verify the behavior on a test instance first. Keycloak's Server Administration Guide documents a SCIM API that lets external systems provision users into Keycloak, and the 26.8 release notes list it as supported. That shows Keycloak accepting provisioning requests. The supplied material does not document Keycloak-to-GitLab SCIM, so treat that path as unverified. Also, authentik 2026.5 changed the SAML issuer and OAuth redirect URI types, so the guide gives different steps for older versions. Record the exact authentik version before you copy any setup values.

Before you commit, put three questions to both vendors in writing: which GitLab versions and which GitLab tiers each one supports for this integration, how each handles the auto sign-in and SCIM behavior described above, and how each will support a GitLab upgrade that changes tier or version. For authentik, check its security policy, which lists 2026.5.x and 2026.8.x as the supported lines receiving security fixes and says security releases are announced at least 24 hours in advance. Choose a deployment line inside that window, assign someone to watch for advance notices, and schedule the upgrade window around them. Ask Keycloak for equivalent commitments. Its project plans four minor releases a year and says breaking changes in a minor release will be opt-in, which helps with planning but does not replace a written statement about GitLab compatibility. Keep the answers in the scope document, because a GitLab tier change or an identity provider upgrade can each break a working combination.

Questions to ask before hiring help with GitLab SSO

How much effort does GitLab SSO setup with Keycloak or authentik take?

Effort depends on a few choices made before anyone edits a configuration: the GitLab tier, the protocol, the identity provider release line, and how many GitLab instances need sign-in. Adding SCIM provisioning is usually the largest step. GitLab lists OpenID Connect and SAML sign-in for GitLab Self-Managed in the Free, Premium and Ultimate tiers, but OpenID Connect group membership requires Premium or Ultimate. authentik states that GitLab SCIM for self-managed instances requires Premium or Ultimate plus SAML single sign-on. Each GitLab instance normally needs its own callback URL and client settings, so a second instance repeats part of the work. authentik's guide also gives different steps for releases before and after its 2026.5 changes to SAML issuer and OAuth redirect URI types. Ask any implementation partner to state the tier, protocol, release line and instance count their scope assumes.

What does a GitLab SSO project need from our own team?

Your team supplies access and decisions before the work starts. You need GitLab administrator access, administrator access to the identity provider, and an HTTPS certificate on the identity provider, because GitLab only talks to a Keycloak server that uses HTTPS. Keycloak also has to sign tokens with public key algorithms, which your identity team should confirm. A staging GitLab instance lets you test sign-in without affecting production users, so confirm early whether one exists. Your team also owns group mapping: which identity provider groups map to which GitLab groups and roles, and who approves changes to that mapping. Group membership from OpenID Connect requires Premium or Ultimate, so confirm the tier before you finalize the mapping. Name one owner on the GitLab side and one on the identity side so questions about callback URLs and certificates get answered quickly.

Can our team set up GitLab SSO alone using the documented steps?

A team with GitLab and identity provider administrators can often complete a basic sign-in test alone. GitLab's OpenID Connect documentation includes a Keycloak section with an example omniauth_providers block, and authentik's GitLab guide gives step-by-step configuration for its providers. The work gets harder as decisions expand. Group mapping, SCIM provisioning, multiple GitLab instances and version-specific steps each add review and testing. authentik warns that enabling omniauth_auto_sign_in_with_provider sends every sign-in to authentik, while users can still reach GitLab's own login at /users/sign_in?auto_sign_in=false. Decide how emergency administrator access works before you enable automatic redirects. Test with a non-production account, and keep a documented way back in before you move production users.

How does a quote for GitLab SSO work with DeployOpen?

A quote follows from a written scope. DeployOpen does not publish a price list, and most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. The scope should list the GitLab tier and instances, the identity provider and release line, whether SCIM is included, the staging environment, testing, handover documentation and any follow-on support. Cost comes from three sources: the engagement, the software subscriptions and the infrastructure you run. Keycloak and authentik core are open source, but authentik code under its enterprise directory needs a paid subscription for production use, so confirm whether your scope relies on it. The GitLab tier you need is a subscription cost to confirm with GitLab. Ask for each item to be priced separately so you can see what is one-time and what recurs.

What keeps needing attention after GitLab SSO goes live?

Upgrades, security patches and tier decisions recur for as long as the setup runs. Keycloak plans four minor releases a year, and since Keycloak 26.0 the project says breaking changes in a minor release will be opt-in, but each upgrade still needs a test cycle. The current release is Keycloak 26.8.1. authentik runs separate release lines: its security policy lists 2026.5.x and 2026.8.x as versions receiving security fixes, and it announces security releases at least 24 hours in advance, so someone must watch for those notices. GitLab tier changes can also affect whether group mapping or SCIM is available to you. Plan these as a recurring operations task, either in-house or under a support retainer, and ask whether any retainer covers upgrades and continuous testing.

What should I ask vendors about supported GitLab versions?

Ask which GitLab versions each identity provider's integration guide was written and tested against, and which version your own instance runs during the project. Request the supported GitLab version range in writing, along with what changes when GitLab moves to a newer release. Ask for the matching identity provider release line as well, because authentik's guide notes different steps for releases before and after its 2026.5 changes. For Keycloak, ask which OpenID Connect or SAML settings your GitLab version expects. GitLab's OpenID Connect documentation is the reference to check those answers against. Record the answers in the written scope and the handover documentation. If the answers stay vague, list the open version question as a risk in the scope before work begins.

How DeployOpen sets up GitLab SSO without favoring either provider

DeployOpen plans, implements, integrates, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Keycloak vs authentik for GitLab SSO, the identity provider is chosen from your protocol, licensing and team requirements, then both candidates are scoped against the same written deliverables. The engagement starts with a written scope, so you can review the SSO settings before work begins.

How we scope

  • The written scope names your GitLab tier, the single protocol you choose, and the Keycloak or authentik deployment target.
  • Provisioning gets its own scope, since GitLab SCIM covers users only and needs Premium or Ultimate with SAML.
  • Fixed-scope engagements agree deliverables and timelines in writing before work starts, and ongoing support can run as a retainer.

How we build

  • Keycloak is served over HTTPS and signs tokens with public key algorithms, both required by GitLab's OIDC documentation.
  • The authentik build uses one method, SAML or OpenID Connect, and the guide's steps differ for releases before 2026.5.
  • Auto sign-in is tested with GitLab's own login path, since enabling it redirects every sign-in to the provider.

How we hand over

  • Handover documents the GitLab omniauth block, its provider label, the openid, profile and email scopes, and token signing settings.
  • Runbooks cover the database each identity provider needs, PostgreSQL for authentik and a supported production database for Keycloak.
  • Upgrade notes record the authentik release line in use, because 2026.5.x and 2026.8.x receive security fixes.

How we support

  • Keycloak upgrades are planned around the project's four minor releases a year, where breaking changes are opt-in.
  • Retesting covers the GitLab login and provisioning paths after each identity provider or GitLab upgrade.
  • Ongoing support, upgrades and continuous testing are available as retainers, quoted from the written scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.