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

added support for validating HS512 JWT tokens #282

Merged
merged 4 commits into from
Aug 29, 2019

Conversation

tejash-jl
Copy link

Added support for validating HS512 JWT tokens

Description

added a hs512 case to handle the tokens

Motivation and Context

We have JWT tokens signed by HS512 method. Its was throwing invalid signature. So had to add this extension

How Has This Been Tested?

I have added tests with valid HS512 signed tokens

@zhouzhuojie
Copy link
Collaborator

@codecov-io
Copy link

codecov-io commented Aug 28, 2019

Codecov Report

Merging #282 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #282      +/-   ##
=========================================
+ Coverage   81.76%   81.8%   +0.03%     
=========================================
  Files          26      26              
  Lines        1530    1533       +3     
=========================================
+ Hits         1251    1254       +3     
  Misses        210     210              
  Partials       69      69
Impacted Files Coverage Δ
pkg/config/middleware.go 64.17% <100%> (+0.82%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d7481b...646d893. Read the comment docs.

@tejash-jl
Copy link
Author

Thanks! Can you also update https://github.com/checkr/flagr/blob/master/pkg/config/env.go#L166?

Updated

Config.JWTAuthEnabled = true
Config.JWTAuthSecret = "mysecret"
Config.JWTAuthSigningMethod = "HS512"
Config.JWTAuthDebug = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, I don't think you need to set Config.JWTAuthDebug = true here, if so, please also unset it in the defer function.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed it.

@zhouzhuojie zhouzhuojie merged commit 9a0c6d9 into openflagr:master Aug 29, 2019
@zhouzhuojie
Copy link
Collaborator

🎉

@tejash-jl
Copy link
Author

@zhouzhuojie Can you deploy the latest changes to docker hub?

@zhouzhuojie
Copy link
Collaborator

@zhouzhuojie Can you deploy the latest changes to docker hub?

Done. Also opened an issue about auto release. #292

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.

3 participants