-
Notifications
You must be signed in to change notification settings - Fork 5
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
Internal Server Error When Saving Service Provider and Identity Provider Config [shibboleth] #104
Comments
👋 @sgurnick , i think this is happening due to a bug in the core lib. A recent patch fixed this but it requires a reinstall of the plugin. Are you able to reinstall this? To fix this, follow these steps:
More on this patch here: flipboxfactory/saml-core@8656678 |
Let me know how this goes! |
Thank you very much for these instructions. It looks like that resolved the issue with configuring the Service Provider side. Since the SP metadata has changed following the plug-in re-install, I need to re-submit that to our IdP. Hearing back from them may take a day or two. When I receive confirmation they are using our new metadata, I'll try to configure the Identity Provider. I'll keep you posted. |
I received word from our IdP the new metadata is in place and I proceeded to configure the Identity Provider in the SAML SP plugin within craft. I followed the same steps as mentioned previously: For the Identity Provider config:
At this point, my Service Provider configuration is saved successfully, but I'm unable to save the Identity Provider configuration. It seems to not like the fact that there is no EntityID being sent along. But as I mentioned earlier, there doesn't appear to be a way to update the EntityID field when creating the Identity Provider config from within the web UI. Is there something else I should be doing? Thanks again for your help. |
Hello @sgurnick, That is odd that the IdP metadata doesn’t have an entity id. Haven’t seen an IdP without one before. Would you mind sending me the metadata? You can contact me via damien at flipboxdigital.com. I definitely don’t want to share it here and expose any of that info publicly. |
Hi @dsmrt, I sent you an email on 2021-03-30 with the IdP metadata. Please let me know if you need anything else to assist me with troubleshooting. Thank you much! |
Ok ... Just found it in spam! Responding now. |
Found the issue. Looks like the So that IdP metadata file looks like this: <?xml version="1.0" encoding="UTF-8"?>
<EntitiesDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
Name="urn:mace:shibboleth:testshib:two"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<md:EntityDescriptor
entityID="https://<host>/idp/shibboleth" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata">
...
</md:EntityDescriptor>
</EntitiesDescriptor> but the plugin is looking for something more inline like this: <?xml version="1.0" encoding="UTF-8"?>
<md:EntityDescriptor
entityID="https://<host>/idp/shibboleth" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata">
...
</md:EntityDescriptor> When I manually edit the file and remove the I'm marking this as a bug but I'm not really sure how I'd handle it yet. I played around with trying to fix it quickly but I ran into some issues. Notes for fixing Might have to parse the XML and extract the For example, this seems to work with this use case but needs to be tested more: new EntityDescriptor(
Utils::xpQuery(
DOMDocumentFactory::fromString($metadataString)->documentElement
,
'./saml_metadata:EntityDescriptor'
)[0]
); |
I am running Craft Pro 3.6.11.1 with SAML Service Provider plugin 2.6.6.
I am attempting to create the initial Service Provider and Identity Provider configurations. When I click the Save button for each, I get Internal Server error screens.
For the Service Provider config - steps to reproduce error:
web.log
file:Once I get to this error screen, I go back into the SAML SP plug-in using the URL
https://test-craft.library.ucla.edu/admin/saml-sp/metadata
.On the SAML Service Provider screen, I see the entry for the SP I just saved, and it's in an enabled state. When I click-on it, I see all fields are still populated and the metadata XML has been generated.
I submit the XML to my IdP.
My IdP sends me its metadata to provide to use in the New Identity Provider config.
For the Identity Provider config - steps to reproduce error:
web.log
file:Once I get to this error screen, I go back into the SAML SP plug-in using the URL
https://test-craft.library.ucla.edu/admin/saml-sp/metadata
.On the SAML Service Provider screen, there is no entry for the Identity Provider I just tried to save.
At this point my Service Provider config appears to be saved, but based on the error it's not clear if it is actually set-up correctly. And I'm unable to create an Identity Provider config.
I would appreciate assistance in determining next steps in troubleshooting.
Thank you for your help.
The text was updated successfully, but these errors were encountered: