Skip to content

UI to change the encryption key #3631

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

Open
avernet opened this issue Jun 19, 2018 · 3 comments
Open

UI to change the encryption key #3631

avernet opened this issue Jun 19, 2018 · 3 comments

Comments

@avernet
Copy link
Collaborator

avernet commented Jun 19, 2018

Currently, Form Runner doesn't provide an easy way to change the encryption key after data has been encrypted.

As a workaround, for a given form, one could in Form Builder mark all fields as non-encrypted, re-encrypt (so no fields are encrypted in the database), change the password, change the form definitions again in Form Builder to mark fields as encrypted, and do a final re-encryption. But of course, this procedure is quite inconvenient, to say the least.

@ebruchez
Copy link
Collaborator

Following #3525.

@avernet
Copy link
Collaborator Author

avernet commented Apr 8, 2025

  • UX
    • Set oxf.fr.field-encryption.password.read-fallback to oxf.fr.field-encryption.password
    • Set oxf.fr.field-encryption.password to new password
    • Click on reencrypt in Forms Admin, no change to the existing UI

@avernet
Copy link
Collaborator Author

avernet commented Apr 9, 2025

  • Add support for If-Unmodified-Since to the PUT operation
    • This creates an atomic operation that only stores the document if it hasn't been updated after the specified time
    • The atomicity is similar to that introduced by Create-If: search-empty for More robust Singleton form constraint checking #6902
    • On failure, use 412 Precondition Failed
  • When re-encrypting, Orbeon Forms will:
    1. Read the data and note the Last-Modified
    2. When performing the PUT, provide that value as If-Unmodified-Since
    3. If the PUT fails, it means someone else saved the data after it was read, so start over from the first step
  • Improvement: use ETags
    • The GET returns a header ETag: "686897696a7c876b7e"
    • The PUT adds a header If-Match: "686897696a7c876b7e"
  • All the above headers are part of HTTP/1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants