title: JAVA service provider SAML2 request - disable digital signature
body: <p>I'm trying to integrate a Java SP (service provider) with an existing IDP (.net)
  My problem is that my service provider is sending the request with &lt; SignedInfo> which I don't need.</p>
  
  <p>Is there a way to enable/disable this on demand?</p>
  
  <p>(I'm using spring-security-saml2-core and providing the IDP provider using xml)</p>
  
  <p>What I need is something like this:</p>
  
  <pre><code>&lt;samlp:AuthnRequest ID="_66a1c753-1636-4fbc-8f5d-313b19579558"
                  Version="2.0"
                  IssueInstant="2018-11-07T22:48:54.286Z"
                  Destination="http://localhost:44101/SAML/SSOService"
                  ForceAuthn="false"
                  IsPassive="false"
                  ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
                  AssertionConsumerServiceURL="http://localhost:30941/SAML/AssertionConsumerService"
                  xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"&gt;&lt;saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"&gt;urn:componentspace:My-Localhost&lt;/saml:Issuer&gt;
  </code></pre>
  
  <p></p>
  
  <p>but my java client is sending:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"                AssertionConsumerServiceURL="http://localhost:8080/saml/SSO"
                   Destination="http://localhost:44101/SAML/SSOService"
                   ForceAuthn="false"
                   ID="a4065059de35d17j11h270ai65i44hj"
                   IsPassive="false"
                   IssueInstant="2018-11-08T17:01:16.853Z"
                   ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
                   Version="2.0"&gt; &lt;saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"&gt;localhost-demo&lt;/saml2:Issuer&gt; &lt;ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"&gt;
  &lt;ds:SignedInfo&gt;
    &lt;ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;
    &lt;ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /&gt;
    &lt;ds:Reference URI="#a4065059de35d17j11h270ai65i44hj"&gt;
      &lt;ds:Transforms&gt;
        &lt;ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /&gt;
        &lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;&lt;/ds:Transforms&gt;
      &lt;ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /&gt;
      &lt;ds:DigestValue&gt;RBuhWuT4+my+G95BEKpRam2l/qs=&lt;/ds:DigestValue&gt;
    &lt;/ds:Reference&gt;
  &lt;/ds:SignedInfo&gt;
  &lt;ds:SignatureValue&gt;NNy2s52kGCuQQADw7RdCAmAO4chm7BDjW0EJfdyvsgtdygdyrgyhdPNPv9LX2N+XT+syOqUm2VAOlMntBm/BpDkiAi3exIXR/lwph04ehKL6x5WladLCzEaRLOBE0LrFw+WdYOULZp+MRmMN8SsW8XOc5ItVdfhDHBbnUurthi3V7Uq/Q6lfzU9QlxywfMJirWHg==&lt;/ds:SignatureValue&gt;   &lt; ds:KeyInfo&gt;
    &lt;ds:X509Data&gt;
      &lt;ds:X509Certificate&gt;MIIC+zCCAeOgAwIBAgIJdfsdgfsdartesgtrygerytoa+K66EA4u7DpE oHJBlqH0AVWAd8q9488DpCo1x4ujTGw7AHE=&lt;/ds:X509Certificate&gt;
    &lt;/ds:X509Data&gt;
  &lt;/ds:KeyInfo&gt;  &lt;/ds:Signature&gt;
  </code></pre>
  
  <p></p>