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

Update README.md

adam-op0e1e4dd5de84
diff --git a/docs/system-admin-guide/authentication/saml/README.md b/docs/system-admin-guide/authentication/saml/README.md
index 9698e5a58b8..48eacc23f56 100644
--- a/docs/system-admin-guide/authentication/saml/README.md
+++ b/docs/system-admin-guide/authentication/saml/README.md
@@ -61,11 +61,13 @@ saml:
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
+ # IF your SSL certificate on your SSO is not trusted on this machine, you need to add it here in ONE line
+ ### one liner to generate certificate in ONE line
+ ### awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' <yourcert.pem>
#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:...",
+ idp_cert_fingerprint: "E7:91:B2:E1:..."
# Replace with your single sign on URL
# For example: "https://sso.example.com/saml/singleSignOn"
@@ -132,6 +134,9 @@ Setting.plugin_openproject_auth_saml = Hash(Setting.plugin_openproject_auth_saml
"name" => "saml",
"display_name" => "My SSO",
"assertion_consumer_service_url" => "https:/<YOUR OPENPROJECT HOSTNAME>/auth/saml/callback"
+ ### one liner to generate certificate in ONE line
+ ### awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' <yourcert.pem>
+ "idp_cert" => "-----BEGIN CERTIFICATE-----\nMI................IEr\n-----END CERTIFICATE-----\n",
# etc.
}
}
@@ -153,6 +158,8 @@ SAML responses by identity providers are required to be signed. You can configur
Use the key `attribute_statements` to provide mappings for attributes returned by the SAML identity provider's response to OpenProject internal attributes.
+**a) Attribute mapping example for settings.yml**
+
```yaml
# <-- other configuration -->
# Attribute map in SAML
@@ -171,6 +178,24 @@ You may provide attribute names or namespace URIs as follows: `email: ['http://s
The OpenProject username is taken by default from the `email` attribute if no explicit login attribute is present.
+**b) Attribute mapping example for database**
+
+```ruby
+Setting.plugin_openproject_auth_saml = Hash(Setting.plugin_openproject_auth_saml).deep_merge({
+ "providers" => {
+ "saml" => {
+ "email" => "email",
+ "login" => "username",
+ "first_name" => "firstname",
+ "last_name" => "lastname"
+ # etc.
+ }
+ }
+})
+```
+
+
+
**Optional: Setting the attribute format**
By default, the attributes above will be requested with the format `urn:oasis:names:tc:SAML:2.0:attrname-format:basic`.
@@ -213,7 +238,7 @@ To configure assertion encryption, you need to provide the certificate to send i
private_key: "-----BEGIN PRIVATE KEY-----\n .... private key contents ....\n-----END PRIVATE KEY-----"
```
-Request signing means that the service provider (OpenProject in this case) uses the certificate specified to sign the request to the identity provider. They reuse the same `certificate` and `private_key` settings as for assertion encryption.
+Request signing means that the service provider (OpenProject in this case) uses the certificate specified to sign the request to the identity provider. They reuse the same `certificate` and `private_key` settings as for assertion encryption. It is recommended to use an RSA key pair, the key must be provided without password.
To enable request signing, enable the following flag:
@@ -266,3 +291,23 @@ sudo openproject run console
```
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.
+
+
+
+Q: Could the users be automatically logged in to OpenProject if they are already authenticated at the SAML Identity Provider?
+
+A: You are able to chose a default direct-login-provider in the `/opt/openproject/config/configuration.yml` or by using environment variables
+
+```
+omniauth_direct_login_provider: saml
+```
+
+Read more: https://www.openproject.org/docs/installation-and-operations/configuration/#omniauth-direct-login-provider
+
+
+
+Q: `"certificate"` and `"private key"` are used in the SAML configuration and openproject logs show a FATAL error after GET "/auth/saml" `**FATAL** -- : OpenSSL::PKey::RSAError (Neither PUB key nor PRIV key: nested asn1 error):`
+
+A1: The given private_key is encrypted. The key is needed without the password (cf., https://github.com/onelogin/ruby-saml/issues/473)
+
+A2: The provided key pair is not an RSA key. ruby-saml might expect an RSA key.