Amazon Cognito vs Keycloak for GitLab SSO

If GitLab sign-in must run inside an AWS account you already operate, Amazon Cognito is the managed option to evaluate. If you need a self-hosted identity provider with SAML and LDAP or Active Directory federation, Keycloak is the better fit. This page covers the GitLab integration only.

On this page

Amazon Cognito vs Keycloak for GitLab SSO: which fits your team

Choose Amazon Cognito when your team already runs on AWS and accepts a managed AWS service as the home of your user directory. Choose Keycloak when identity must stay in your own infrastructure and you need SAML or user federation from LDAP or Active Directory. The general comparison of the two products is on its own page, so this section covers only the GitLab integration. For GitLab Self-Managed, Cognito connects as an OAuth 2.0 OmniAuth provider, and GitLab's documentation lists it for every Self-Managed tier. You register GitLab as an application in Cognito, which generates the Client ID and Client Secret that GitLab uses. Keycloak connects through OpenID Connect, and GitLab's documentation includes a Keycloak section with an example omniauth_providers block.

Cost is where the two diverge first. Amazon's Cognito pricing page says users who sign in through SAML or OIDC federation get 50 free MAUs per month per account, after which AWS charges $0.015 per MAU on every tier. User pools are sold in Lite, Essentials and Plus feature plans with different free allowances, so model your federated user count against a specific plan before comparing. Keycloak's software is licensed under Apache-2.0, but you pay for the servers, the production relational database and the people who run them. If you are moving existing accounts into Cognito, it documents a user migration Lambda trigger that migrates users at first sign-in and a bulk CSV import of profile attributes. AWS has also announced password hash import, so confirm whether it covers your source directory before you plan cutover.

Keycloak's advantages matter under specific conditions. SAML SSO for GitLab Self-Managed is listed on the Free tier as well as Premium and Ultimate, so a team that needs SAML does not need a paid tier to start. Keycloak also federates users from LDAP or Active Directory and exposes a SCIM API for provisioning, which the 26.8 release notes list as supported. Before you choose Keycloak, confirm three settings in your environment: a relational database for production, HTTPS on the Keycloak server because GitLab only talks to HTTPS endpoints, and token signing with public key algorithms. If you need OIDC group membership in GitLab, confirm that your planned tier includes it, since GitLab lists that feature for Premium and higher. The current Keycloak release is 26.8.1, published October 13, 2026, and the project plans four minor releases a year, so build your upgrade cadence around that.

How GitLab SSO setup and provisioning differ by provider

This table compares how GitLab sign-in is configured with Amazon Cognito and Keycloak, and who runs each part. Read each row against your GitLab tier and your user data location. Cognito is a managed AWS service with a GitLab OmniAuth page, while Keycloak is self-hosted and documented for GitLab over OpenID Connect with HTTPS and token signing rules.

RequirementAmazon CognitoKeycloak
Documented GitLab integration methodGitLab's AWS Cognito page enables Cognito as an OAuth 2.0 OmniAuth provider for GitLab Self-Managed.GitLab's OpenID Connect page includes a Configure Keycloak section for Self-Managed sign-in.
GitLab tiers listedFree, Premium and Ultimate for GitLab Self-Managed (GitLab docs, December 2026).Sign-in in Free, Premium and Ultimate; OIDC group membership requirements in Premium and Ultimate.
Protocols used with GitLabOAuth 2.0 through OmniAuth. A GitLab SAML path with Cognito is not documented; confirm with GitLab or AWS.OpenID Connect for GitLab in the documented example. Keycloak also supports SAML 2.0; confirm the GitLab SAML setup with GitLab.
GitLab-side configurationRegister the app in Cognito to get the Client ID and Client Secret that GitLab uses.Add an omniauth_providers block with the Keycloak label and openid, profile and email scopes.
HTTPS and token signing requirementsNo HTTPS or token signing rule is documented for Cognito. Confirm with GitLab and AWS.GitLab works only with an HTTPS Keycloak server, and Keycloak must sign tokens with public key algorithms.
Who operates the identity serviceAWS operates the Cognito service. You own the user pool configuration, app registration and AWS account controls.Your team or a partner runs Keycloak in your infrastructure, including upgrades and patching.
Where user data livesIn the Cognito user pool in your AWS account. Confirm the Region and data residency terms with AWS.In Keycloak's relational database, or read from LDAP or Active Directory through user federation.
SCIM or user provisioning into the identity providerBulk CSV import of profile attributes, or a user migration Lambda trigger that migrates users at first sign-in. No SCIM documented for Cognito.Keycloak's SCIM API lets external systems provision users into Keycloak. GitLab Self-Managed SCIM is not documented; confirm with GitLab.
Documented limitsFederated sign-ins are billed per MAU after 50 free MAUs per account (AWS pricing page).Production needs a supported relational database. Apache-2.0 means no license fee, so cost is infrastructure, database and staff time.

How a GitLab sign-in travels through the identity provider

This illustrative sequence shows an OpenID Connect authorization code login. The user's browser starts at GitLab, which redirects it to the identity provider, either Amazon Cognito or Keycloak. The user signs in at the provider, which returns a code to the GitLab callback. GitLab then exchanges that code for tokens over HTTPS and uses the identity in the token to match an existing account or create one before the session starts. Check the exact callback path, client settings and token signing options in the GitLab documentation for your version, since Keycloak must sign tokens with public key algorithms.

Illustrative OIDC login. Confirm callback paths and token settings in GitLab docs.

GitLab SSO setup steps for Cognito and Keycloak

Cognito setup starts in AWS and finishes in GitLab. GitLab's AWS Cognito page covers Cognito as an OAuth 2.0 OmniAuth provider for GitLab Self-Managed, and it is listed for the Free, Premium and Ultimate tiers. Work through the steps in this order so the Client ID and Client Secret come from the application you registered.

  • Confirm the page applies: Check the AWS Cognito page against your GitLab version and subscription tier before you start, and record both in the change ticket.
  • Register the application: In Cognito, register GitLab as an application. Cognito generates the Client ID and Client Secret that GitLab uses, so store both in your secrets manager before the GitLab step.
  • Match the client settings: Apply the callback and client settings that the GitLab page specifies to the Cognito app client, without changing them to suit other applications.
  • Configure GitLab from the documentation: Enter the Client ID and Client Secret in the GitLab settings the Cognito page describes, then apply the change the way the page directs.
  • Test with a non-admin account: Sign in with a test user before you enable the provider for everyone.

Confirm that the Cognito app client, the GitLab configuration and your GitLab version and tier all match the same page before you move users over.

Users, groups and deprovisioning for each provider

Six areas decide how users get into GitLab and how they leave it. Sign-in, group membership, user import, provisioning and deprovisioning each behave differently for Amazon Cognito and Keycloak, and some are documented only for one provider or only on GitLab.com. Treat each card as a question to put to GitLab and to each provider before you commit.

First sign-in for each provider

GitLab's Cognito page has you register an application with Cognito, which generates the Client ID and Client Secret GitLab uses for sign-in. Keycloak connects through GitLab's OpenID Connect provider block, labeled Keycloak, with the openid, profile and email scopes. GitLab can only talk to Keycloak over HTTPS, and Keycloak must sign tokens with public key algorithms. Ask GitLab how accounts are created or matched on each provider's first sign-in, because that decides whether existing GitLab accounts are reused or duplicated.

GitLab Cognito page

Keycloak group membership over OIDC

GitLab documents group membership through OpenID Connect for the Premium and Ultimate tiers. If access to GitLab groups depends on Keycloak groups, confirm the tier before you design around it. Then check how the groups claim is mapped, which Keycloak client scope emits it, and what happens to a user's GitLab group access when they leave a Keycloak group. Run the same test against Cognito groups before you compare the two, because the answer may differ.

Cognito user import paths

Cognito documents two ways to bring users into a user pool: a user migration Lambda trigger that migrates each user at first sign-in with their existing password, or a bulk CSV import of profile attributes. The Lambda path suits teams that want users to keep their passwords through a one-time move. The CSV path moves attributes in bulk, so confirm whether passwords come with it and how users set one if they do not. Both paths depend on code and configuration you own, so put them under change control and rehearse the cutover.

Cognito import docs

Keycloak SCIM API scope

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. It does not push users into GitLab. A SCIM source can keep Keycloak current, but GitLab still sees users through its OpenID Connect sign-in unless you add a separate provisioning route. Confirm which system is the SCIM source, which is the target, and who owns the attribute mapping between them.

Keycloak admin guide

GitLab SCIM scope

GitLab documents SCIM provisioning for GitLab.com groups, and lists SAML SSO for GitLab.com groups in the Premium and Ultimate tiers. Do not assume the same provisioning path exists for a GitLab Self-Managed instance. Ask GitLab to confirm in writing whether your version and tier offer a SCIM path for Self-Managed before you design the identity flow around one. Check the SAML and SCIM settings separately, since GitLab documents them as distinct features.

GitLab.com group SSO docs

Deprovisioning on Self-Managed

Deprovisioning on GitLab Self-Managed is an open question for both providers. Ask GitLab what happens when a user is disabled or removed at the identity provider: whether sign-in stops immediately, whether existing sessions and tokens end, and whether group access is removed or left in place. Ask Amazon Cognito and Keycloak the same questions for their side. Confirm each answer in writing, then test it with a disabled test account before go-live.

What Cognito federation pricing means for GitLab logins

The Cognito bill for GitLab logins has two meters, and which one applies depends on how users sign in. Each user pool is billed on a feature plan (Lite, Essentials or Plus) and on monthly active users (MAUs). Per the Amazon Cognito pricing page, Essentials is listed at $0.015 per MAU and Plus at $0.020 per MAU. Lite and Essentials include 10,000 free MAUs per month, while Plus has no free tier. Lite user pools created before November 22, 2024 keep a free tier of 50,000 MAUs, so check the creation date of any pool you inherit. Users who sign in through SAML or OIDC federation follow a separate rule: 50 free MAUs per month per account, then $0.015 per MAU on every tier. If GitLab users reach Cognito through a federated corporate identity provider, those users fall under the federation rule, so confirm which meter each login path triggers before you size the bill.

Cost moves with three levers: user count, federation use and plan choice. Every additional active user in an Essentials pool adds to the bill, and the GitLab population matters only as far as it signs in during the month. Federating your workforce identity provider into Cognito moves those users onto the federation meter, which has a much smaller free allowance, so the same headcount can cost differently depending on the login path. Moving from Essentials to Plus raises the per-MAU rate and removes the free tier. On the Keycloak side, the server is licensed under Apache-2.0, so no per-user charge applies to the software itself. The cost moves to hosting, to a relational database that Keycloak requires in production, and to the staff who patch, back up and upgrade the platform.

When you request a quote from DeployOpen, or estimate AWS charges yourself, get these items in writing: the feature plan for each user pool, the expected monthly active user count split between direct sign-ins and federated sign-ins, whether any pool was created before November 22, 2024, and the hosting, database and operating hours the Keycloak side assumes. DeployOpen does not publish a price list, and a quote follows from the written scope. Ask whether the scope covers the GitLab sign-in configuration, the federation setup and cutover testing, and whether ongoing upgrades and support run as a retainer. Keycloak's operating effort does not appear on an AWS invoice, so budget it explicitly on both sides before you compare totals.

Questions buyers ask before hiring help with GitLab SSO

What makes a Keycloak integration with GitLab take longer than expected?

The effort sits mostly in the prerequisites around GitLab. GitLab can only talk to a Keycloak server that uses HTTPS, and Keycloak must sign tokens with public key algorithms, so certificates, DNS and signing settings come first. The example omniauth_providers block in GitLab's OpenID Connect documentation names the scopes openid, profile and email, but the client settings, redirect URIs and scope configuration in Keycloak have to match your GitLab address exactly. Group mapping is the step most likely to need rework, because each directory group has to line up with a GitLab group before the first sign-in. Keycloak also needs a relational database in production, with PostgreSQL 14 to 18 among the supported options, so database builds, backups and upgrades add work that a test instance hides. Each of these is a separate task with its own owner.

What does a Cognito sign-in route for GitLab depend on?

It depends on an AWS account, a Cognito user pool and an app registration that generates the Client ID and Client Secret GitLab uses. GitLab documents Cognito as an OAuth 2.0 OmniAuth provider for GitLab Self-Managed in the Free, Premium and Ultimate tiers, so the tier matters most for group-based rules. Group membership for OpenID Connect sign-in is a Premium and Ultimate feature, so confirm your tier before you design group mapping. Cost follows Cognito's federation rules. According to the Amazon Cognito pricing page, users who sign in through SAML or OIDC federation get 50 free MAUs per month per account, after which AWS charges $0.015 per MAU on every tier. The user pool plan, Lite, Essentials or Plus, also sets the base price, so your AWS account owner should confirm current rates for the plan you choose.

How long does GitLab SSO setup take, and can you give a fixed price?

No single duration fits every team, so the timeline comes from a written scope. The main drivers are how many GitLab instances and groups you connect, whether Keycloak runs on Kubernetes or on virtual machines, how much group mapping your identity owners have already decided, and whether the Cognito user pool already holds users. DeployOpen works on fixed-scope engagements, where scope, deliverables and timelines are agreed in writing before work starts. It does not publish a price list, so a quote follows from that written scope. To compare quotes from any provider, ask each one to state its assumptions: the GitLab tier and instance type, the identity provider version, the database, who performs cutover testing, and what the retest covers.

What does the client's team need to provide for this work?

Plan for four groups of people to be available. GitLab administrators need access to the instance settings for OmniAuth or OpenID Connect configuration, plus a break-glass administrator account for testing sign-in. Whoever manages DNS and certificates must issue HTTPS names for both GitLab and the identity provider, since GitLab only talks to Keycloak over HTTPS. Identity owners decide how directory groups map to GitLab groups and which roles each group receives, and they need to sign off before go-live. For Cognito, an AWS account owner must provide the account, the user pool and permission to create the app registration. Write the sign-off points into the scope, because delays usually come from waiting for those decisions to be made.

Can our own team set up GitLab SSO without outside help?

Yes, a team with Keycloak or Cognito experience and GitLab administration access can usually complete a basic OpenID Connect or OmniAuth setup from the documentation. The rework tends to sit in areas that documentation cannot settle for your environment: HTTPS and token signing in Keycloak, a production database, group mapping that matches your directory, and testing of sign-in and sign-out for real user groups. Outside help usually saves the most rework in those areas, especially when the first configuration has to pass a security review. GitLab's OpenID Connect page is the natural starting point, and you should confirm each setting against the documentation for your GitLab version and tier before you commit to a design.

How does switching between Cognito and Keycloak later affect users?

Users move only when you export them and bring them into the other system, and passwords are the hard part. Cognito documents two ways to bring users into a user pool: a user migration Lambda trigger that migrates users at first sign-in with their existing passwords, or a bulk CSV import of profile attributes. The bulk import covers profile attributes, so check whether passwords move in your case before you plan around it. The ListUsers API returns user records from a pool, which helps with inventory and reconciliation. On the Keycloak side, Keycloak's Server Administration Guide documents a SCIM API for provisioning users, and that matters because provisioning sources must point to the new system. Expect changed client IDs and secrets in GitLab and a cutover window. Fixed scope is agreed in writing before work starts, so the cutover steps belong in that document.

How DeployOpen helps set up GitLab SSO

DeployOpen works on self-hosted open-source platforms inside your own infrastructure, so this work centers on GitLab Self-Managed and, if you choose it, a self-hosted Keycloak. Amazon Cognito is an AWS managed service, so we scope its configuration and the GitLab side together in one written plan before work starts. Every engagement is fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we scope

  • The written scope names your GitLab tier and the sign-in method, OIDC or SAML, for each identity provider.
  • It lists GitLab's user sources, such as a Cognito user pool or a Keycloak realm, and how users arrive.
  • Engagements are fixed-scope, and ongoing support after go-live can run as a retainer.

How we build

  • For Cognito, we register the GitLab application and set the Client ID and Client Secret in GitLab's OmniAuth settings.
  • For Keycloak, we configure an OpenID Connect client with HTTPS endpoints and public key signing algorithms, as GitLab requires.
  • Each build is tested against a GitLab test sign-in, including a user with no group membership, before handover.

How we hand over

  • Handover includes configuration documentation for GitLab, the identity provider and the settings that link them.
  • Documentation records the GitLab tier, sign-in methods, redirect URIs and which secrets are stored where.
  • Compliance evidence covers configuration records and access settings for your assessor, who issues any audit opinion.

How we support

  • After go-live, ongoing support, upgrades and continuous testing are available as retainers.
  • Keycloak plans four minor releases a year, so schedule upgrade windows in the support scope.
  • Changes to either side can be retested under a retainer, covering both GitLab and the identity provider.

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.