-
Notifications
You must be signed in to change notification settings - Fork 133
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 ability to encrypt forms after creation #1708
Conversation
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 think you should look in the direction of changing the XML, see xform.py#L788 and xform.py#L180. You want to add the base64RsaPublicKey
as an attribute on the submission node. If you can shift away from the regex in XML as the examples I have pointed out to by using xml.etree.cElementTree.
3ed5731
to
90a8dd4
Compare
76c7f6a
to
da766b7
Compare
- Add public_key field - Add add_xls_encryption_settings function - Add ability to replace form with an encrypted form
- Fix Issue where the xls file was unretrievable on Staging and Development servers
- Added `get_base64RsaPublicKey` helper function to retrieve base64RsaPublicKey - Added `_update_public_key` helper function to update form with the submitted public key Signed-off-by: Mark Ekisa <[email protected]> Co-authored-by: Davis Raymond <[email protected]>
Signed-off-by: Mark Ekisa <[email protected]> Co-authored-by: Davis Raymond <[email protected]>
- Clean public_key before setting - Update json and xml after public_key set - Only update json and xml when the XForm has no submissions
- Remove _clean_public_key method
- Validate public_key - Clean public_key - Test that public_key is updatable
- Minor dependency cleanup
da766b7
to
e8c2f28
Compare
- Utilize a proper RSA key for the test
- Fix failing tests
This PR implements the ability to encrypt forms after they have being created through a
PATCH
request with a payload like:PATCH
Sample Payload