[Bug 42861] New: System warning about missing encryption_key on a fresh instance
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 Bug ID: 42861 Summary: System warning about missing encryption_key on a fresh instance Initiative type: --- Sponsorship --- status: Product: Koha Version: 26.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: saiful@semanticconsulting.com QA Contact: testopia@bugs.koha-community.org CC: jake.deery@openfifth.co.uk, robin@catalyst.net.nz Target Milestone: --- On a fresh Koha installation, the About Koha > System information page shows this XML configuration warning: Warning You are missing the <encryption_key> entry in your koha-conf.xml file. Please generate a key. We recommend one of at least 32 bytes. (You might use 'pwgen 32' to do so.) I think this has an easy fix, by just adding couple of lines in the koha-create script. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 Saiful Amin <saiful@semanticconsulting.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |saiful@semanticconsulting.c |ity.org |om Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 Saiful Amin <saiful@semanticconsulting.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31059 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 Saiful Amin <saiful@semanticconsulting.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 --- Comment #1 from Saiful Amin <saiful@semanticconsulting.com> --- Created attachment 200551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200551&action=edit Bug 42861 - System warning about missing encryption_key on a fresh instance This patch updates the koha-create command to generate the random encryption key using pwgen with the number of characters set to 32. Test plan: 1. In ktd, create a new instance: - sudo koha-create --create-db test1 - Check the /etc/koha/sites/test1/koha-conf.xml file and verify that the encryption_key is having the placeholder text '__ENCRYPTION_KEY__' 2. Apply the patch and copy the new koha-create command - git bz apply 42861 - sudo cp /kohadevbox/koha/debian/scripts/koha-create /usr/sbin/koha-create 3. In ktd, create a new instance: - sudo koha-create --create-db test2 - Check the /etc/koha/sites/test2/koha-conf.xml file and verify that the encryption_key is generated and has 32 characters random string. 4. Sign-off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Sounds reasonable. I thought that we were already doing this... but maybe I was thinking of the bcrypt settings... At some point, I'd like to have Koha manage secrets better... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 200794 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200794&action=edit Bug 42861: System warning about missing encryption_key on a fresh instance This patch updates the koha-create command to generate the random encryption key using pwgen with the number of characters set to 32. Test plan: 1. In ktd, create a new instance: - sudo koha-create --create-db test1 - Check the /etc/koha/sites/test1/koha-conf.xml file and verify that the encryption_key is having the placeholder text '__ENCRYPTION_KEY__' 2. Apply the patch and copy the new koha-create command - git bz apply 42861 - sudo cp /kohadevbox/koha/debian/scripts/koha-create /usr/sbin/koha-create 3. In ktd, create a new instance: - sudo koha-create --create-db test2 - Check the /etc/koha/sites/test2/koha-conf.xml file and verify that the encryption_key is generated and has 32 characters random string. 4. Sign-off Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Attachment #200551|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Comment on attachment 200551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200551 Bug 42861 - System warning about missing encryption_key on a fresh instance I amended the patch title so that it is in the format 'Bug XXXXX: Title'. (Running the qa script in KTD for a patch will pick this up.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42861 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the koha-create release notes| |command so that it | |generates the random | |encryption key required for | |passwords and sensitive | |data. | | | |It uses pwgen with the | |number of characters set to | |32, and adds the | |<encryption_key> entry to | |the instance's | |koha-conf.xml file. Version|26.05 |Main -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org