Hi Bill,
Got it. Thanks. It is working with both ³public² and ³confidential².
Regards,
Vivek
On 7/28/14, 2:49 PM, "Bill Burke" <bburke(a)redhat.com> wrote:
It has to match (public or confidential) with whatever you
configured
the application to be in the admin console
On 7/28/2014 2:17 PM, Vivek Srivastav (vivsriva) wrote:
> After changing the access_type to ³public" from "confidential", the
> error went away.
>
> From: Vivek Srivastav <vivsriva(a)cisco.com <mailto:vivsriva@cisco.com>>
> Date: Monday, July 28, 2014 at 10:45 AM
> To: "keycloak-dev(a)lists.jboss.org
<mailto:keycloak-dev@lists.jboss.org>"
> <keycloak-dev(a)lists.jboss.org <mailto:keycloak-dev@lists.jboss.org>>
> Subject: [keycloak-dev] Error while logging in through the demo
>application
>
>
> Hi,
> I am getting error while logging into to access customer-list in the
> demo application. Is there a problem in my configuration, or is there a
> fix/workaround available.
>
> *Environment:*
> keycloak appliance 1.0-beta-3.
>
> *Settings:*
> Using the default datastore.
> Configured the customer-app and product-app as per the instructions and
> deployed in the keyclock server.
>
> *Steps/Actions:*
>
> Apps: unconfigured-demo apps built and deployed using maven.
> When logging into keycloak I am getting ³Forbidden²
>
>
> JBWEB000065: HTTP Status 403 -
>
> ------------------------------------------------------------------------
>
> *JBWEB000309: type* JBWEB000067: Status report
>
> *JBWEB000068: message*__
>
> *JBWEB000069: description* _JBWEB000123: Access to the specified
> resource has been forbidden._
>
> ------------------------------------------------------------------------
>
>
> JBoss Web/7.2.2.Final-redhat-1
>
>
> Following is the error I get on the keycloak console:
>
> 10:29:45,968 ERROR [io.undertow.request] (default task-45) UT005023:
> Exception handling request to /auth/realms/demo/tokens/access/codes:
> java.lang.RuntimeException: request path:
> /auth/realms/demo/tokens/access/codes
>
> at
>
>org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(Keycl
>oakSessionServletFilter.java:56)
> [keycloak-services-1.0-beta-3.jar:]
>
> at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(Filte
>rHandler.java:132)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.ja
>va:85)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRe
>quest(ServletSecurityRoleHandler.java:61)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(Serv
>letDispatchingHandler.java:36)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>org.wildfly.extension.undertow.security.SecurityContextAssociationHandler
>.handleRequest(SecurityContextAssociationHandler.java:78)
>
> at
>
>io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandl
>er.java:25)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.ha
>ndleRequest(SSLInformationAssociationHandler.java:113)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.ha
>ndleRequest(ServletAuthenticationCallHandler.java:56)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandl
>er.java:25)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.security.handlers.AbstractConfidentialityHandler.handleReques
>t(AbstractConfidentialityHandler.java:45)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHan
>dler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.security.handlers.AuthenticationMechanismsHandler.handleReque
>st(AuthenticationMechanismsHandler.java:58)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.h
>andleRequest(CachedAuthenticatedSessionHandler.java:70)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.security.handlers.SecurityInitialHandler.handleRequest(Securi
>tyInitialHandler.java:76)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandl
>er.java:25)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleR
>equest(JACCContextIdHandler.java:61)
>
> at
>
>io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandl
>er.java:25)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandl
>er.java:25)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(Ser
>vletInitialHandler.java:240)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(Servle
>tInitialHandler.java:227)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInit
>ialHandler.java:73)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(Servle
>tInitialHandler.java:146)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727)
> [undertow-core-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java
>:1145)
> [rt.jar:1.7.0_45]
>
> at
>
>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav
>a:615)
> [rt.jar:1.7.0_45]
>
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
>
> Caused by: org.jboss.resteasy.spi.UnhandledException:
> java.lang.NullPointerException
>
> at
>
>org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(Excep
>tionHandler.java:76)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler
>.java:212)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousD
>ispatcher.java:149)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatche
>r.java:372)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatche
>r.java:179)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.serv
>ice(ServletContainerDispatcher.java:220)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(H
>ttpServletDispatcher.java:56)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(H
>ttpServletDispatcher.java:51)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
>
> at
>
>io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.
>java:85)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(Filte
>rHandler.java:130)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>org.keycloak.services.filters.ClientConnectionFilter.doFilter(ClientConne
>ctionFilter.java:41)
> [keycloak-services-1.0-beta-3.jar:]
>
> at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(Filte
>rHandler.java:132)
> [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
>
> at
>
>org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(Keycl
>oakSessionServletFilter.java:42)
> [keycloak-services-1.0-beta-3.jar:]
>
> ... 28 more
>
> Caused by: java.lang.NullPointerException
>
> at
>
>org.keycloak.models.jpa.ClientAdapter.validateSecret(ClientAdapter.java:1
>42)
> [keycloak-model-jpa-1.0-beta-3.jar:]
>
> at
>
>org.keycloak.services.resources.TokenService.authorizeClient(TokenService
>.java:779)
> [keycloak-services-1.0-beta-3.jar:]
>
> at
>
>org.keycloak.services.resources.TokenService.accessCodeToToken(TokenServi
>ce.java:665)
> [keycloak-services-1.0-beta-3.jar:]
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [rt.jar:1.7.0_45]
>
> at
>
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>:57)
> [rt.jar:1.7.0_45]
>
> at
>
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>mpl.java:43)
> [rt.jar:1.7.0_45]
>
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
>
> at
>
>org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java
>:137)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMeth
>odInvoker.java:296)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoke
>r.java:250)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(Resou
>rceLocatorInvoker.java:140)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvo
>ker.java:103)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> at
>
>org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatche
>r.java:356)
> [resteasy-jaxrs-3.0.8.Final.jar:]
>
> ... 39 more
>
>
> 10:29:45,978 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator]
> (default task-46) failed to turn code into token
>
> 10:29:45,979 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator]
> (default task-46) status from server: 500
>
>
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev