allow multiple of --service-account-issuer
Kubernetes-commit: 925900317e43e58435082f624f5969e3cfe25c67
This commit is contained in:
parent
940c107184
commit
87ac3f57d4
|
|
@ -24,6 +24,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewFromTokens returns an authenticator.Request or an error
|
// NewFromTokens returns an authenticator.Request or an error
|
||||||
func NewFromTokens(tokens map[string]*user.DefaultInfo) authenticator.Request {
|
func NewFromTokens(tokens map[string]*user.DefaultInfo, audiences authenticator.Audiences) authenticator.Request {
|
||||||
return bearertoken.New(tokenfile.New(tokens))
|
return bearertoken.New(authenticator.WrapAudienceAgnosticToken(audiences, tokenfile.New(tokens)))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -858,7 +858,7 @@ func AuthorizeClientBearerToken(loopback *restclient.Config, authn *Authenticati
|
||||||
Groups: []string{user.SystemPrivilegedGroup},
|
Groups: []string{user.SystemPrivilegedGroup},
|
||||||
}
|
}
|
||||||
|
|
||||||
tokenAuthenticator := authenticatorfactory.NewFromTokens(tokens)
|
tokenAuthenticator := authenticatorfactory.NewFromTokens(tokens, authn.APIAudiences)
|
||||||
authn.Authenticator = authenticatorunion.New(tokenAuthenticator, authn.Authenticator)
|
authn.Authenticator = authenticatorunion.New(tokenAuthenticator, authn.Authenticator)
|
||||||
|
|
||||||
tokenAuthorizer := authorizerfactory.NewPrivilegedGroups(user.SystemPrivilegedGroup)
|
tokenAuthorizer := authorizerfactory.NewPrivilegedGroups(user.SystemPrivilegedGroup)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue