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

Add Support to be able to verify from multiple keys #425

Merged
merged 1 commit into from Dec 13, 2021
Merged

Add Support to be able to verify from multiple keys #425

merged 1 commit into from Dec 13, 2021

Conversation

ritikesh
Copy link
Contributor

@ritikesh ritikesh commented Jun 17, 2021

Problem -

During a security incident, if one has to rotate secrets shared with 3rd party apps, one has to ensure backward compatibility where both the old and new secrets continue to work.

Solution -
Have made changes to iterate over an array of keys while verifying signature. This can be used by returning an array of keys from the find_key block.

PS: Will add specs if changes are ok.

@sourcelevel-bot
Copy link

Hello, @ritikesh! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

lib/jwt/decode.rb Outdated Show resolved Hide resolved
lib/jwt/decode.rb Outdated Show resolved Hide resolved
lib/jwt/decode.rb Outdated Show resolved Hide resolved
lib/jwt/decode.rb Outdated Show resolved Hide resolved
lib/jwt/decode.rb Outdated Show resolved Hide resolved
lib/jwt/decode.rb Outdated Show resolved Hide resolved
@anakinj
Copy link
Member

anakinj commented Jun 17, 2021

Thanks for the proposal, first impression is that I think this is a pretty good idea. Have to digest it a little still if there are potential problems with this kind of behaviour. A little finetuning to get the specs passing and maybe adding a few new tests.

@ritikesh
Copy link
Contributor Author

Thanks for the proposal, first impression is that I think this is a pretty good idea. Have to digest it a little still if there are potential problems with this kind of behaviour. A little finetuning to get the specs passing and maybe adding a few new tests.

Thanks! I'll add some new tests tomorrow and fix the existing specs as well.

spec/jwk/ec_spec.rb Outdated Show resolved Hide resolved
spec/jwt_spec.rb Outdated Show resolved Hide resolved
spec/jwt_spec.rb Outdated Show resolved Hide resolved
@sourcelevel-bot
Copy link

SourceLevel has finished reviewing this Pull Request and has found:

  • 2 possible new issues (including those that may have been commented here).
  • 4 fixed issues! 🎉

See more details about this review.

@excpt excpt self-requested a review June 23, 2021 07:25
lib/jwt/decode.rb Outdated Show resolved Hide resolved
spec/jwt_spec.rb Outdated Show resolved Hide resolved
@anakinj
Copy link
Member

anakinj commented Jun 28, 2021

@excpt You have anything to add? I think this is a pretty neat addition. Would be ready to merge.

@ritikesh
Copy link
Contributor Author

ritikesh commented Jul 6, 2021

Hi @anakinj / @excpt - following up on this. Is there anything pending for this to be merged?

@anakinj
Copy link
Member

anakinj commented Jul 9, 2021

From my part it looks good. Was thinking a second opinion on the feature would be valuable.

@ritikesh
Copy link
Contributor Author

ritikesh commented Aug 9, 2021

Hi @anakinj / @excpt - circling back on this.

@ritikesh
Copy link
Contributor Author

ritikesh commented Nov 3, 2021

Hi @excpt - have you had a chance to look at this? Would appreciate your thoughts on how to proceed.

@anakinj
Copy link
Member

anakinj commented Dec 8, 2021

Im thinking we could merge this. Could you still be so kind and rebase to the latest master where the ruby-head build should have been fixed.

@ritikesh
Copy link
Contributor Author

Hey, I've rebased my branch to the current master. Thanks.

Im thinking we could merge this. Could you still be so kind and rebase to the latest master where the ruby-head build should have been fixed.

@anakinj anakinj merged commit c4aa448 into jwt:master Dec 13, 2021
@ritikesh ritikesh deleted the support_for_finding_multiple_keys branch December 13, 2021 11:14
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.

None yet

2 participants