1
0
mirror of https://github.com/bitwarden/server synced 2025-12-22 19:23:45 +00:00

Don't send default SsoConfigurationData to clients (#1879)

This commit is contained in:
Thomas Rittson
2022-03-04 07:09:55 +10:00
committed by GitHub
parent 5f613ebc44
commit 3443fe952b
3 changed files with 27 additions and 33 deletions

View File

@@ -311,8 +311,8 @@ namespace Bit.Core.Business.Sso
NameClaimType = JwtClaimTypes.Name,
RoleClaimType = JwtClaimTypes.Role,
},
CallbackPath = config.BuildCallbackPath(),
SignedOutCallbackPath = config.BuildSignedOutCallbackPath(),
CallbackPath = SsoConfigurationData.BuildCallbackPath(),
SignedOutCallbackPath = SsoConfigurationData.BuildSignedOutCallbackPath(),
MetadataAddress = config.MetadataAddress,
// Prevents URLs that go beyond 1024 characters which may break for some servers
AuthenticationMethod = config.RedirectBehavior,
@@ -356,7 +356,7 @@ namespace Bit.Core.Business.Sso
}
var spEntityId = new Sustainsys.Saml2.Metadata.EntityId(
config.BuildSaml2ModulePath(_globalSettings.BaseServiceUri.Sso));
SsoConfigurationData.BuildSaml2ModulePath(_globalSettings.BaseServiceUri.Sso));
bool? allowCreate = null;
if (config.SpNameIdFormat != Saml2NameIdFormat.Transient)
{
@@ -365,7 +365,7 @@ namespace Bit.Core.Business.Sso
var spOptions = new SPOptions
{
EntityId = spEntityId,
ModulePath = config.BuildSaml2ModulePath(null, name),
ModulePath = SsoConfigurationData.BuildSaml2ModulePath(null, name),
NameIdPolicy = new Saml2NameIdPolicy(allowCreate, GetNameIdFormat(config.SpNameIdFormat)),
WantAssertionsSigned = config.SpWantAssertionsSigned,
AuthenticateRequestSigningBehavior = GetSigningBehavior(config.SpSigningBehavior),