Problem/Motivation

The README currently describes how to configure the module but it does not explain the process for generating a key. Providing a sample command for generating the key or a link to documentation from a third-party source would be very helpful for newcomers who are interested in checking this module out.

Issue fork real_aes-3273429

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ptmkenny created an issue. See original summary.

mrweiner’s picture

https://www.drupal.org/project/sodium includes this in their documentation:

Generate a random 256-bit key

Option 1: Output your key to a file using a method such as the following:
dd if=/dev/urandom bs=32 count=1 > /path/to/secret.key (change the path and filename to suit your needs)
Option 2: Output your key to standard output and Base64-encode it so it can be copied and pasted:
dd if=/dev/urandom bs=32 count=1 | base64 -i -

This is essentially the same as mentioned on https://www.daggerhartlab.com/how-to-setup-encrypt-module-for-drupal-8/

dd if=/dev/urandom bs=32 count=1 | base64 -i - > path/to/my/encrypt.key

So I think this is the answer, although I haven't tested yet.

mrweiner’s picture

Status: Active » Needs review

Confirmed that the command from #2 works as expected. MR updates the README to include these instructions.

ptmkenny’s picture

Thanks for this! I made a few more changes:

  • Fixed a spelling error (encryption).
  • Removed the specific comments about Drupal 8 and changed to Drupal 8+.
  • Made punctuation consistent.
mrweiner’s picture

The Configuration provider can be used during development, but do not use it on a production website.
Not sure this is gramatically correct. We can keep the first half if desired, but the second half should likely still read "but should not be used on a production website."

ptmkenny’s picture

Thanks for the correction. I rewrote the message to be more clear.

kopeboy’s picture

Status: Needs review » Reviewed & tested by the community

I confirm that #2 works

rlhawk made their first commit to this issue’s fork.

  • rlhawk committed 5d7f740c on 8.x-2.x authored by mrweiner
    Issue #3273429 by mrweiner, ptmkenny, kopeboy: Document how to generate...
rlhawk’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

chrisla’s picture

It would be nice to specify in the instructions that the command is for a 256-bit key, especially since 128-bit is the default setting when creating a key

greggles’s picture

I created #3455949: Create new stable release for 8.x-2.6 which would get these instructions in a stable release.