title: ADFS integration using Spring SAML -SP metadata vs IDP metadata?
body: <p>I implemented the Spring SAML sample application using ssocircle and it worked fine. Now I have been trying to implement it for the client's ADFS. Following is the configuration I think that is required, please correct me if I am wrong:</p>
  
  <ol>
  <li>Change the first parameter below, to the federationMetadata.xml url provided by client</li>
  </ol>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean class="org.opensaml.saml2.metadata.provider.HTTPMetadataProvider"&gt;
      &lt;constructor-arg&gt;
          &lt;value type="java.lang.String"&gt;http://idp.ssocircle.com/idp-meta.xml&lt;/value&gt;
      &lt;/constructor-arg&gt;
      &lt;constructor-arg&gt;
          &lt;value type="int"&gt;5000&lt;/value&gt;
      &lt;/constructor-arg&gt;
      &lt;property name="parserPool" ref="parserPool"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <ol start="2">
  <li>Replace the entity id of SP metadata below:</li>
  </ol>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean class="org.springframework.security.saml.metadata.MetadataGenerator"&gt;
      &lt;property name="entityId" value="replaceWithUniqueIdentifier"/&gt;
      &lt;property name="extendedMetadata"&gt;
          &lt;bean class="org.springframework.security.saml.metadata.ExtendedMetadata"&gt;
              &lt;property name="signMetadata" value="false"/&gt;
              &lt;property name="idpDiscoveryEnabled" value="true"/&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I haven't been able  to figure out the following:</p>
  
  <ul>
  <li>All I have received is a url to adfs/../federationMetadata.xml, who is supposed to create the SP metadata?</li>
  <li>Am I supposed to create SP metadata and provide to the client, to add it in adfs? Because, that's what I did using sample application. I added the generated metadata to ssocircle</li>
  <li>Is my understanding, that point 1 would be adfs url, and point 2 will be SP entity id,  correct?</li>
  </ul>
  
  <p>I would be grateful if you could clarify the above to me, also if possible, point me to straightforward tutorial that helps in integrating SAML with Spring security enabled application as I haven't been able to find the same.</p>
  
  <p>Many thanks </p>