By: Brett Cave Account Admin 14 Jun 2017 at 10:49 a.m. CDT

10 Responses
Brett Cave gravatar
Am opening a new ticket from conversion on https://support.gluu.org/single-sign-on/4212/unable-to-set-up-testshiborg-sp-with-gluu-idp/ - this is for setting up our own SP to use Gluu's shib IDP to authenticate. This is happening in an SP-initiated flow. The SP is configured with IDP metadata, including a signing and encryption cert. The "signing" cert is the default signing cert, which is also found in `/etc/certs/idp-signing.crt`. However, the Gluu JSON config references `/etc/certs/shibIDP.crt` under the `idpSecurityCert` key. `/opt/shibboleth-idp/conf/idp.properties` references idp-signing.crt. We have tried using both the idp-signing and shibIDP certs in IDP metadata provided to the SP and both fail. These logs are found in `idp-process.log`. 2017-06-14 15:35:43,563 - WARN [net.shibboleth.idp.profile.impl.WebFlowMessageHandlerAdaptor:182] - Profile Action WebFlowMessageHandlerAdaptor: Exception handling message org.opensaml.messaging.handler.MessageHandlerException: Validation of protocol message signature failed at org.opensaml.saml.common.binding.security.impl.SAMLProtocolMessageXMLSignatureSecurityHandler.doEvaluate(SAMLProtocolMessageXMLSignatureSecurityHandler.java:145) 2017-06-14 15:35:43,564 - WARN [org.opensaml.profile.action.impl.LogEvent:76] - An error event occurred while processing the request: MessageAuthenticationError I can decode the SAMLRequest (AuthnRequest) that is posted to Gluu (POST Binding on SingleSignOnService) if that helps. The authnrequest doesn't contain a certificate, it contains signature value, rsakey modulus and exponent.

By Mohib Zico staff 14 Jun 2017 at 10:53 a.m. CDT

Mohib Zico gravatar
Brett, Thanks for opening a new ticket. So, it's all about Certificate, I am sure. BTW, do you get login screen of your Gluu Server after you initiate the SSO flow from SP?

By Brett Cave Account Admin 14 Jun 2017 at 11:01 a.m. CDT

Brett Cave gravatar
regardless of whether logged into Gluu or not, we only get this after post to Gluu ![screengrab](https://i.gyazo.com/5cf96f6a0514d80d13c026a83a8dd6f1.png "enter image title here")

By Brett Cave Account Admin 14 Jun 2017 at 11:06 a.m. CDT

Brett Cave gravatar
I updated the idp-metadata and references to files from idp.properties to reference the shibIDP.crt file / contents. I still get the same error.

By Mohib Zico staff 14 Jun 2017 at 11:07 a.m. CDT

Mohib Zico gravatar
Alright. Let's try to configure Relying Party ( SAML2SSO ) for this trust in your Gluu Server. I am attaching a screenshot of SAML2SSO profile values as well.

By Mohib Zico staff 14 Jun 2017 at 11:11 a.m. CDT

Mohib Zico gravatar
>> I updated the idp-metadata and references to files from idp.properties to reference the shibIDP.crt file / contents. I still get the same error. I am exactly not sure where this 'idp.properties' file is, but please don't modify any configuration in Gluu Server; it might make things worse.

By Brett Cave Account Admin 14 Jun 2017 at 11:16 a.m. CDT

Brett Cave gravatar
I disabled the `conditional` for `encryptAssertions` that was previously checked. Am getting the same error after IDP reloaded the updated config. Am not sure if posting the decoded AuthnRequest would help? ``` <?xml version="1.0" encoding="UTF-8"?> <saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="REDACTED-shows-sso-signonURL" Destination="https://my-idp/idp/profile/SAML2/POST/SSO" ForceAuthn="false" ID="_e23c37e4a0606823f004b051e871cbb" IsPassive="false" IssueInstant="2017-06-14T13:26:22.966Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" ProviderName="pac4j-saml" Version="2.0"> <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">urn:advisorpro</saml2:Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference URI="#_e23c37e4a0606823f004b051e871cbb"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue>REDACTED</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>REDACTED</ds:SignatureValue> <ds:KeyInfo> <ds:KeyValue> <ds:RSAKeyValue> <ds:Modulus>REDACTED</ds:Modulus> <ds:Exponent>REDACTED</ds:Exponent> </ds:RSAKeyValue> </ds:KeyValue> </ds:KeyInfo> </ds:Signature> </saml2p:AuthnRequest> ```

By Brett Cave Account Admin 14 Jun 2017 at 11:19 a.m. CDT

Brett Cave gravatar
Properties are set in `/opt/shibboleth-idp/conf/idp.properties` - this file is parsed by Jetty during start up to set jvm properties that shibboleth IDP uses. I changed the value of `idp.signing.key` and `idp.signing.cert` from `idp-signing` to `shibIDP`. I can revert these 2 config changes back and restart the IDP service if need be.

By Mohib Zico staff 14 Jun 2017 at 11:22 a.m. CDT

Mohib Zico gravatar
Yes, please don't change anything in Gluu Server. Let's keep them as they are ( other than metadata-provider.xml.vm ). I think I'll share a video tutorial with you where we will configure a Shibboleth SP instance and connect that with Gluu Server, it might be helpful.

By Brett Cave Account Admin 14 Jun 2017 at 1:02 p.m. CDT

Brett Cave gravatar
Ok - so to rule out unknowns, I installed shib SP and am able to test the SAML flow with the Gluu installation and ensure I am working with the correct keys and certificates in the right places. https://gluu.org/docs/ce/integration/saml-sp/ was a great help to get this up relatively quickly. We'll work through our webapp's SP implementation, I suspect there might be issues with it, even though we were using the correct metadata earlier. Many thanks for your patience and assistance so far.

By Mohib Zico staff 14 Jun 2017 at 1:04 p.m. CDT

Mohib Zico gravatar
Very nice!!!