-
Notifications
You must be signed in to change notification settings - Fork 137
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
Can not view or download Service Provider Metadata #842
Comments
I can confirm this error. My SAML2 authentication was working before the upgrade to Moodle 4.4 and new version of this plugin. |
@TimEberhardt please test the new MOODLE_404_STABLE branch here in github which should fix this. |
Hi @danmarsden EDIT: tried again with fresh pull, but no change |
@TimEberhardt if you're getting a 404 when trying to download the metadata - can you try hitting the "regenerate certificate" button on the auth_saml2 settings page? - does that generate an error or does it fix the 404 you get when trying to download the cert? I wonder if you have accidentaly deleted the cert in the moodledata folder during your upgrade? |
@danmarsden No, the correct (external requested and signed) certificate is in the right location. As a test I just let moodle generate a new one, which is working as expected. In the same data/saml2/ folder the xml file is also updated with the correct certificate information. But when I want to view or download the metadata (or want to login using SSO) I get the same error described by @DaS-hpolbb . If I edit the auth/saml2/locallib.php (lines 161 and 166) and manually set the description and nameFormat to any value, I can get the metadata. The script fails to get description and NameFormat values. |
I just re tested everything (now on moodle version 4.4.5+ build 20250117 with saml2 on freshly updated MOODLE_404_STABLE branch) but the error is the same. I tested to recreate certificate (replacing my original certified one), updated IDP metadata, tried various test IDPs (completely replacing our real IDP), reset various settings back to default again... No luck!
And if I remove line 161-164 from locallib.php (description attr) just for testing, it complains about the NameFormat value:
If I remove the line of code which tries to get this NameFormat attribute from locallib.php too, then I can get my SP metadata, but with theses values missing. No clue what's wrong there. |
What happened?
Our Moodle Version is 4.4.3
SAML2 auth_saml2 version 2024071101
When trying to display the service provider metadata (View Service Provider Metadata) we get the following error:
ERROR: authsources['moodle.example.de']: Could not retrieve the required option 'description'.
Please provide as many of the following as applies:
NGINX error.log
The attempt to download the service provider metadata also ends in an error:
https://moodle.example.com/auth/saml2/sp/metadata.php?download=1
HTTP ERROR 404 > ERR_INVALID_RESPONSE
What you expected:
That we can see the service provider metadata.
The text was updated successfully, but these errors were encountered: