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

removing SAML conf has residual error #1186

Open
revansx opened this issue Jun 5, 2019 · 4 comments · May be fixed by #1212
Open

removing SAML conf has residual error #1186

revansx opened this issue Jun 5, 2019 · 4 comments · May be fixed by #1212

Comments

@revansx
Copy link
Contributor

revansx commented Jun 5, 2019

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

  1. Performed a Fresh install of Meza on a new server
  2. Everything is verified to work well.
    --- landing page works
    --- demo wiki works)
  3. First customization activity was to edit the public.yml and secret.yml with the SAML configuration for my environment.
  4. Deploy fails because my organization has not yet set-up the remote SAML agent
  5. Reverted public.yml and secret.yml back to their non-SAML revision (No SAML)
  6. 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

@jamesmontalvo3
Copy link
Contributor

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 %}

@revansx
Copy link
Contributor Author

revansx commented Jun 6, 2019

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!

@revansx
Copy link
Contributor Author

revansx commented Jun 6, 2019

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"?

@revansx
Copy link
Contributor Author

revansx commented Jun 7, 2019

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.

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

Successfully merging a pull request may close this issue.

2 participants