mirror of
https://github.com/bitwarden/server.git
synced 2025-02-16 01:51:21 +01:00
SAML NameID Policy AllowCreate should be null (#918)
* SAML NameID Policy AllowCreate should be null * Determine if transient, then null, otherwise true
This commit is contained in:
parent
44c3dc4786
commit
6574d083fe
@ -331,11 +331,16 @@ namespace Bit.Core.Business.Sso
|
||||
|
||||
var spEntityId = new Sustainsys.Saml2.Metadata.EntityId(
|
||||
config.BuildSaml2ModulePath(_globalSettings.BaseServiceUri.Sso));
|
||||
bool? allowCreate = null;
|
||||
if (config.SpNameIdFormat != Saml2NameIdFormat.Transient)
|
||||
{
|
||||
allowCreate = true;
|
||||
}
|
||||
var spOptions = new SPOptions
|
||||
{
|
||||
EntityId = spEntityId,
|
||||
ModulePath = config.BuildSaml2ModulePath(),
|
||||
NameIdPolicy = new Saml2NameIdPolicy(true, GetNameIdFormat(config.SpNameIdFormat)),
|
||||
NameIdPolicy = new Saml2NameIdPolicy(allowCreate, GetNameIdFormat(config.SpNameIdFormat)),
|
||||
WantAssertionsSigned = config.SpWantAssertionsSigned,
|
||||
AuthenticateRequestSigningBehavior = GetSigningBehavior(config.SpSigningBehavior),
|
||||
ValidateCertificates = config.SpValidateCertificates,
|
||||
|
Loading…
Reference in New Issue
Block a user