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

Set default name identifier format to unspecified, making no assertions

Oliver Güntherffd8f9a35ebb
diff --git a/modules/auth_saml/app/constants/saml/defaults.rb b/modules/auth_saml/app/constants/saml/defaults.rb
index 493129d5652..4c45a237472 100644
--- a/modules/auth_saml/app/constants/saml/defaults.rb
+++ b/modules/auth_saml/app/constants/saml/defaults.rb
@@ -30,7 +30,7 @@
module Saml
module Defaults
- NAME_IDENTIFIER_FORMAT = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
+ NAME_IDENTIFIER_FORMAT = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
SIGNATURE_METHODS = {
"RSA SHA-1" => XMLSecurity::Document::RSA_SHA1,
diff --git a/modules/auth_saml/spec/services/saml/providers/set_attributes_service_spec.rb b/modules/auth_saml/spec/services/saml/providers/set_attributes_service_spec.rb
index 1c389d58560..55d0861b842 100644
--- a/modules/auth_saml/spec/services/saml/providers/set_attributes_service_spec.rb
+++ b/modules/auth_saml/spec/services/saml/providers/set_attributes_service_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe Saml::Providers::SetAttributesService, type: :model do
expect(subject.slug).to eq "saml-foo"
expect(subject.creator).to eq(current_user)
expect(subject.sp_entity_id).to eq(OpenProject::StaticRouting::StaticUrlHelpers.new.root_url)
- expect(subject.name_identifier_format).to eq("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress")
+ expect(subject.name_identifier_format).to eq("urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified")
expect(subject.signature_method).to eq(Saml::Defaults::SIGNATURE_METHODS["RSA SHA-1"])
expect(subject.digest_method).to eq(Saml::Defaults::DIGEST_METHODS["SHA-1"])