Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

consolidate saml documentation

ulfertseb5b8745d3b5
diff --git a/docs/system-admin-guide/authentication/saml/README.md b/docs/system-admin-guide/authentication/saml/README.md
index 1bec78ecbd8..5d45b2ab24f 100644
--- a/docs/system-admin-guide/authentication/saml/README.md
+++ b/docs/system-admin-guide/authentication/saml/README.md
@@ -14,54 +14,109 @@ keywords: SAML, SSO, single sign-on, authentication
You can integrate your active directory or other SAML compliant identity provider in your OpenProject Enterprise Edition.
-We rely on the OmniAuth SAML plugin for this integration. You will find more technical details about the configuration options used below [on their GitHub page](https://github.com/omniauth/omniauth-saml).
+### 1: Configuring the SAML integration
+The configuration can be provided in one of three ways:
+* `configuration.yml` file (1.1)
+* Environment variables (1.2)
+* `settings.yml` file (1.3)
-### Step 1: Creating the configuration file
+Whatever means are chosen, the plugin simply passes all options to omniauth-saml. See [their configuration
+documentation](https://github.com/omniauth/omniauth-saml#usage) for further details.
-In your OpenProject packaged installation, you need to add the `/opt/openproject/config/plugins/auth_saml.settings.yml` file. This will contain metadata settings and connection details for your SSO identity provider.
+The three options are mutually exclusive. I.e. if settings are already provided via the `configuration.yml` file, settings in a `settings.yml` file will be ignored. Environment variables will override the `configuration.yml` based configuration, though.
-The following example can be used as a starting point to set up your integration:
+#### 1.1 configuration.yml file
+
+In your OpenProject packaged installation, you can modify the `/opt/openproject/config/configuration.yml` file. This will contains the complete OpenProject configuration and can be extended to also contain metadata settings and connection details for your SSO identity provider.
+
+Everything belonging to the `saml` key will be made available to the plugin.
+
+```yaml
+production:
+ # <-- other configuration -->
+
+ saml:
+ name: "saml"
+ display_name: "My SSO"
+ # Use the default SAML icon
+ icon: "auth_provider-saml.png"
+
+ # omniauth-saml config
+ assertion_consumer_service_url: "https:/<YOUR OPENPROJECT HOSTNAME>/auth/saml/callback"
+ issuer: "https://<YOUR OPENPROJECT HOSTNAME>"
+
+ # IF your SSL certificate on your SSO is not trusted on this machine, you need to add it here
+ #idp_cert: "-----BEGIN CERTIFICATE-----\n ..... SSL CERTIFICATE HERE ...-----END CERTIFICATE-----\n"
+ # Otherwise, the certificate fingerprint must be added
+ # Either `idp_cert` or `idp_cert_fingerprint` must be present!
+ idp_cert_fingerprint: "E7:91:B2:E1:...",
+
+ # Replace with your single sign on URL
+ # For example: "https://sso.example.com/saml/singleSignOn"
+ idp_sso_target_url: "<YOUR SSO URL>"
+ # Replace with your single sign out URL
+ # or comment out
+ # For example: "https://sso.example.com/saml/proxySingleLogout"
+ idp_slo_target_url: "<YOUR SSO logout URL>"
+
+ # Attribute map in SAML
+ attribute_statements:
+ # What attribute in SAML maps to email (default: mail)
+ email: ['mail']
+ # What attribute in SAML maps to the user login (default: uid)
+ login: ['uid']
+ # What attribute in SAML maps to the first name (default: givenName)
+ first_name: ['givenName']
+ # What attribute in SAML maps to the last name (default: sn)
+ last_name: ['sn']
+
+ # <-- other configuration -->
+```
+
+Be sure to choose the correct indentation and base key. The `saml` key should be indented two spaces (and all other keys accordingly) and the configuration should belong to the `production` group.
+
+#### 1.2 Environment variables
+
+As with all the rest of the OpenProject configuration settings, the SAML configuration can be provided via environment variables.
+
+E.g.
+
+```bash
+OPENPROJECT_SAML_MY__SAML_NAME="your-provider-name"
+OPENPROJECT_SAML_MY__SAML_DISPLAY__NAME="My SAML provider"
+...
+OPENPROJECT_SAML_MY__SAML_ATTRIBUTE__STATEMENTS_ADMIN="['openproject-isadmin']"
+```
+
+Please note that every underscore (`_`) in the original configuration key has to be replaced by a duplicate underscore
+(`__`) in the environment variable as the single underscore denotes namespaces.
+
+#### 1.3 settings.yml file
+
+In your OpenProject packaged installation, add the `/opt/openproject/config/plugins/auth_saml/settings.yml` file. This will contain metadata settings and connection details for your SSO identity provider.
+
+The structure and options are the same compared to having the options as environment variables or in the configuration.yml file
```yaml
saml:
name: "saml"
display_name: "My SSO"
- # Use the default SAML icon
- icon: "auth_provider-saml.png"
-
- # omniauth-saml config
- assertion_consumer_service_url: "https:/<YOUR OPENPROJECT HOSTNAME>/auth/saml/callback"
- issuer: "https://<YOUR OPENPROJECT HOSTNAME>"
-
- # IF your SSL certificate on your SSO is not trusted on this machine, you need to add it here
- #idp_cert: "-----BEGIN CERTIFICATE-----\n ..... SSL CERTIFICATE HERE ...-----END CERTIFICATE-----\n"
- # Otherwise, the certificate fingerprint must be added
- # Either `idp_cert` or `idp_cert_fingerprint` must be present!
- idp_cert_fingerprint: "E7:91:B2:E1:...",
-
- # Replace with your single sign on URL
- # For example: "https://sso.example.com/saml/singleSignOn"
- idp_sso_target_url: "<YOUR SSO URL>"
- # Replace with your single sign out URL
- # or comment out
- # For example: "https://sso.example.com/saml/proxySingleLogout"
- idp_slo_target_url: "<YOUR SSO logout URL>"
-
- # Attribute map in SAML
- attribute_statements:
- # What attribute in SAML maps to email (default: mail)
- email: ['mail']
- # What attribute in SAML maps to the user login (default: uid)
- login: ['uid']
- # What attribute in SAML maps to the first name (default: givenName)
- first_name: ['givenName']
- # What attribute in SAML maps to the last name (default: sn)
- last_name: ['sn']
+ <-- omitted for brevity
```
-Fill out the file and restart your OpenProject server with `service openproject restart`. From there, you will see a "My SSO" login button when logging in. Clicking it will redirect to your SSO provider and return with your attribute data to set up the account, or to log in.
+<div class="alert alert-info" role="alert">
+**Note**: Providing the configuration via the `settings.yml` is deprecated.
+</div>
+
+### 2: Restarting the server
+
+Once the configuration is completed, restart your OpenProject server with `service openproject restart`.
+
+### 3: Logging in
+
+From there on, you will see a button dedicated to logging in via SAML, e.g named "My SSO" (depending on the name you chose in the configuration), when logging in. Clicking it will redirect to your SSO provider and return with your attribute data to set up the account, or to log in.
![my-sso](my-sso.png)
@@ -71,7 +126,7 @@ Fill out the file and restart your OpenProject server with `service openproject
Q: After clicking on a provider badge, I am redirected to a signup form that says a user already exists with that login.
-A: This can happen if you previously created user accounts in OpenProject with the same email than what is stored in the OpenID provider. In this case, if you want to allow existing users to be automatically remapped to the OpenID provider, you should do the following:
+A: This can happen if you previously created user accounts in OpenProject with the same email than what is stored in the identity provider. In this case, if you want to allow existing users to be automatically remapped to the SAML identity provider, you should do the following:
```
sudo openproject run console
@@ -79,4 +134,4 @@ sudo openproject run console
> exit
```
-Then, existing users should be able to log in using their Azure identity. Note that this works only if the user is using password-based authentication, and is not linked to any other authentication source (e.g. LDAP) or OpenID provider.
\ No newline at end of file
+Then, existing users should be able to log in using their SAML identity. Note that this works only if the user is using password-based authentication, and is not linked to any other authentication source (e.g. LDAP) or OpenID provider.
\ No newline at end of file
diff --git a/modules/auth_saml/README.md b/modules/auth_saml/README.md
deleted file mode 100644
index 0b7a8cbe8ff..00000000000
--- a/modules/auth_saml/README.md
+++ /dev/null
@@ -1,106 +0,0 @@
-# OpenProject OmniAuth SAML Single-Sign On
-
-![](https://github.com/finnlabs/openproject-auth_saml/blob/dev/app/assets/images/auth_provider-saml.png)
-
-This plugin provides the [OmniAuth SAML strategy](https://github.com/omniauth/omniauth-saml) into OpenProject.
-
-## Configuration
-
-The configuration can be provided in one of three ways:
-
-* configuration.yml file
-* Environment variables
-* settings.yml file
-
-Whatever means are chosen, the plugin simply passes all options to omniauth-saml. See [their configuration
-documentation](https://github.com/omniauth/omniauth-saml#usage) for further details.
-
-### configuration.yml file
-
-The file
-
-```bash
-config/configuration.yml
-```
-
-can be extended to include the necessary settings. Everything belonging to the `saml` key will be made available to the plugin.
-
-```yaml
-saml:
- my_saml:
- name: "your-provider-name"
- display_name: "My SAML provider"
- # Use the default SAML icon
- icon: "auth_provider-saml.png"
- # omniauth-saml config
- assertion_consumer_service_url: "consumer_service_url"
- issuer: "issuer"
- idp_sso_target_url: "idp_sso_target_url"
- idp_cert_fingerprint: "E7:91:B2:E1:..."
- attribute_statements:
- email: ['mailPrimaryAddress']
- name: ['gecos']
- first_name: ['givenName']
- last_name: ['sn']
- admin: ['openproject-isadmin']
-```
-
-### Environment variables
-
-As with all the rest of the OpenProject configuration settings, the saml configuration can be provided via environment variables.
-
-E.g.
-
-```bash
-OPENPROJECT_SAML_MY__SAML_NAME="your-provider-name"
-OPENPROJECT_SAML_MY__SAML_DISPLAY__NAME="My SAML provider"
-...
-OPENPROJECT_SAML_MY__SAML_ATTRIBUTE__STATEMENTS_ADMIN="['openproject-isadmin']"
-```
-
-Please note that every underscore (`_`) in the original configuration key has to be replaced by a duplicate underscore
-(`__`) in the environment variable as the single underscore denotes namespaces.
-
-### settings.yml file
-
-For backwards compatibility, having a dedicated settings.yml is also supported.
-
-To add your own SAML strategy provider(s), create the following settings file (relative to your OpenProject root):
-
-```bash
-config/plugins/auth_saml/settings.yml
-```
-
-with the following contents:
-
-```yaml
-your-provider-name:
- name: "your-provider-name"
- display_name: "My SAML provider"
- # Use the default SAML icon
- icon: "auth_provider-saml.png"
- # omniauth-saml config
- assertion_consumer_service_url: "consumer_service_url"
- issuer: "issuer"
- idp_sso_target_url: "idp_sso_target_url"
- idp_cert_fingerprint: "E7:91:B2:E1:..."
- attribute_statements:
- email: ['mailPrimaryAddress']
- name: ['gecos']
- first_name: ['givenName']
- last_name: ['sn']
- admin: ['openproject-isadmin']
-```
-
-The plugin simply passes all options to omniauth-saml. See [their configuration
-documentation](https://github.com/omniauth/omniauth-saml#usage) for further
-details.
-
-### Custom Provider Icon
-
-To add a custom icon to be rendered as your omniauth provider icon, add an
-image asset to OpenProject and reference it in your `settings.yml`:
-
-```bash
-icon: "my/asset/path/to/icon.png"
-```