Bug 31059

Summary: encryption_key config entry not generated when upgrading
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: In Discussion --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: cslone, david, dcook, m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28911
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22857
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30649
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33934
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 28786    
Bug Blocks:    

Description Jonathan Druart 2022-06-28 12:45:21 UTC
It's required for 2FA (from bug 28786) but it's not added to koha-conf.xml when upgrading.
Comment 1 Chris Slone 2022-11-28 21:59:52 UTC
Confirming that this does not get added to the koha-conf.xml. For anyone looking for what to add it would be:

 <!-- Encryption key for crypted password or sensitive data -->
 <encryption_key>__ENCRYPTION_KEY__</encryption_key>
Comment 2 David Cook 2022-11-28 23:37:06 UTC
Yeah, this is an annoyance. The same problem exists for quite a few different koha-conf.xml options :/.
Comment 3 Katrin Fischer 2022-11-29 07:59:50 UTC
We could add something to the about page and future release notes here.
Comment 4 Jonathan Druart 2022-11-29 09:37:10 UTC
We need to script that add missing entries. It could be a simple (perl) misc script that is called at the end of the debian upgrade procedure.
Comment 5 Chris Slone 2022-11-29 14:14:43 UTC
I think a script like that would be great. Documentation would definitely help too, as the tags for wrapping the entry, or even the need for changing the config file at all, wasn't really in the release notes for the new feature (not that I saw, anyhow).
Comment 6 David Cook 2022-12-06 03:11:18 UTC
(In reply to Jonathan Druart from comment #4)
> We need to script that add missing entries. It could be a simple (perl) misc
> script that is called at the end of the debian upgrade procedure.

I added a sample one on bug 28911 that I used as a once-off but it would need work to be used regularly like that.