By: Gauri Shirsath user 24 Feb 2016 at 3 a.m. CST

11 Responses
Gauri Shirsath gravatar
Hi, I have setup SAML integration of Salesforce.com with Gluu Server. But when I enter credentials I am not able to login into salesforce account. 07:04:35.583 - ERROR [edu.internet2.middleware.shibboleth.idp.profile.saml2.AbstractSAML2ProfileHandler:927] - Could not resolve a key encryption credential for peer entity: https://testiv.my.salesforce.com 07:04:35.584 - ERROR [edu.internet2.middleware.shibboleth.idp.profile.saml2.AbstractSAML2ProfileHandler:289] - Unable to construct encrypter org.opensaml.xml.security.SecurityException: Could not resolve key encryption credential at edu.internet2.middleware.shibboleth.idp.profile.saml2.AbstractSAML2ProfileHandler.getEncrypter(AbstractSAML2ProfileHandler.java:928) ~[shibboleth-identityprovider-2.4.4.jar:na] at edu.internet2.middleware.shibboleth.idp.profile.saml2.AbstractSAML2ProfileHandler.buildResponse(AbstractSAML2ProfileHandler.java:286) ~[shibboleth-identityprovider-2.4.4.jar:na]

By Mohib Zico Account Admin 24 Feb 2016 at 4:22 a.m. CST

Mohib Zico gravatar
Try to disable encryption for this trust relationship. You can disable it from relying party.

By Gauri Shirsath user 24 Feb 2016 at 4:31 a.m. CST

Gauri Shirsath gravatar
Encryption is disabled for this trust relationship. Here is my relying-party.xml <?xml version="1.0" encoding="UTF-8"?> <!-- This file is an EXAMPLE configuration file. This file specifies relying party dependent configurations for the IdP, for example, whether SAML assertions to a particular relying party should be signed. It also includes metadata provider and credential definitions used when answering requests to a relying party. --> <rp:RelyingPartyGroup xmlns:rp="urn:mace:shibboleth:2.0:relying-party" xmlns:saml="urn:mace:shibboleth:2.0:relying-party:saml" xmlns:metadata="urn:mace:shibboleth:2.0:metadata" xmlns:resource="urn:mace:shibboleth:2.0:resource" xmlns:security="urn:mace:shibboleth:2.0:security" xmlns:samlsec="urn:mace:shibboleth:2.0:security:saml" xmlns:samlmd="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mace:shibboleth:2.0:relying-party classpath:/schema/shibboleth-2.0-relying-party.xsd urn:mace:shibboleth:2.0:relying-party:saml classpath:/schema/shibboleth-2.0-relying-party-saml.xsd urn:mace:shibboleth:2.0:metadata classpath:/schema/shibboleth-2.0-metadata.xsd urn:mace:shibboleth:2.0:resource classpath:/schema/shibboleth-2.0-resource.xsd urn:mace:shibboleth:2.0:security classpath:/schema/shibboleth-2.0-security.xsd urn:mace:shibboleth:2.0:security:saml classpath:/schema/shibboleth-2.0-security-policy-saml.xsd urn:oasis:names:tc:SAML:2.0:metadata classpath:/schema/saml-schema-metadata-2.0.xsd"> <!-- ========================================== --> <!-- Relying Party Configurations --> <!-- ========================================== --> <rp:AnonymousRelyingParty provider="https://iv.gluu.com/idp/shibboleth" defaultSigningCredentialRef="IdPCredential" /> <rp:DefaultRelyingParty provider="https://iv.gluu.com/idp/shibboleth" defaultSigningCredentialRef="IdPCredential"> <!-- Each attribute in these profiles configuration is set to its default value, that is, the values that would be in effect if those attributes were not present. We list them here so that people are aware of them (since they seem reluctant to read the documentation). --> <rp:ProfileConfiguration xsi:type="saml:ShibbolethSSOProfile" includeAttributeStatement="false" assertionLifetime="PT5M" signResponses="conditional" signAssertions="never" /> <rp:ProfileConfiguration xsi:type="saml:SAML1AttributeQueryProfile" assertionLifetime="PT5M" signResponses="conditional" signAssertions="never" /> <rp:ProfileConfiguration xsi:type="saml:SAML1ArtifactResolutionProfile" signResponses="conditional" signAssertions="never" /> <rp:ProfileConfiguration xsi:type="saml:SAML2SSOProfile" includeAttributeStatement="true" assertionLifetime="PT5M" assertionProxyCount="0" signResponses="conditional" signAssertions="never" encryptAssertions="never" encryptNameIds="never" /> <rp:ProfileConfiguration xsi:type="saml:SAML2AttributeQueryProfile" assertionLifetime="PT5M" assertionProxyCount="0" signResponses="conditional" signAssertions="never" encryptAssertions="never" encryptNameIds="never" /> <rp:ProfileConfiguration xsi:type="saml:SAML2ArtifactResolutionProfile" signResponses="conditional" signAssertions="never" encryptAssertions="never" encryptNameIds="never"/> </rp:DefaultRelyingParty> <rp:RelyingParty id="FF9C5A56488BF6810002370BF166" provider="https://iv.gluu.com/idp/shibboleth" defaultAuthenticationMethod="urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified" defaultSigningCredentialRef="IdPCredential"> <rp:ProfileConfiguration xsi:type="saml:ShibbolethSSOProfile" /> <rp:ProfileConfiguration xsi:type="saml:SAML1AttributeQueryProfile" /> <rp:ProfileConfiguration xsi:type="saml:SAML2SSOProfile" /> <rp:ProfileConfiguration xsi:type="saml:SAML2AttributeQueryProfile" /> </rp:RelyingParty> <rp:RelyingParty id="$trustRelationship.entityId" provider="https://iv.gluu.com/idp/shibboleth" defaultAuthenticationMethod="urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified" defaultSigningCredentialRef="IdPCredential"> <rp:ProfileConfiguration xsi:type="saml:SAML2SSOProfile" includeAttributeStatement="true" assertionLifetime="300000" assertionProxyCount="0" signResponses="conditional" signAssertions="never" signRequests="conditional" encryptAssertions="never" encryptNameIds="never" /> </rp:RelyingParty> <!-- ========================================== --> <!-- Metadata Configuration --> <!-- ========================================== --> <!-- MetadataProvider the combining other MetadataProviders --> <metadata:MetadataProvider id="ShibbolethMetadata" xsi:type="metadata:ChainingMetadataProvider"> <!-- Load the IdP's own metadata. This is necessary for artifact support. --> <metadata:MetadataProvider id="IdPMD" xsi:type="metadata:ResourceBackedMetadataProvider"> <metadata:MetadataResource xsi:type="resource:FilesystemResource" file="/opt/idp/metadata/FF9C5A56488BF681000196328D10-idp-metadata.xml" /> </metadata:MetadataProvider> <metadata:MetadataProvider id="SiteSP1" xsi:type="metadata:FilesystemMetadataProvider" metadataFile="/opt/idp/metadata/FF9C5A56488BF6810002370BF16600060F7DB9B5-sp-metadata.xml" > </metadata:MetadataProvider> <metadata:MetadataProvider id="SiteSP2" xsi:type="metadata:FilesystemMetadataProvider" metadataFile="/opt/idp/metadata/FF9C5A56488BF6810002370BF1660006AC7D0A96-sp-metadata.xml" > </metadata:MetadataProvider> </metadata:MetadataProvider> <!-- ========================================== --> <!-- Security Configurations --> <!-- ========================================== --> <security:Credential id="IdPCredential" xsi:type="security:X509Filesystem"> <security:PrivateKey password="7MNMBDW6NAwI">/etc/certs/shibIDP.key</security:PrivateKey> <security:Certificate>/etc/certs/shibIDP.crt</security:Certificate> </security:Credential> <!-- DO NOT EDIT BELOW THIS POINT --> <!-- The following trust engines and rules control every aspect of security related to incoming messages. Trust engines evaluate various tokens (like digital signatures) for trust worthiness while the security policies establish a set of checks that an incoming message must pass in order to be considered secure. Naturally some of these checks require the validation of the tokens evaluated by the trust engines and so you'll see some rules that reference the declared trust engines. --> <security:TrustEngine id="shibboleth.SignatureTrustEngine" xsi:type="security:SignatureChaining"> <security:TrustEngine id="shibboleth.SignatureMetadataExplicitKeyTrustEngine" xsi:type="security:MetadataExplicitKeySignature" metadataProviderRef="ShibbolethMetadata" /> <security:TrustEngine id="shibboleth.SignatureMetadataPKIXTrustEngine" xsi:type="security:MetadataPKIXSignature" metadataProviderRef="ShibbolethMetadata" /> </security:TrustEngine> <security:TrustEngine id="shibboleth.CredentialTrustEngine" xsi:type="security:Chaining"> <security:TrustEngine id="shibboleth.CredentialMetadataExplictKeyTrustEngine" xsi:type="security:MetadataExplicitKey" metadataProviderRef="ShibbolethMetadata" /> <security:TrustEngine id="shibboleth.CredentialMetadataPKIXTrustEngine" xsi:type="security:MetadataPKIXX509Credential" metadataProviderRef="ShibbolethMetadata" /> </security:TrustEngine> <security:SecurityPolicy id="shibboleth.ShibbolethSSOSecurityPolicy" xsi:type="security:SecurityPolicyType"> <security:Rule xsi:type="samlsec:IssueInstant" required="false"/> <security:Rule xsi:type="samlsec:MandatoryIssuer"/> </security:SecurityPolicy> <security:SecurityPolicy id="shibboleth.SAML1AttributeQuerySecurityPolicy" xsi:type="security:SecurityPolicyType"> <security:Rule xsi:type="samlsec:Replay"/> <security:Rule xsi:type="samlsec:IssueInstant"/> <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" /> <security:Rule xsi:type="samlsec:MandatoryIssuer"/> <security:Rule xsi:type="security:MandatoryMessageAuthentication" /> </security:SecurityPolicy> <security:SecurityPolicy id="shibboleth.SAML1ArtifactResolutionSecurityPolicy" xsi:type="security:SecurityPolicyType"> <security:Rule xsi:type="samlsec:Replay"/> <security:Rule xsi:type="samlsec:IssueInstant"/> <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" /> <security:Rule xsi:type="samlsec:MandatoryIssuer"/> <security:Rule xsi:type="security:MandatoryMessageAuthentication" /> </security:SecurityPolicy> <security:SecurityPolicy id="shibboleth.SAML2SSOSecurityPolicy" xsi:type="security:SecurityPolicyType"> <security:Rule xsi:type="samlsec:Replay"/> <security:Rule xsi:type="samlsec:IssueInstant"/> <security:Rule xsi:type="samlsec:SAML2AuthnRequestsSigned"/> <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:MandatoryIssuer"/> </security:SecurityPolicy> <security:SecurityPolicy id="shibboleth.SAML2AttributeQuerySecurityPolicy" xsi:type="security:SecurityPolicyType"> <security:Rule xsi:type="samlsec:Replay"/> <security:Rule xsi:type="samlsec:IssueInstant"/> <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" /> <security:Rule xsi:type="samlsec:MandatoryIssuer"/> <security:Rule xsi:type="security:MandatoryMessageAuthentication" /> </security:SecurityPolicy> <security:SecurityPolicy id="shibboleth.SAML2ArtifactResolutionSecurityPolicy" xsi:type="security:SecurityPolicyType"> <security:Rule xsi:type="samlsec:Replay"/> <security:Rule xsi:type="samlsec:IssueInstant"/> <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" /> <security:Rule xsi:type="samlsec:MandatoryIssuer"/> <security:Rule xsi:type="security:MandatoryMessageAuthentication" /> </security:SecurityPolicy> <security:SecurityPolicy id="shibboleth.SAML2SLOSecurityPolicy" xsi:type="security:SecurityPolicyType"> <security:Rule xsi:type="samlsec:Replay"/> <security:Rule xsi:type="samlsec:IssueInstant"/> <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" /> <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" /> <security:Rule xsi:type="samlsec:MandatoryIssuer"/> <security:Rule xsi:type="security:MandatoryMessageAuthentication" /> </security:SecurityPolicy> </rp:RelyingPartyGroup>

By Mohib Zico Account Admin 24 Feb 2016 at 4:40 a.m. CST

Mohib Zico gravatar
>> Encryption is disabled for this trust relationship. Where? I don't see anything with salesforce.com...

By Gauri Shirsath user 24 Feb 2016 at 5:12 a.m. CST

Gauri Shirsath gravatar
I need to set like: <rp:ProfileConfiguration xsi:type="saml:SAML2SSOProfile" includeAttributeStatement="true" assertionLifetime="PT5M" assertionProxyCount="0" signResponses="conditional" signAssertions="never" encryptAssertions="never" encryptNameIds="never" /> Is it ok?

By Gauri Shirsath user 24 Feb 2016 at 10:33 p.m. CST

Gauri Shirsath gravatar
Hi Mohib, I am getting same error again.

By Mohib Zico Account Admin 25 Feb 2016 at 3:06 a.m. CST

Mohib Zico gravatar
I will make sure [this](https://www.gluu.org/docs/articles/salesforce-sso/) doc is updated. There shouldn't be any problem with this doc make SSO working with Salesforce.

By Gauri Shirsath user 25 Feb 2016 at 3:31 a.m. CST

Gauri Shirsath gravatar
Hi, My issue is solved now. But logout from gluu is not working. Is there any specific URL we need to specify?

By Mohib Zico Account Admin 28 Feb 2016 at 4:16 a.m. CST

Mohib Zico gravatar
>> Is there any specific URL we need to specify? https://<hostname_of_Gluu_server>/identity/authentication/finishlogout

By Gauri Shirsath user 29 Feb 2016 at 12:29 a.m. CST

Gauri Shirsath gravatar
After configuring logout URL, user not logging out from gluu..session is still there which allows user to login to gluu without any credentials...

By Mohib Zico Account Admin 29 Feb 2016 at 11:29 a.m. CST

Mohib Zico gravatar
Okay, let's try with SAML logout link then: `https://<hostname_of_Gluu_Server>/idp/logout.jsp`

By Gauri Shirsath user 29 Feb 2016 at 10:58 p.m. CST

Gauri Shirsath gravatar
https://<hostname_of_Gluu_Server>/idp/logout.jsp this URL is working..thank you