-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distributed claims utilities #171
Comments
cc @sean-q-sun |
Hi folks. I was away from keyboard for a few days, hence the late response. This certainly seems like an useful addition to have out of the box. A few questions come to mind:
Hope this helps, even if belated, as you've already started working on it. Cheers, |
Hope you enjoyed your time off!
The proposed change is to keep all the existing behavior the same, but introduce a new method // Claim unmarshals the value of the named claim into v.
//
// var email string
// if err := idToken.Claim("email", &email); err != nil {
// // handle error
// }
//
// If the named claims is a distributed claim, Claim queries the remote endpoint to
// resolve the claim value.
//
// See: https://openid.net/specs/openid-connect-core-1_0.html#DistributedExample
func (i *IDToken) Claim(name string, v interface{}) error We'd also add something to the verifier config: type Config struct {
// Existing fields...
// GetVerifier, if not nil, is called when attempting to verify JWTs returned by a
// distributed claim. If GetVerifier returns an error, the JWT is rejected.
//
// If nil, the verifier will be initialized using HTTP discovery and passed the same
// context and config as the existing verifier.
GetVerifier func(issuerURL string) (*IDTokenVerifier, error)
}
I'd like to hold off on aggregated claims until we have a use case. The existing
Yeah... I guess we'll start with the strictest verification then loosen our requirements as someone asks for it. |
Hi - we are facing the distributed claim with Azure AD -> zalando/skipper#1955 The |
http://openid.net/specs/openid-connect-core-1_0.html#AggregatedDistributedClaims
ref kubernetes/kubernetes#63213
Consider adding some sort of distributed claim resolver. Maybe another field on the IDToken?
Claim expansion could be done when calling
IDToken.Claim
or could be built intoIDTokenVerifier.Verify
cc @filmil for any thoughts here
The text was updated successfully, but these errors were encountered: