-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Status Check - Raise severity of the check for signing keys #25285
Conversation
(Standard links)
|
@@ -213,8 +213,8 @@ public function checkSigningKey(): array { | |||
ts('Some components and extensions may need to generate cryptographic signatures. Please configure <a %1>CIVICRM_SIGN_KEYS</a>. ', | |||
[1 => 'href="https://docs.civicrm.org/sysadmin/en/latest/setup/secret-keys/" target="_blank"'] | |||
), | |||
ts('Signing Key Recommended'), | |||
\Psr\Log\LogLevel::NOTICE, | |||
ts('Signing Key Strongly Recommended'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts('Signing Key Strongly Recommended'), | |
ts('Signing Key Missing'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside: Trimming those titles ("Database Upgrade Required", "Debug Mode Enabled", "Signing Key Recommended", "PHP") would probably make it cleaner/easier to read/easier to compose. It would be harder to google on on the message-title, but then I think people would google for the text instead...
@totten the docs are rather long and complex, here's an addition to offer admins a quick fix for the error: https://lab.civicrm.org/documentation/docs/sysadmin/-/merge_requests/345 |
Is it a known short list of features that require this key? Can it look up if you have those features enabled and then make it an ERROR and say "Signing key required", otherwise not even display the check if you don't have those features enabled? Some of the awkwardness here I think is because it's not clear whether you need the key or not, and so trying to come up with wording that is short and strong but has wiggle room is difficult. |
I agree with @demeritcowboy - why not move the status check into the AuthX extension itself, and make it an error not a warning. |
Circumstantially, yes. Design-wise, no. For example, within
That's 3 things which transitively depend on the However, in my mind, the arrangement is part of balancing act:
The current middle-ground is to define a few reusable keys ( I think it's important to have some intentional design like that. (Of course, that doesn't mean the current middle-ground is perfect or permanent.) But I wouldn't want to change it just to make an obscure status-check look nicer. (The message doesn't show up on new sites; and as soon as you fix it, it goes away forever.)
Overall complexity... Right now, it doesn't matter who (exactly) uses the For the enhanced messaging ("You need ABC for X+Y+Z"), then that requires thinking about the dependency-graph (ie more complexity). |
Ok then I'd suggest either warning or even error, but mainly remove any vagueness from the wording, so: Signing key required |
e65d877
to
1a1cccc
Compare
I'm good with this version. |
Overview
The
CIVICRM_SIGN_KEYS
was introduced as an optional feature. It's becoming important as more components (likeafform
) rely on JWTs.Before
If
CIVICRM_SIGN_KEYS
is missing, then it gives aNOTICE
.After
If
CIVICRM_SIGN_KEYS
is missing, then it givesaanWARNING
ERROR
.