Skip to content

Conversation

@janl
Copy link
Member

@janl janl commented Jun 12, 2020

wip, nothing to see here, just pushing so I can get a CI run

rnewson and others added 30 commits May 6, 2017 09:32
Test does not pass yet.
* remove dependency on config
* make checks optional
* support HS256
and make everything truly optional.
* Improve pubkey not found error handling

When the public key identified by the {Alg, KID} tuple is not found on
the IAM keystore server, it's possible to see errors like:

(node1@127.0.0.1)140> epep:jwt_decode(SampleJWT).
** exception error: no function clause matching
                    public_key:do_verify(<<"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTcwNTIwLTAwOjAwOjAwIn0.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjEyMzIx"...>>,
                                         sha256,
                                         <<229,188,162,247,201,233,118,32,115,206,156,
                                           169,17,221,78,157,161,147,46,179,42,219,66,
                                           15,139,91,...>>,
                                         {error,not_found}) (public_key.erl, line 782)
     in function  jwtf:public_key_verify/4 (src/jwtf.erl, line 212)
     in call from jwtf:decode/3 (src/jwtf.erl, line 30)

Modify key/1 and public_key_not_found_test/0 to account for keystore
changing from returning an error tuple to throwing one.
Tolerate 5 crashes per 10 seconds
@janl janl force-pushed the feat/access-3.x branch from eea89d5 to 872b582 Compare July 10, 2020 17:17
@janl janl changed the base branch from master to 3.x July 26, 2020 14:03
@janl janl changed the base branch from 3.x to master July 26, 2020 14:03
@wohali wohali changed the base branch from master to main October 21, 2020 18:11
@wohali wohali changed the base branch from main to 3.x October 21, 2020 18:11
@janl
Copy link
Member Author

janl commented Aug 6, 2022

closing in favour of #4139

@janl janl closed this Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.