> For the complete documentation index, see [llms.txt](https://enterprise.hideez.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enterprise.hideez.com/hideez-server-integration/saml-integration/setting-up-saml-for-gitlab-on-premises.md).

# GitLab on premises

### Configuring GitLab

Edit “/etc/gitlab/gitlab.rb”:

```
### OmniAuth Settings
###! Docs: https://docs.gitlab.com/ee/integration/omniauth.html
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_auto_link_saml_user'] = true

gitlab_rails['omniauth_providers'] = [
    {
      name: 'saml',
      args: {
               assertion_consumer_service_url: 'https://gitlab.hideez.com/users/auth/saml/callback',
               idp_cert: 'MIIDHjCCAgagAwIBAg........',
               idp_sso_target_url: 'https://publicdemo.hideez.com/saml/login',
               issuer: 'https://gitlab.hideez.com',
               name_identifier_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
               attribute_statements: { email: ['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'] }
             }
    }
  ]
```

After editing use command `sudo gitlab-ctl reconfigure`.

### Configuring HES

* Go to *Settings -> Parameters -> SAML section*
* Click Add Service Provider button:
  * Issuer - **Entity ID** from GitLab
  * Assertion Consumer Service - **ACS URL** from GitLab
  * NameID Format - **Email**
  * NameID Value - **Email**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://enterprise.hideez.com/hideez-server-integration/saml-integration/setting-up-saml-for-gitlab-on-premises.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
