-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Uncomment algorithms for jwt. #3589
Conversation
Can somebody restart travis build? It looks like a random timeout error.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @kepkin for the contribution! Looking forward to a few changes in the tests (thanks for providing them), and this should be good to go. Would you mind taking the time to address the comments? Thanks!
sub = "1234567890" | ||
}, "secret", 'HS384') | ||
|
||
if helpers.openresty_ver_num < 11123 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since 0.14.0 (now in the master branch), we only support OpenResty 1.13.2.6 and above, so we do not need these branches anymore. Our CI also runs with recent OpenResty version(s) as well: https://github.com/Kong/kong/blob/master/.travis.yml#L28-L29
5MCJ9.fAk3ps-s7_vQk6XpiVq5GiNjZ__cMW37kE9MEQoR6MwX | ||
ELTFtSIoNOpmhOe_wnCS | ||
]], true), token) | ||
assert.equal('not', 'implemented') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the feature is supposedly not implemented on some older dependency version (although I am not sure why it wouldn't), then isn't the assertion doomed to fail?
Also, 'not' and 'implemented' clearly aren't equal, so the second assertion doesn't really make any sense? If anything, jwt_parser.encode()
will throw an error, not return one.
This while branch goes away anyway since we only support OpenResty 1.13.6.2 and above from now on :)
name = "John Doe", | ||
admin = true, | ||
sub = "1234567890" | ||
}, "secret", 'HS384') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We consistently use double quotes throughout this codebase, will you please convert these single ones? There are other similar places in this patch. Thanks!
@kepkin Hi there, Any chance you could fix the few comments on this PR? Thanks! |
Hi @thibaultcha, sorry for the delay. Was busy with other tasks :-) |
@kepkin No worries. Will you also be able to provide a few integration tests? See how 4e2e1d7#diff-7169eb138e87d0233774868e385f8dcdR272 added a couple of tests - we should do the same for these new algorithms and make sure that their implementation works end-to-end. Will you have some time to do this? The tests will likely be very similar to the ones I linked you to, and can simply be adapted. |
@thibaultcha thank you for pointing out these tests. It required some fixes. |
@kepkin Very nice! Thank you for taking care of the tests. In order for us to merge your feature, we would also need an update to our documentation: https://github.com/Kong/docs.konghq.com Would you be able to open a PR there (against the master branch is fine, and we'll rebase it appropriately for the next release). Thank you! |
Looks like there is not much to add |
@kepkin Thanks for the docs PR! This is merged as well to master with minor edits. Feel free to reach out to us if you wish to receive a Contributor T-shirt 😉 |
Summary
Uncommented HS384 & HS512 algorithms for jwt
Full changelog