-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix: ensure RSA key length fullfills 4096bit requirement (#2905) #3402
Conversation
afc70c6
to
3bf96db
Compare
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.
Cool! Sorry, not familiar with the spec. Is the min key size defined there as 4096 bits?
hsm/manager_hsm.go
Outdated
Context: hsm, | ||
KeySetPrefix: config.HSMKeySetPrefix(), | ||
Context: hsm, | ||
ctx: ctx, |
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.
I suggest not storing the context in the KeyManager. I'd suggest passing the configuration options (KeySetPrefix
and DevMode
for example) to the constructor instead and storing them directly.
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.
I might remember it wrong, but in one of my previous code review, the suggestion was to pass configuration context so when configuration is updated, the changes will be used. Also because I am not full time go developer I code by example quite often. That said I am happy to make the change - just clearifing how I got here! :)
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.
Hey, sorry for the late review. @alnr is correct here, the context should come from the function caller, not the service itself. I checked quickly and getKeySetAttributes
is being called from two functions, both of which have context.Context available. I'll push the changes shortly
Codecov Report
@@ Coverage Diff @@
## master #3402 +/- ##
=======================================
Coverage 76.85% 76.85%
=======================================
Files 123 123
Lines 9125 9105 -20
=======================================
- Hits 7013 6998 -15
+ Misses 1665 1663 -2
+ Partials 447 444 -3 see 6 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This constraint came from here |
Co-authored-by: Arne <a.luenser@gmail.com>
e5a6fd5
to
81cca52
Compare
Fixes #2905
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
security@ory.sh) from the maintainers to push
the changes.
works.