Add route keys/{kid}/jwk.json#48
Conversation
johnabass
left a comment
There was a problem hiding this comment.
Nicely done. Let's push this in our next release.
We should add content negotiation to the /keys/{kid] endpoint to allow returning PEM or JWK, but that can be done in a follow-on PR.
|
I agree. This is great! 😄 Thanks, @Equanox! FYI: there are some failing tests in travis though. We should fix that before merging. |
|
Thx guys, will fix the failing tests. @johnabass didnt know exactly how to react properly to the Content-Type, is there a example in one of your repos? Then i will try to do a follow up PR. |
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
==========================================
- Coverage 96.60% 95.48% -1.13%
==========================================
Files 38 39 +1
Lines 1209 1262 +53
==========================================
+ Hits 1168 1205 +37
- Misses 27 35 +8
- Partials 14 22 +8
Continue to review full report at Codecov.
|
We're in the process of retooling around content negotiation. We should just push this PR to master for now. We can redo an URLs or content negotation after we settle on a solution. |
|
https://github.com/xmidt-org/themis/releases/tag/v0.4.4 has this PR in it. I did change things a bit in #53. Notably, the specific URLs are |
JWK (https://tools.ietf.org/html/rfc7517) format seems to be a bit more common to expose the public key. This allows us to be more flexible in checking JWT validity.
I think it won't break anything as the pem route is still functional. The JWK creation is based on https://github.com/lestrrat-go/jwx .