diff --git a/src/Core/Enums/Saml2BindingType.cs b/src/Core/Enums/Saml2BindingType.cs deleted file mode 100644 index 6476af1a93..0000000000 --- a/src/Core/Enums/Saml2BindingType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Bit.Core.Enums -{ - public enum Saml2BindingType : byte - { - HttpRedirect = 1, - HttpPost = 2, - Artifact = 4 - } -} diff --git a/src/Core/Enums/Saml2SigningBehavior.cs b/src/Core/Enums/Saml2SigningBehavior.cs index 9ef55ec003..a02e5b1d91 100644 --- a/src/Core/Enums/Saml2SigningBehavior.cs +++ b/src/Core/Enums/Saml2SigningBehavior.cs @@ -2,8 +2,8 @@ { public enum Saml2SigningBehavior : byte { - IfIdpWantAuthnRequestsSigned = 0, - Always = 1, - Never = 3 + IfIdpWantAuthnRequestsSigned = 0, + Always = 1, + Never = 3 } } diff --git a/src/Core/Enums/SsoType.cs b/src/Core/Enums/SsoType.cs deleted file mode 100644 index 3c1884bd79..0000000000 --- a/src/Core/Enums/SsoType.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Bit.Core.Enums -{ - public enum SsoType : byte - { - OpenIdConnect = 1, - Saml2 = 2, - } -} diff --git a/src/Core/GlobalSettings.cs b/src/Core/GlobalSettings.cs index 1a0ec4517b..69612b09e9 100644 --- a/src/Core/GlobalSettings.cs +++ b/src/Core/GlobalSettings.cs @@ -1,4 +1,5 @@ using System; +using Bit.Core.Enums; namespace Bit.Core { @@ -42,6 +43,7 @@ namespace Bit.Core public virtual AmazonSettings Amazon { get; set; } = new AmazonSettings(); public virtual ServiceBusSettings ServiceBus { get; set; } = new ServiceBusSettings(); public virtual AppleIapSettings AppleIap { get; set; } = new AppleIapSettings(); + public virtual SsoSettings Sso { get; set; } = new SsoSettings(); public class BaseServiceUriSettings { @@ -273,5 +275,21 @@ namespace Bit.Core public string Password { get; set; } public bool AppInReview { get; set; } } + + public class SsoSettings + { + public virtual SamlSettings Saml { get; set; } = new SamlSettings(); + + public class SamlSettings + { + public Saml2NameIdFormat NameIdFormat { get; set; } = + Saml2NameIdFormat.Persistent; + public bool WantAssertionsSigned { get; set; } + public string OutboundSigningAlgorithm { get; set; } + public Saml2SigningBehavior SigningBehavior { get; set; } = + Saml2SigningBehavior.IfIdpWantAuthnRequestsSigned; + public bool ValidateCertificates { get; set; } + } + } } }