Skip to content
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

dev/core#2258 Define CIVICRM_CRED_KEYS during drush installation #125

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

seamuslee001
Copy link
Contributor

Backdrop version of civicrm/civicrm-drupal#636

Overview

When using drush civivcrm-install, the civicrm.settings.php should have a credential-key.

See also: civicrm/civicrm-core#19349 and https://lab.civicrm.org/dev/core/-/issues/2258

Before

Blank key

After

Random key

@totten

@civibot
Copy link

civibot bot commented Jan 10, 2021

(Standard links)

@civibot civibot bot added the 1.x-master label Jan 10, 2021
@totten
Copy link
Member

totten commented Jan 10, 2021

Code and r-run both look good:

## Remove old installation
[bknix-min:~/bknix/build/bcmaster/web/modules/civicrm] amp create -Ncivi -r ~/bknix/build/bcmaster/web/ 
    --skip-url -f ; rm ~/bknix/build/bcmaster/web/civicrm.settings.php -f 

AMP_URL=''
AMP_ROOT='/home/totten/bknix/build/bcmaster/web'
AMP_DB_DSN='mysql://bcmasterci_jj5vu:********@127.0.0.1:3307/bcmastercivi_zawnt?new_link=true'
AMP_DB_USER='bcmasterci_jj5vu'
AMP_DB_PASS='********'
AMP_DB_HOST='127.0.0.1'
AMP_DB_PORT='3307'
AMP_DB_NAME='bcmastercivi_zawnt'
AMP_DB_ARGS='--defaults-file='\''/home/totten/bknix/.loco/var.keep/amp/my.cnf.d/my.cnf-458cce6775527051547400dfe5936d42'\'' bcmastercivi_zawnt'

## Install 
[bknix-min:~/bknix/build/bcmaster/web/modules/civicrm] drush civicrm-install --destination=modules --dbhost=127.0.0.1:3307 --dbuser=bcmasterci_jj5vu 
    --dbpass=******** --dbname=bcmastercivi_zawnt

CiviCRM database loaded successfully.                                                                                                                            [ok]
Settings file generated: /home/totten/bknix/build/bcmaster/web/./civicrm.settings.php                                                                            [ok]
CiviCRM installed.                                                                                                                                               [ok]

## Check for CRED_KEYS
[bknix-min:~/bknix/build/bcmaster/web/modules/civicrm] cv ev 'print_r([CIVICRM_CRED_KEYS]); print_r(Civi::service("crypto.registry")->getKeys());'
Array
(
    [0] => aes-cbc:hkdf-sha256:********
)
Array
(
    [plain] => Array
        (
            [key] => 
            [suite] => plain
            [tags] => Array
                (
                )

            [id] => plain
            [weight] => 32768
        )

    [plain0] => Array
        (
            [suite] => plain
            [weight] => 32768
            [tags] => Array
                (
                    [0] => CRED
                )

            [id] => plain0
        )

    [********] => Array
        (
            [suite] => aes-cbc
            [weight] => 0
            [key] => ********
            [tags] => Array
                (
                    [0] => CRED
                )

            [id] => ********
        )

)

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

Successfully merging this pull request may close these issues.

2 participants