<div dir="ltr">So I've started trying to implement external authentication for the IdP.<div><br></div><div>So far I've:</div><div><ul><li>Created a class that implements LoginHandler</li><li>Ensured my class sets the PRINCIPAL_NAME_KEY & AUTHENTICATION_METHOD_KEY attributes on the request</li>
<li>Ensure I call AuthenticationEngine.returnToAuthenticationEngine as the last thing in processing</li><li>Added my handler to handler.xml</li><li>Packaged my Impl in a jar and added to the idp.war</li><li>Update the web.xml in idp.war to register my servlet and bind to a URL and updated idp.war</li>
</ul><div><br></div></div><div>After doing all that, I of course got a Tomcat error stating my class couldn't be cast as a Servlet (my bad - the docs say Filter, Servlet or JSP page).</div><div><br></div><div>Looking at Remote User as my baseline, I now see:</div>
<div><ul><li>RemoteUserAuthServlet</li><li>RemoteUserLoginHandler</li><li>RemoteUserLoginHandlerBeanDefinitionParser</li><li>RemoteUserLoginHandlerFactoryBean</li></ul><div>I'm just wondering if every Login Handler impl needs all of these as a hazard of using Spring, or if I'm over complicating things. </div>
</div><div><br></div><div>If the answer is yes, what else do I need that I'm missing? Spring XML config file?</div><div><br></div><div>If it matters....</div><div><br></div><div>HANDLER.XML</div><div><div> <ph:LoginHandler xsi:type="ph:ExternalAuthn" </div>
<div> externalAuthnPath="/authn/external/SHSession"</div><div> supportsForcedAuthentication="false"</div><div> supportsPassiveAuthentication="false" </div>
<div> authenticationDuration="30"></div><div> <ph:AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</ph:AuthenticationMethod></div>
<div> <!-- <ph:QueryParam name="foo" value="bar" /> --></div><div> </ph:LoginHandler></div></div><div><br></div><div><br></div><div>WEB.XML</div><div><div> <servlet></div>
<div> <servlet-name>SHSessionKeyLoginHandler</servlet-name></div><div> <servlet-class></div><div> com.example.sso.saml.shibboleth.idp.authn.provider.SHSessionKeyLoginHandler</div>
<div> </servlet-class></div><div> <load-on-startup>4</load-on-startup></div><div> </servlet></div><div><br></div><div> <servlet-mapping></div><div> <servlet-name>SHSessionKeyLoginHandler</servlet-name></div>
<div> <url-pattern>/authn/external/SHSession</url-pattern></div><div> </servlet-mapping></div></div><div><br></div></div>