[IDP] ExternalAuthentication implementation
Robert Gründler
robert at dubture.com
Thu Oct 29 09:58:14 EDT 2015
> On 29 Oct 2015, at 14:48, Cantor, Scott <cantor.2 at osu.edu> wrote:
>
> On 10/29/15, 9:00 AM, "users on behalf of Robert Gründler" <users-bounces at shibboleth.net on behalf of robert at dubture.com> wrote:
>
>
>
>> However, when i call ExternalAuthentication.startExternalAuthentication(httpRequest); the
>> doStart() of the ExternalAuthentication class throws an not implemented exception.
>
> That's all it said? I'm going to need more information than that. A stack trace if nothing else.
Here’s the stack trace:
net.shibboleth.idp.authn.ExternalAuthenticationException: Not implemented
at net.shibboleth.idp.authn.ExternalAuthentication.doStart(ExternalAuthentication.java:194)
at net.shibboleth.idp.authn.ExternalAuthentication.startExternalAuthentication(ExternalAuthentication.java:135)
at com.example.saml.ExternalAuthFilter.doFilter(ExternalAuthFilter.java:43)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)
I’m using 3.2.0-SNAPSHOT of the idp-authn-api library.
My filter code looks like this (note that this is just throw-away code, solely for testing purposes):
try {
ExternalAuthentication auth = new ExternalAuthentication();
((HttpServletRequest) request).getSession().setAttribute(ExternalAuthentication.CONVERSATION_KEY + request.getParameter(ExternalAuthentication.CONVERSATION_KEY), auth);
String key = ExternalAuthentication.startExternalAuthentication((HttpServletRequest) request);
request.setAttribute(ExternalAuthentication.PRINCIPAL_NAME_KEY, "foobar");
ExternalAuthentication.finishExternalAuthentication(key, (HttpServletRequest) request, (HttpServletResponse) response);
} catch (ExternalAuthenticationException e) {
LOG.debug(e.getMessage(), e);
e.printStackTrace();
}
Is the idea to subclass ExternalAuthentication and provide implementations for the parts that throw an ExternalAuthenticationException("Not implemented”)?
If you look at the source of net.shibboleth.idp.authn.ExternalAuthentication, you will see that the 3 methods at the
bottom are not implemented and throw the above mentioned exception.
But that’s the actual code that is called by the example in the documentation.
regards
-robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://shibboleth.net/pipermail/users/attachments/20151029/e5108b3d/attachment-0001.sig>
More information about the users
mailing list