-
Notifications
You must be signed in to change notification settings - Fork 0
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
Move support for encrypted private key #78
Conversation
This matches words like 'password' and 'passphrase'.
Version 2.2.0 is the one that will have support for encrypted private keys.
Using the configured private key, decrypt the certificate's private key and 'replace' the file to point to the decrypted private key instead. Security wise this makes little difference - if you had access to the DB, you could already grab the passphrase to decrypt it yourself. The private media storage and database access are expected to be properly secured by your infra/ops team.
Systems may be in a broken state to begin with, our migration may not crash when trying to process this.
The form field is now a part of django-simple-certmanager, which in turn uses it to decrypt the private key so that the file is ready to use and no additional decryption is needed in django-digid-eherkenning.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #78 +/- ##
==========================================
+ Coverage 90.86% 90.91% +0.05%
==========================================
Files 51 51
Lines 1653 1674 +21
Branches 152 156 +4
==========================================
+ Hits 1502 1522 +20
Misses 110 110
- Partials 41 42 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
So if I understand correctly, simple certmanager was updated to support adding a priv. key with a password, but the password is not stored at all and we decrypt the key on the fly before saving it?
And then on the django-digid-eherkenning
side we "remove" support for storing priv. key passwords, as simple certmanager will decrypt them on the fly?
@Viicos correct! |
This library is no longer responsible for decrypting the private key, instead the django-simple-certmanager library takes care of it at upload time.
Includes a data migration to perform the decryption for existing instances.