From 8f64f4a99f1de8052b3cd3a08c19e9bca5598848 Mon Sep 17 00:00:00 2001 From: Chad Scharf <3904944+cscharf@users.noreply.github.com> Date: Tue, 4 May 2021 23:28:00 -0400 Subject: [PATCH] Added fido2 registration to other services --- bitwarden_license/src/Portal/Startup.cs | 9 +++++++++ bitwarden_license/src/Sso/Startup.cs | 9 +++++++++ src/Billing/Startup.cs | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/bitwarden_license/src/Portal/Startup.cs b/bitwarden_license/src/Portal/Startup.cs index ccd8c6fb7..3972a6094 100644 --- a/bitwarden_license/src/Portal/Startup.cs +++ b/bitwarden_license/src/Portal/Startup.cs @@ -46,6 +46,15 @@ namespace Bit.Portal services.AddScoped((serviceProvider) => serviceProvider.GetService()); + // Fido2 + services.AddFido2(options => + { + options.ServerDomain = new Uri(globalSettings.BaseServiceUri.Vault).Host; + options.ServerName = "Bitwarden"; + options.Origin = globalSettings.BaseServiceUri.Vault; + options.TimestampDriftTolerance = 300000; + }); + // Identity services.AddEnterprisePortalTokenIdentityServices(); if (globalSettings.SelfHosted) diff --git a/bitwarden_license/src/Sso/Startup.cs b/bitwarden_license/src/Sso/Startup.cs index dfac772cc..ccfcd92d0 100644 --- a/bitwarden_license/src/Sso/Startup.cs +++ b/bitwarden_license/src/Sso/Startup.cs @@ -43,6 +43,15 @@ namespace Bit.Sso // Context services.AddScoped(); + // Fido2 + services.AddFido2(options => + { + options.ServerDomain = new Uri(globalSettings.BaseServiceUri.Vault).Host; + options.ServerName = "Bitwarden"; + options.Origin = globalSettings.BaseServiceUri.Vault; + options.TimestampDriftTolerance = 300000; + }); + // Mvc services.AddControllersWithViews(); diff --git a/src/Billing/Startup.cs b/src/Billing/Startup.cs index f50c169af..0290e9378 100644 --- a/src/Billing/Startup.cs +++ b/src/Billing/Startup.cs @@ -49,6 +49,15 @@ namespace Bit.Billing // Context services.AddScoped(); + // Fido2 + services.AddFido2(options => + { + options.ServerDomain = new Uri(globalSettings.BaseServiceUri.Vault).Host; + options.ServerName = "Bitwarden"; + options.Origin = globalSettings.BaseServiceUri.Vault; + options.TimestampDriftTolerance = 300000; + }); + // Identity services.AddCustomIdentityServices(globalSettings); //services.AddPasswordlessIdentityServices(globalSettings);