Skip to content
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

Consider allowing Signer.key_id to be None #112

Closed
theacodes opened this issue Feb 16, 2017 · 3 comments
Closed

Consider allowing Signer.key_id to be None #112

theacodes opened this issue Feb 16, 2017 · 3 comments
Assignees
Labels
discussion 🚨 This issue needs some love. triage me I really want to be triaged.
Milestone

Comments

@theacodes
Copy link
Contributor

#108 and #109 added a "hack" to allow the key id to be determined when signing with IAM and App Engine. The reasoning for this is that the key id is needed to populate the kid claim in the JWT header.

It turns out, the kid field is optional according to the JWT spec. If it's absent, it's undefined what to do with it, but it seems that most clients will try all available certs (which is what we do as well).

@dhermes @lukesneeringer what do you think about allowing key_id to be None for iam.Signer and app_engine.Signer?

@dhermes
Copy link
Contributor

dhermes commented Feb 16, 2017

I am torn between my preference to be explicit (i.e. require key_id) and my preference to avoid round-trips (i.e. key_id is not available locally and can't be safely cached).

If I had to break the tie, I'd go with the distaste for round-trips: allow key_id to be None

@theacodes
Copy link
Contributor Author

It's also the case that Google's infrastructure doesn't seem to require a KID to be present. I need to do some more verification, but from my initial tests that appears to be the case.

@lukesneeringer
Copy link

If I had to break the tie, I'd go with the distaste for round-trips: allow key_id to be None

This.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants