[Koha] Adding an encryption_key to koha-conf.xml

Tomas Cohen Arazi tomascohen at gmail.com
Thu Jun 30 23:31:43 NZST 2022


Just use:

$ pwgen 32

to generate a bunch of random strings and add the entry in both
koha-conf.xml files as David and Jonathan suggested.
Jonathan just suggested that you could 'script it' in case you had a lot of
instances. Two is manageable, manually :-D

Good luck!


El jue, 30 jun 2022 a las 8:27, Mike Lake (<mikel at speleonics.com.au>)
escribió:

> Hi
>
> Nice that a bug has been opened for this Jonathan.
>
> I'm still unsure what to do.
> koha-foreach will run a command for each Koha instance. I have two
> instances, the main "opac" and a test "libtest2"
> I can create a key in place of __ENCRYPTION_KEY__ within
> koha-conf-site.xml.in
>
> But what command should I be running with foreach?
> Do I need the chdir for whatever command to run?
> koha-foreach [--chdir] [command]
>
> I gather that changes in koha-conf-site.xml.in will be propagated to
> both site files: sites/libtest2/koha-conf.xml and
> sites/opac/koha-conf.xml
> (like changing __KOHASITE__ to the actual site etc ....)
>
> Thanks
> Mike
>
> On 2022-06-30 5:20 pm, Jonathan Druart wrote:
> > Hello Mike,
> >
> > I opened bug 31059.
> > You can use a string that is considered a strong password.
> > Out of the box Koha does not provide a script to edit this file, but
> > you could write a script for that (open the xml, generate a key, add
> > the missing entry, write the xml) then use koha-foreach to run it for
> > each koha site.
> >
> > Regards,
> > Jonathan
> >
> > Le sam. 25 juin 2022 à 12:21, Mike Lake <mikel at speleonics.com.au> a
> > écrit :
> >>
> >> Hi All
> >>
> >> Just upgraded tonight from Koha 21.11.05.000 to 22.05.00-1
> >> That all went fine.
> >>
> >> The About Koha page now says:
> >> "Warning: You are missing the <encryption_key> entry in your
> >> koha-conf.xml file. Please generate a key."
> >>
> >> I can see a place for this is the koha-conf-site.xml.in file (and a
> >> suggestion to use pwgen 32) but how do you process this to the
> >> koha-conf.xml files for each site?
> >>
> >> The "pwgen 32" suggests this should be 32 characters and is itself
> >> just
> >> something that no one should be able to guess. So I can can just put
> >> anything in there that is long and complex?
> >>
> >> I could not find anything about this is the docs or wiki or recent
> >> emails, just the patch for it in the github repo via Google.
> >>
> >> Thanks
> >> Mike
> >>
> >> _______________________________________________
> >>
> >> Koha mailing list  http://koha-community.org
> >> Koha at lists.katipo.co.nz
> >> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
> --
> Mike
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>


-- 
Tomás Cohen Arazi
Theke Solutions (http://theke.io)
✆ +54 9351 3513384
GPG: B2F3C15F


More information about the Koha mailing list