mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
added entra upcoming valid algorithm
This commit is contained in:
@@ -217,8 +217,9 @@ public class AuthenticationMiddleware : IFunctionsWorkerMiddleware
|
||||
return matchedKeys.Any() ? matchedKeys : openIdConfig.SigningKeys;
|
||||
},
|
||||
|
||||
// Set algorithm validators to ensure we only accept RS256
|
||||
ValidAlgorithms = new[] { "RS256" }
|
||||
// Algorithm whitelist: RS256 today, PS256 for Entra's announced rollout.
|
||||
// Hard-blocks HS-family and "none" (algorithm-confusion defence).
|
||||
ValidAlgorithms = new[] { "RS256", "PS256" }
|
||||
};
|
||||
|
||||
var principal = _tokenHandler.ValidateToken(token, validationParameters, out var validatedToken);
|
||||
|
||||
Reference in New Issue
Block a user