You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error has occurred.
An unexpected error has occurred.
Screenshots or Videos
Additional Context
I have YubiKey, email and DUO setup as 2FA providers.
identity.log contains errors:
crit: Duende.IdentityServer.Hosting.IdentityServerMiddleware[0]
=> SpanId:0793de8fbc8a9643, TraceId:cbf9c730dfc53426bd441f606553d5c3, ParentId:0000000000000000 => ConnectionId:0HN8LAP7QJDPM => RequestPath:/identity/connect/token RequestId:0HN8LAP7QJDPM:00000001 => IpAddress:172.18.0.4 UserAgent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 DeviceType:9 Origin:9 ClientVersion:2024.10.5
Unhandled exception: Unable to cast object of type 'System.Boolean' to type 'System.String'.
System.InvalidCastException: Unable to cast object of type 'System.Boolean' to type 'System.String'.
at Bit.Core.Auth.Identity.YubicoOtpTokenProvider.<>c.<CanGenerateTwoFactorTokenAsync>b__3_0(Object v) in /source/src/Core/Auth/Identity/YubicoOtpTokenProvider.cs:line 33
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Bit.Core.Auth.Identity.YubicoOtpTokenProvider.CanGenerateTwoFactorTokenAsync(UserManager`1 manager, User user) in /source/src/Core/Auth/Identity/YubicoOtpTokenProvider.cs:line 33
at Microsoft.AspNetCore.Identity.UserManager`1.GetValidTwoFactorProvidersAsync(TUser user)
at Bit.Identity.IdentityServer.RequestValidators.TwoFactorAuthenticationValidator.RequiresTwoFactorAsync(User user, ValidatedTokenRequest request) in /source/src/Identity/IdentityServer/RequestValidators/TwoFactorAuthenticationValidator.cs:line 86
at Bit.Identity.IdentityServer.RequestValidators.BaseRequestValidator`1.ValidateAsync(T context, ValidatedTokenRequest request, CustomValidatorRequestContext validatorContext) in /source/src/Identity/IdentityServer/RequestValidators/BaseRequestValidator.cs:line 101
at Bit.Identity.IdentityServer.RequestValidators.ResourceOwnerPasswordValidator.ValidateAsync(ResourceOwnerPasswordValidationContext context) in /source/src/Identity/IdentityServer/RequestValidators/ResourceOwnerPasswordValidator.cs:line 109
at Duende.IdentityServer.Validation.TokenRequestValidator.ValidateResourceOwnerCredentialRequestAsync(NameValueCollection parameters) in /_/src/IdentityServer/Validation/Default/TokenRequestValidator.cs:line 601
at Duende.IdentityServer.Validation.TokenRequestValidator.RunValidationAsync(Func`2 validationFunc, NameValueCollection parameters) in /_/src/IdentityServer/Validation/Default/TokenRequestValidator.cs:line 273
at Duende.IdentityServer.Validation.TokenRequestValidator.ValidateRequestAsync(TokenRequestValidationContext context) in /_/src/IdentityServer/Validation/Default/TokenRequestValidator.cs:line 194
at Duende.IdentityServer.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) in /_/src/IdentityServer/Endpoints/TokenEndpoint.cs:line 120
at Duende.IdentityServer.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) in /_/src/IdentityServer/Endpoints/TokenEndpoint.cs:line 81
at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IdentityServerOptions options, IEndpointRouter router, IUserSession userSession, IEventService events, IIssuerNameService issuerNameService, ISessionCoordinationService sessionCoordinationService) in /_/src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 106
fail: Microsoft.AspNetCore.Server.Kestrel[13]
=> SpanId:0793de8fbc8a9643, TraceId:cbf9c730dfc53426bd441f606553d5c3, ParentId:0000000000000000 => ConnectionId:0HN8LAP7QJDPM => RequestPath:/identity/connect/token RequestId:0HN8LAP7QJDPM:00000001
Connection id "0HN8LAP7QJDPM", Request id "0HN8LAP7QJDPM:00000001": An unhandled exception was thrown by the application.
System.InvalidCastException: Unable to cast object of type 'System.Boolean' to type 'System.String'.
at Bit.Core.Auth.Identity.YubicoOtpTokenProvider.<>c.<CanGenerateTwoFactorTokenAsync>b__3_0(Object v) in /source/src/Core/Auth/Identity/YubicoOtpTokenProvider.cs:line 33
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Bit.Core.Auth.Identity.YubicoOtpTokenProvider.CanGenerateTwoFactorTokenAsync(UserManager`1 manager, User user) in /source/src/Core/Auth/Identity/YubicoOtpTokenProvider.cs:line 33
at Microsoft.AspNetCore.Identity.UserManager`1.GetValidTwoFactorProvidersAsync(TUser user)
at Bit.Identity.IdentityServer.RequestValidators.TwoFactorAuthenticationValidator.RequiresTwoFactorAsync(User user, ValidatedTokenRequest request) in /source/src/Identity/IdentityServer/RequestValidators/TwoFactorAuthenticationValidator.cs:line 86
at Bit.Identity.IdentityServer.RequestValidators.BaseRequestValidator`1.ValidateAsync(T context, ValidatedTokenRequest request, CustomValidatorRequestContext validatorContext) in /source/src/Identity/IdentityServer/RequestValidators/BaseRequestValidator.cs:line 101
at Bit.Identity.IdentityServer.RequestValidators.ResourceOwnerPasswordValidator.ValidateAsync(ResourceOwnerPasswordValidationContext context) in /source/src/Identity/IdentityServer/RequestValidators/ResourceOwnerPasswordValidator.cs:line 109
at Duende.IdentityServer.Validation.TokenRequestValidator.ValidateResourceOwnerCredentialRequestAsync(NameValueCollection parameters) in /_/src/IdentityServer/Validation/Default/TokenRequestValidator.cs:line 601
at Duende.IdentityServer.Validation.TokenRequestValidator.RunValidationAsync(Func`2 validationFunc, NameValueCollection parameters) in /_/src/IdentityServer/Validation/Default/TokenRequestValidator.cs:line 273
at Duende.IdentityServer.Validation.TokenRequestValidator.ValidateRequestAsync(TokenRequestValidationContext context) in /_/src/IdentityServer/Validation/Default/TokenRequestValidator.cs:line 194
at Duende.IdentityServer.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) in /_/src/IdentityServer/Endpoints/TokenEndpoint.cs:line 120
at Duende.IdentityServer.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) in /_/src/IdentityServer/Endpoints/TokenEndpoint.cs:line 81
at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IdentityServerOptions options, IEndpointRouter router, IUserSession userSession, IEventService events, IIssuerNameService issuerNameService, ISessionCoordinationService sessionCoordinationService) in /_/src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 106
at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IdentityServerOptions options, IEndpointRouter router, IUserSession userSession, IEventService events, IIssuerNameService issuerNameService, ISessionCoordinationService sessionCoordinationService) in /_/src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 128
at Duende.IdentityServer.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) in /_/src/IdentityServer/Hosting/MutualTlsEndpointMiddleware.cs:line 95
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Duende.IdentityServer.Hosting.DynamicProviders.DynamicSchemeAuthenticationMiddleware.Invoke(HttpContext context) in /_/src/IdentityServer/Hosting/DynamicProviders/DynamicSchemes/DynamicSchemeAuthenticationMiddleware.cs:line 51
at Duende.IdentityServer.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) in /_/src/IdentityServer/Hosting/BaseUrlMiddleware.cs:line 27
at Bit.Core.Utilities.CurrentContextMiddleware.Invoke(HttpContext httpContext, ICurrentContext currentContext, GlobalSettings globalSettings) in /source/src/Core/Utilities/CurrentContextMiddleware.cs:line 19
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath)
at Bit.Identity.Startup.<>c__DisplayClass10_1.<<Configure>b__2>d.MoveNext() in /source/src/Identity/Startup.cs:line 188
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
The text was updated successfully, but these errors were encountered:
I was upgrading from bitwarden/self-host:2024.8.3-beta
I have tried to roll back to it, but seems DB migrations are not backward compatible. If I try to run bitwarden/self-host:2024.8.3-beta it complains on some DB columns missing.
Would be glad for any guidance how to restore access without losing whole vault.
I am glad to see you were able to get some help from our integration team regarding this. The issue here will remain open for now as it has been escalated for further investigation.
Steps To Reproduce
Expected Result
Logged in to secrets list or 2FA prompt
Actual Result
An error has occurred.
An unexpected error has occurred.
Screenshots or Videos
Additional Context
I have YubiKey, email and DUO setup as 2FA providers.
identity.log contains errors:
Githash Version
6862a9b-dirty
Environment Details
Lubuntu, Docker
Database Image
postgres:15-alpine
Issue-Link
#2480
Issue Tracking Info
The text was updated successfully, but these errors were encountered: