Support all key algs with structured authn config

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: b5e0068325da7aa5ca42a7d5ea6b0f012a519765
This commit is contained in:
Monis Khan 2024-02-13 13:45:53 -05:00 committed by Kubernetes Publisher
parent 6d4e589c29
commit d887d80e81
1 changed files with 5 additions and 2 deletions

View File

@ -204,8 +204,11 @@ func (a *Authenticator) Close() {
a.cancel()
}
// whitelist of signing algorithms to ensure users don't mistakenly pass something
// goofy.
func AllValidSigningAlgorithms() []string {
return sets.List(sets.KeySet(allowedSigningAlgs))
}
// allowlist of signing algorithms to ensure users don't mistakenly pass something goofy.
var allowedSigningAlgs = map[string]bool{
oidc.RS256: true,
oidc.RS384: true,