summaryrefslogtreecommitdiff
path: root/src/jwtf
Commit message (Collapse)AuthorAgeFilesLines
* Ignore unchecked JWT claimsJay Doane2021-03-151-10/+26
| | | | | | | | | | | | | | | | Previously, if a JWT claim was present, it was validated regardless of whether it was required. However, according to the spec [1]: "all claims that are not understood by implementations MUST be ignored" which we interpret to mean that we should not attempt to validate claims we don't require. With this change, only claims listed in required checks are validated. [1] https://tools.ietf.org/html/rfc7519#section-4
* Include necessary dependency in jwtf keystore test setup & teardownJay Doane2021-03-151-2/+2
| | | | | The config application depends on couch_log, so include it when setting up and tearing down tests.
* return a clean error if pem_decode failsRobert Newson2020-09-032-8/+20
|
* make jwtf_keystore compatible with erlang 19 for real this timejwtf-erlang-19-2Robert Newson2020-05-211-1/+1
|
* make jwtf_keystore compatible with erlang 19jwtf-erlang-19Robert Newson2020-05-211-1/+1
|
* Verify all presented claimsjwt-controls-2Robert Newson2020-03-302-13/+13
| | | | | | All claims in the header and payload are verified if present. The required_claims config setting is now separate and only causes CouchDB to reject JWT tokens without those claims.
* Enhance valid claims checks to detect binaries, etcRobert Newson2020-03-302-4/+30
|
* Remove enhanced alg checkRobert Newson2020-03-302-15/+4
| | | | | This mechanism is replaced by the much stronger tying of verification algorithm to the key directly in the server config.
* Only trust the servers declaration of JWT key typeRobert Newson2020-03-282-26/+126
|
* base64 the symmetric jwt keysjwt-enhancementsRobert Newson2020-03-221-1/+1
|
* Create in-memory cache of JWT keysRobert Newson2020-03-224-0/+186
| | | | | Decoding RSA and EC keys is a little expensive and we don't want to do it for every single request. Add a cache that is invalidated on config change.
* Throw if an unknown check is passed to jwtf:decodeRobert Newson2020-03-162-0/+23
|
* Enhance alg checkjwtf-enhance-alg-checkRobert Newson2020-03-132-4/+15
| | | | | The "alg" check can now take list of algorithms that are supported, which must be from the valid list of algorithms.
* merged jwtf into src/jwtfRobert Newson2020-03-127-0/+851