-
Notifications
You must be signed in to change notification settings - Fork 27
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
Using basic auth credentials to access /dev/check still triggers the site login #92
Comments
This appears to be a mismatch in expectations, or that security has evolved over time and this module hasn't kept up. As with most layered routes in Silverstripe there is a parent controller that must be cleared first -
Though the power of YML you could define the There is an interesting debate to be had here about whether or not |
Yeah another place this component's in a weird place is during installation - because it's tagged testing somewhere, you get asked to install it as a dev dependency. But if you're using this for monitoring you definitely want it in prod. Thanks for the explanation as to why that workaround worked. |
To be completely clear - to avoid the workaround working based on luck* alone, the YML section header should contain a *ordering is otherwise undefined. ---
Name: devcheckfix
Before: coreroutes
---
SilverStripe\Control\Director:
rules:
'dev/check': 'Silverstripe\EnvironmentCheck\Controllers\DevCheckController' |
This has been fixed by #119 which will be included in the April minor release. |
Since 2.6, /health/check doesn't show full check results - /dev/check does, but requires authentication when in live mode - that was an intended change. https://github.com/silverstripe/silverstripe-environmentcheck#authentication discusses configuring HTTP Basic Auth for this as a way for automated monitoring to access /dev/check.
This doesn't seem to work however - on a fresh SS5 installation (and also in our SS4 installs) configuring the ENV variables and loading /dev/check still redirects the user to the login flow instead of serving a 401. After logging in and being redirected back to /dev/check, we get the 401 and http auth flow as expected.
Working on debugging this as I suspect it's to do with the bypass added in yaml to avoid the /dev/confirm redirect. Oddly, copying over the rule below from environmentcheck to my test site's mysite.yml means this starts working as expected - I can't see why this workaround works though.
Before:
After:
The text was updated successfully, but these errors were encountered: