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

SAML Authentication not working #13361

Open
1 task done
jakub-klik-it opened this issue Feb 13, 2024 · 19 comments · May be fixed by #13742
Open
1 task done

SAML Authentication not working #13361

jakub-klik-it opened this issue Feb 13, 2024 · 19 comments · May be fixed by #13742
Labels
bug Issues or PR's relating to bugs configuration Anything related to the Mautic configuration section essential This must be done to close the milestone good first issue ready-to-test PR's that are ready to test regression A bug that broke something in the last release T2 Medium difficulty to fix (issue) or test (PR)
Milestone

Comments

@jakub-klik-it
Copy link

jakub-klik-it commented Feb 13, 2024

Mautic Version

5.0.x series

Way of installing

I downloaded a release from https://www.mautic.org/mautic-releases

PHP version

8.1

What browsers are you seeing the problem on?

Not relevant

What happened?

SAML authentication not working, on release version 5.0.3.

Tested on multiple machines.

How can we reproduce this issue?

Step 1: Download from https://github.com/mautic/mautic/releases/download/5.0.3/5.0.3.zip
Step 2: Run composer require symfony/amazon-mailer
Step 3: Install via web interface
Step 4: Set SAML authentication on web interface
Step 5: Error 500, can not login.

Relevant log output

php.CRITICAL: Uncaught Error: LightSaml\SpBundle\Controller\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed {"exception":"[object] (ArgumentCountError(code: 0): LightSaml\\SpBundle\\Controller\\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed at /var/www/html/vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php:29)"} {"hostname":"xxx","pid":46}

Code of Conduct

  • I confirm that I have read and agree to follow this project's Code of Conduct




Care about this issue? Want to get it resolved sooner? If you are a member of Mautic, you can add some funds to the Bounties Project so that the person who completes this task can claim those funds once it is merged by a member of the core team! Read the docs here.

@jakub-klik-it jakub-klik-it added bug Issues or PR's relating to bugs needs-triage For new issues/PRs that need to be triaged labels Feb 13, 2024
@Ajtak
Copy link

Ajtak commented Feb 14, 2024

Not working too, but without composer require symfony/amazon-mailer.
I'm getting same error message

@tfmm
Copy link

tfmm commented Mar 3, 2024

Any updates to this isssue?

@sertys3
Copy link

sertys3 commented Mar 4, 2024

I can confirm this does not work with me as well.
Running mautic-docker on 5.0.3.
Downgrading to 4.4.9 works as expected.
It is unfortunate that the community is being driven to 5.x without core features covered.

@aki263
Copy link

aki263 commented Mar 21, 2024

+1 SAML is not working.

Error:

[2024-03-21T22:17:01.775952+00:00] mautic.CRITICAL: Uncaught PHP Exception ArgumentCountError: "LightSaml\SpBundle\Controller\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed" at /var/www/mautic/vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php line 29 {"exception":"[object] (ArgumentCountError(code: 0): LightSaml\\SpBundle\\Controller\\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed at /var/www/mautic/vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php:29)"} {"hostname":"ip-10-0-2-135","pid":16264}

@stefanomarty
Copy link

+1 SAML is not working

[2024-03-26T08:37:26.830272+00:00] mautic.CRITICAL: Uncaught PHP Exception ArgumentCountError: 
"LightSaml\SpBundle\Controller\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed" at 
.../vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php line 29 
{"exception":"[object] (ArgumentCountError(code: 0): LightSaml\\SpBundle\\Controller\\DefaultController::__construct(): 
Argument #1 ($metadataProfileBuilder) not passed at 
.../vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php:29)"} {"hostname":"...","pid":3724925}

As a side effect, users are redirected to:
https:// mautic.your.domain /s/saml/login
where they receive a 500 Internal Server Error

Link to the standard (non SAML) login is:
https:// mautic.your.domain /s/login

@dusatvoj
Copy link

@RCheesley you told @ #12304 (comment) that you are focused to mautic 5.x but it's as buggy as 4.4.x series 🤔

@stefanomarty
Copy link

@RCheesley you told @ #12304 (comment) that you are focused to mautic 5.x but it's as buggy as 4.4.x series 🤔

While I have great respect for the efforts made to bring us mautic 5.x, I can't hide that I'm very scared of all those red bug icons on the first page of issues here...

@kingfisher77
Copy link

+1 SAML does not work
I use SAML-based login with Entra (Azure AD). "Test this application" in Entra works! But not when browsing directly to site_url. Redirect to s/saml/login gets the 500 code, error messages appear in the logs as posted above.

@RCheesley RCheesley added T2 Medium difficulty to fix (issue) or test (PR) regression A bug that broke something in the last release configuration Anything related to the Mautic configuration section good first issue and removed needs-triage For new issues/PRs that need to be triaged labels Apr 4, 2024
@RCheesley RCheesley added the essential This must be done to close the milestone label Apr 29, 2024
@RCheesley RCheesley added this to the 5.1.0 milestone Apr 29, 2024
@uadf
Copy link

uadf commented May 2, 2024

I'm impatiently waiting for SAML to work...

@RCheesley
Copy link
Sponsor Member

We do know that it's frustrating, and we're holding up the 5.1 release to ensure that this is fixed. We just haven't got anyone who is able to work on this yet.

@stefanomarty
Copy link

While at it pls consider adding OIDC.

@RCheesley
Copy link
Sponsor Member

While at it pls consider adding OIDC.

It's not on the plans right now, but if it's something you're interested in please do feel free to add some funds to the bounty pot which would mean we could fund a developer to work on it (see the info in the original post).

@RCheesley
Copy link
Sponsor Member

Hi folks! Thanks to @mollux we have a fix for this issue. Please can you review, test and report back on this PR: #13742

General instructions for testing: https://mau.tc/tester but please check the instructions in the PR for specific instructions (please especially do the bit about leaving your review!)

Thanks all!

@escopecz escopecz added the ready-to-test PR's that are ready to test label May 13, 2024
@escopecz
Copy link
Sponsor Member

Hey everyone, please test #13742 if you want to get this fixed in Mautic 5.1.0. Otherwise I'll release it without it.

@stefanomarty
Copy link

Hi @escopecz, thanks for handling this issue, when is the deadline for version 5.1.0? I'm too busy today and tomorrow, I think I can try it on Wednesday. If it's too late, it doesn't matter, we will publish it in the next version :-)

@escopecz
Copy link
Sponsor Member

Wednesday is OK. Thank you!

@javiervalerocelada
Copy link

javiervalerocelada commented May 20, 2024

Hi, i applaied two changes in my files:

But i follow getting error in DefaultController line 29:
mautic.CRITICAL: Uncaught PHP Exception ArgumentCountError: "LightSaml\SpBundle\Controller\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed" at /var/www/html/mautic/vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php line 29 {"exception":"[object] (ArgumentCountError(code: 0): LightSaml\SpBundle\Controller\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed at /var/www/html/mautic/vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php:29)"} {"hostname":"ironman","pid":1162}

@escopecz
Copy link
Sponsor Member

@javiervalerocelada it's not only about updating files. The problem isn't in Mautic itself but in another library that Mautic depends on. Dependencies are handled with Composer. In order to update the dependencies you must let Composer do it's thing. #13742 is there only to showcase how to test it. It won't be merged. But look at step 1 in the steps to test.

@stefanomarty
Copy link

Wednesday is OK. Thank you!

I tried to test the #13742 PR as per your instructions, but unfortunately I couldn't get past the first login screen. I'm not very familiar with Gitpod so I'm probably missing something here, but after configuring it and arriving at the Mautic login screen, when I try to login with admin/mautic I get this message:
Your password is too weak. Please reset it.

After following the reset procedure I see this new message:
A new password has been generated and will be emailed to you, if this user exists. If you do not receive it within a few minutes, check your spam box and/or contact the system administrator.

I thought I'd get the email on the GitHub user, but nothing gets there. No spam either. Sorry I have no idea how the admin email is configured in that Gipod istance and where the new password is sent. I'll try again in the weekend on a local server but it'll take a little bit more to setup the test enviroment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs configuration Anything related to the Mautic configuration section essential This must be done to close the milestone good first issue ready-to-test PR's that are ready to test regression A bug that broke something in the last release T2 Medium difficulty to fix (issue) or test (PR)
Projects
Status: 🏗️ In Progress
Development

Successfully merging a pull request may close this issue.