PAC4J - SAML Message - problem defining digest and signature methods

58 views
Skip to first unread message

Filipe Matos

unread,
Aug 28, 2015, 5:54:10 AM8/28/15
to pac4j-users
Hi,

I'm using pac4j to communicate with a SAML IDP. In the idp metadata file I've defined the digest and signing method to SHA1:


<EntityDescriptor entityID="https://preprod.auth.ev.pt/Default.aspx">
        
        <Extensions>
        <mdalg:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
          <mdalg:SigningMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> 
        </Extensions>
         ...

But the SAML request message is created with different digest and signing methods..


<?xml version="1.0" encoding="UTF-8"?>
<saml2p:AuthnRequest
Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified" Destination="https://preprod.auth.ev.pt/Default.aspx"
ForceAuthn="false" 
        ID="_1ofkkjdbxppvvhnpcjusxx7oizjjhxxypozmkpe"
IsPassive="false" IssueInstant="2015-08-28T09:25:53.320Z"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
ProviderName="Generic Portal - Tests" Version="2.0"
xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
      <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">http://tests.lan</saml:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"
<ds:SignatureMethod
<ds:Reference URI="#_1ofkkjdbxppvvhnpcjusxx7oizjjhwpypozmkpe"
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> .......
</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
......
</ds:SignatureValue>

Could u guys tell me what I'm doing wrong?

Best regards,
Filipe Matos

Reply all
Reply to author
Forward
0 new messages