meza
meza copied to clipboard
removing SAML conf has residual error
Environment
- RHEL7
- Meza 31.8.0
Issue summary
After removing SAML configuration from public and secret yml pages and performing a successful redeploy, landing page fails with residual SAML error.
Issue details
- Performed a Fresh install of Meza on a new server
- Everything is verified to work well. --- landing page works --- demo wiki works)
- First customization activity was to edit the public.yml and secret.yml with the SAML configuration for my environment.
- Deploy fails because my organization has not yet set-up the remote SAML agent
- Reverted public.yml and secret.yml back to their non-SAML revision (No SAML)
- Deploy is successful --- Demo Wiki works --- Landing page fails (Error 500)
Apache Error logs contains:
[Wed Jun 05 14:52:28.728999 2019] [php7:warn] [pid 3402] [client 127.0.0.1:40248] PHP Warning: require_once(/opt/htdocs/NonMediaWikiSimpleSamlAuth.php): failed to open stream: No such file or directory in /opt/htdocs/index.php on line 5
[Wed Jun 05 14:52:28.729080 2019] [php7:error] [pid 3402] [client 127.0.0.1:40248] PHP Fatal error: require_once(): Failed opening required '/opt/htdocs/NonMediaWikiSimpleSamlAuth.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/htdocs/index.php on line 5
I think removing /opt/.deploy-meza/SAMLConfig.php
should solve the problem in the short term. In the long term the following code needs to be changed in src/roles/htdocs
files files/BackupDownload/download.php
, files/BackupDownload/index.php
, and template/index.php
:
if ( is_file( '/opt/.deploy-meza/SAMLConfig.php' ) ) {
require_once __DIR__ . '/NonMediaWikiSimpleSamlAuth.php';
}
Should become:
{% if saml_public is defined %}
require_once __DIR__ . '/NonMediaWikiSimpleSamlAuth.php';
{% endif %}
I think i have provided the pull requests for the 3 files you mentioned. In the first two, I had to add the {% else %} part and include the else case. Let me know if this does the trick. Thank you!
Deploy runs fine. I removed SAMLConfig.php in .deploy-meza and that didn't fix it, but it did change the behavior from sending me to the SSO link to generating the following error:
Bad Request Your browser sent a request that this server could not understand. Additionally, a 400 Bad Request error was encountered while trying to use an ErrorDocument to handle the request.
..might I also need to remove "samlLocalSettings.php"?
My site works well now. Deleting the SAMLconfig.php file in .Deploy-Meza did the trick. The other issue I was having is unrelated to SAML.