diff --git a/roles/redmine/defaults/main.yml b/roles/redmine/defaults/main.yml index 449b176..a998fca 100644 --- a/roles/redmine/defaults/main.yml +++ b/roles/redmine/defaults/main.yml @@ -145,6 +145,8 @@ redmine_saml_idp_sso_service_url: 'https://sso.desarrollo.unlp.edu.ar/saml2/idp/ # see https://www.samltool.com/fingerprint.php # redmine_saml_idp_cert_fingerprint: 'certificate fingerprint' # redmine_saml_idp_cert: '' +# if true, \n can be used in string +redmine_saml_idp_cert_line_break_format: false # Used during SP-initiated SSO. # Describes the format of the username required by this application. # If you need the email address, use "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress". diff --git a/roles/redmine/templates/redmine/config/initializers/saml.rb.j2 b/roles/redmine/templates/redmine/config/initializers/saml.rb.j2 index 4623e03..99171d7 100644 --- a/roles/redmine/templates/redmine/config/initializers/saml.rb.j2 +++ b/roles/redmine/templates/redmine/config/initializers/saml.rb.j2 @@ -13,7 +13,10 @@ require Rails.root.join('plugins/redmine_saml/lib/redmine_saml/base') {% endif %} {% endif %} {% if saml_idp_cert != '' %} +{% redmine_saml_idp_cert_line_break_format %} idp_cert: "{{ saml_idp_cert | replace('\n', '\\n') }}", +{% else %} + idp_cert: '{{ saml_idp_cert }}', {% endif %} {% if saml_idp_slo_service_url != '' %} idp_slo_service_url: '{{ saml_idp_slo_service_url }}',