Navigation Menu

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

System Check - Add a reminder about CIVICRM_SIGN_KEYS. #23224

Merged
merged 1 commit into from Apr 20, 2022

Conversation

totten
Copy link
Member

@totten totten commented Apr 15, 2022

Overview

The setting CIVICRM_SIGN_KEYS was introduced circa 5.36. However, it is defined in civicrm.settings.php, which makes it difficult to reliably configure in an automated upgrade. Consequently, some sites may not have this setting.

The setting is required for the crypto.jwt API (which in turn is used by some core extensions, like authx and afform).

Before

There is a pre-upgrade message when somebody passes through v5.36.

If you missed the message in 5.36, then you would be unaware of the missing setting (until you hit some failure because you use some new/update code-path that relies on it).

After

There is also a system status-check. If you don't have CIVICRM_SIGN_KEYS, then it will show a link to https://docs.civicrm.org/sysadmin/en/latest/setup/secret-keys/.

Screen Shot 2022-04-14 at 11 50 18 PM

Comments

r-running is pretty simple - just edit your civicrm.settings.php and comment-out any lines mentioning CIVICRM_SIGN_KEYS - then reload the status page. (That's what I did.)

--------

The setting `CIVICRM_SIGN_KEYS` was introduced circa 5.36.  However, it is
defined in `civicrm.settings.php`, which makes it difficult to reliably
configure in an automated upgrade.  Consequently, some sites may not have
this setting, and we must rely on the sysadmin to provide it.

The setting is required for the `crypto.jwt` API (which in turn is used by
some core extensions, like `authx` and `afform`).

Before
------

There is a pre-upgrade message when somebody passes through v5.36.

If you missed the message in 5.36, then you would be unaware of the missing
setting (until you hit some failure because you use some new/update
code-path that relies on it).

After
-----

There is a system status-check.  If you don't have `CIVICRM_SIGN_KEYS`, then
it will show a link to https://docs.civicrm.org/sysadmin/en/latest/setup/secret-keys/.
@civibot civibot bot added the master label Apr 15, 2022
@civibot
Copy link

civibot bot commented Apr 15, 2022

(Standard links)

[1 => 'href="https://docs.civicrm.org/sysadmin/en/latest/setup/secret-keys/" target="_blank"']
),
ts('Signing Key Recommended'),
\Psr\Log\LogLevel::NOTICE,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agh1 What do you think of NOTICE here?

@colemanw
Copy link
Member

Looks good!

@colemanw colemanw merged commit 84788a1 into civicrm:master Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants