[keycloak-user] Logout using URL broken in keycloak 1.9.1?
Stian Thorgersen
sthorger at redhat.com
Fri Apr 8 00:58:34 EDT 2016
The tokens endpoint was deprecated a while back and eventually removed in
1.9. Looks like one url has been missed in the documentation (I created
https://issues.jboss.org/browse/KEYCLOAK-2774 to update docs and it will be
fixed for 1.9.2).
Replace:
http://keycloak.dnbcloud.com:8090/auth/realms/indicee/tokens/logout?redirect_uri=http://localhost.dnbcloud.com:8080
With:
http://keycloak.dnbcloud.com:8090/auth/realms/indicee/protocol/openid-connect/logout?redirect_uri=http://localhost.dnbcloud.com:8080
On 8 April 2016 at 02:40, Jesse Chahal <jessec at dnbcloud.com> wrote:
> Hi,
>
> So our company recently upgraded from keycloak 1.5.1 to 1.9.1 We
> destroyed the database as we are still evaluating keycloak for the
> time being. We are noticing some issues with logout not working
> anymore after this upgrade. Currently we have implemented logout using
> URL approach as such:
>
> http://auth-server/auth/realms/{realm-name}/tokens/logout?redirect_uri=encodedRedirectUri
> which can be found here:
>
> http://keycloak.github.io/docs/userguide/keycloak-server/html/ch08.html#d4e1383
>
> We have setup the correct 'Valid Redirect URIs' for the client we are
> logging out from. Our client is using the openid-connect protocol and
> confidential access.
> What we are seeing is keycloak providing us with a blank page and the
> session not being destroyed. Our application is built ontop of
> Wildfly10 but we were not able to easily implement
> HttpServletRequest.logout() way of logging out as when a user logs in
> we translate the keycloak principle/user to be a our own
> principle/user type. I did not see a bug in Jira for this yet (was
> looking at release version 1.9.2) and am having a hard time believing
> nobody else has encountered this issue.
>
> I have attached the stacktrace that keycloak is spitting out below. To
> me it appears as if this feature was removed while the documentation
> still shows it as available.
>
>
> 00:05:46,037 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default
> task-78) RESTEASY002010: Failed to execute:
> javax.ws.rs.NotFoundException: RESTEASY003210: Could not find resource
> for full path:
> http://keycloak.dnbcloud.com:8090/auth/realms/indicee/tokens/logout?redirect_uri=http://localhost.dnbcloud.com:8080
> at org.jboss.resteasy.core.registry.SegmentNode.match(SegmentNode.java:114)
> at org.jboss.resteasy.core.registry.RootNode.match(RootNode.java:43)
> at
> org.jboss.resteasy.core.LocatorRegistry.getResourceInvoker(LocatorRegistry.java:79)
> at
> org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:129)
> at
> org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:101)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
> at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
> at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
> at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
> at
> org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:78)
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
> at
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
> at
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at
> org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
> at
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at
> io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at
> io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
>
> Thanks,
> Jesse
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160408/0be04a6b/attachment.html
More information about the keycloak-user
mailing list