By: Aaron Lilliendahl user 17 Oct 2015 at 7:30 p.m. CDT

7 Responses
Aaron Lilliendahl gravatar
The jwks endpoint does not allow an Accept header of "application/json", an HTTP 406 response is returned. Fails: curl -k -H "Accept: application/json" https://seed.gluu.org/oxauth/seam/resource/restv1/oxauth/jwks Response: ``` <html><head><title>Apache Tomcat/7.0.55 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 406 - No match for accept header</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>No match for accept header</u></p><p><b>description</b> <u>The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.55</h3></body></html> ``` Works: curl -k -H "Accept: */*" https://seed.gluu.org/oxauth/seam/resource/restv1/oxauth/jwks Installed Gluu CE on a Centos 6 server using the instructions found here -- http://www.gluu.org/docs/admin-guide/deployment/centos/ Please let me know if you need any more information. Thank you, Aaron

By Muhammad Usman named 17 Oct 2015 at 10:44 p.m. CDT

Muhammad Usman gravatar
Hi Aaron, Thank you for letting us know, we'll definitely get back to you soon.

By Mohib Zico staff 18 Oct 2015 at 1:28 a.m. CDT

Mohib Zico gravatar
Aaron, The hostname should be your Gluu Server's hostname than 'seed.gluu.org'. You can grab the openid connect configuration with `https://<hostname>/.well-known/openid-configuration` If you still get error, tail wrapper.log and post stack trace of error.

By Aaron Lilliendahl user 18 Oct 2015 at 7:22 a.m. CDT

Aaron Lilliendahl gravatar
Mohib, Here is the stacktrace from the wrapper.log -- INFO | jvm 1 | 2015/10/17 18:08:10 | 2015-10-17 18:08:10,204 DEBUG [org.gluu.oxtrust.ldap.service.StatusCheckerTimer] Setting httpd attributes INFO | jvm 1 | 2015/10/17 18:08:10 | org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.xdi.util.process.ProcessHelper.executeProgram(ProcessHelper.java:150) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.xdi.util.process.ProcessHelper.executeProgram(ProcessHelper.java:65) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.xdi.util.process.ProcessHelper.executeProgram(ProcessHelper.java:45) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.xdi.util.process.ProcessHelper.executeProgram(ProcessHelper.java:39) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.gluu.oxtrust.ldap.service.StatusCheckerTimer.runCheck(StatusCheckerTimer.java:196) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.gluu.oxtrust.ldap.service.StatusCheckerTimer.setCertificateExpiryAttributes(StatusCheckerTimer.java:170) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.gluu.oxtrust.ldap.service.StatusCheckerTimer.process(StatusCheckerTimer.java:130) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.gluu.oxtrust.ldap.service.StatusCheckerTimer.scheduleStatusChecking(StatusCheckerTimer.java:93) INFO | jvm 1 | 2015/10/17 18:08:10 | at sun.reflect.GeneratedMethodAccessor421.invoke(Unknown Source) INFO | jvm 1 | 2015/10/17 18:08:10 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.lang.reflect.Method.invoke(Method.java:606) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:52) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.gluu.oxtrust.ldap.service.StatusCheckerTimer_$$_javassist_seam_7.scheduleStatusChecking(StatusCheckerTimer_$$_javassist_seam_7.java) INFO | jvm 1 | 2015/10/17 18:08:10 | at sun.reflect.GeneratedMethodAccessor420.invoke(Unknown Source) INFO | jvm 1 | 2015/10/17 18:08:10 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.lang.reflect.Method.invoke(Method.java:606) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.async.AsynchronousInvocation$1.process(AsynchronousInvocation.java:62) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.async.Asynchronous$ContextualAsynchronousRequest.run(Asynchronous.java:80) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.async.AsynchronousInvocation.execute(AsynchronousInvocation.java:44) INFO | jvm 1 | 2015/10/17 18:08:10 | at org.jboss.seam.async.ThreadPoolDispatcher$RunnableAsynchronous.run(ThreadPoolDispatcher.java:142) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) INFO | jvm 1 | 2015/10/17 18:08:10 | at java.lang.Thread.run(Thread.java:745)> Sorry about the lack of formatting, Aaron

By Mohib Zico staff 18 Oct 2015 at 11:57 a.m. CDT

Mohib Zico gravatar
This is not related to the error you are getting. This stack trace is about ssl_checker, not related to the issue you are facing.

By Aaron Lilliendahl user 18 Oct 2015 at 7:05 p.m. CDT

Aaron Lilliendahl gravatar
Mohib, Oops, you are right. There actually isn't an error/exception in gluu thrown since the jwks service is only configured to accept "text/plain". That is why we get the "HTTP Status 406 - No match for accept header" response from gluu. See -- https://github.com/GluuFederation/oxAuth/blob/master/Server/src/main/java/org/xdi/oxauth/jwk/ws/rs/JwkRestWebService.java Line 51 has: @Produces({MediaType.TEXT_PLAIN}) Do you think it would make sense to allow 'application/jwk json' in addition to 'text/plain'? The reason behind the 'application/jwk json' comes from -- https://tools.ietf.org/html/rfc7517#section-8.5.1 Thanks again, Aaron

By Michael Schwartz Account Admin 30 Oct 2015 at 10:19 p.m. CDT

Michael Schwartz gravatar
Interesting feedback... we'll take a look.

By Michael Schwartz Account Admin 31 Oct 2015 at 9:18 a.m. CDT

Michael Schwartz gravatar
We fixed this... good find. Version 2.4 will include.