diff --git a/Directory.Packages.props b/Directory.Packages.props index 64ddefbc26..ae06809146 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,9 +1,7 @@ - true - @@ -19,10 +17,10 @@ - + + - + - \ No newline at end of file diff --git a/libs/server/Auth/GarnetAadAuthenticator.cs b/libs/server/Auth/GarnetAadAuthenticator.cs index 0f26601520..6746bf39b8 100644 --- a/libs/server/Auth/GarnetAadAuthenticator.cs +++ b/libs/server/Auth/GarnetAadAuthenticator.cs @@ -10,6 +10,7 @@ using Garnet.server.Auth.Aad; using Microsoft.Extensions.Logging; using Microsoft.IdentityModel.Tokens; +using Microsoft.IdentityModel.Validators; namespace Garnet.server.Auth { @@ -62,6 +63,7 @@ public bool Authenticate(ReadOnlySpan password, ReadOnlySpan usernam ValidAudiences = _audiences, IssuerSigningKeys = _signingTokenProvider.SigningTokens }; + parameters.EnableAadSigningKeyIssuerValidation(); var identity = _tokenHandler.ValidateToken(Encoding.UTF8.GetString(password), parameters, out var token); diff --git a/libs/server/Garnet.server.csproj b/libs/server/Garnet.server.csproj index 2950ad32b4..2bbe3b854c 100644 --- a/libs/server/Garnet.server.csproj +++ b/libs/server/Garnet.server.csproj @@ -19,6 +19,7 @@ +