From: Terefang V. <ter...@gm...> - 2015-01-21 18:26:22
|
hello first of all thanks for this wonderful software. i do need a rpc api on top of unity so i implemented an endpoint (+factory+servlet) and hooked i up like this in unityServer.conf: ---- unityServer.core.endpoints.11.endpointType=JsonRpc unityServer.core.endpoints.11.endpointConfigurationFile=/etc/unity-idm/endpoints/jsonrpc.properties unityServer.core.endpoints.11.contextPath=/rpc unityServer.core.endpoints.11.endpointName=UNITY json-rpc endpoint unityServer.core.endpoints.11.endpointRealm=defaultRealm unityServer.core.endpoints.11.endpointAuthenticators=pwdRest ---- i can reach the endpoint servlet, but any call to an unity api (IdentitiesManagement, GroupsManagement, AttributesManagement) will result in the following Exception: ---- 2015-01-21 17:47:25,238 [qtp37986510-36] WARN terefang.unity.contrib.jsonrpc.JsonRpcServlet - The current call has no invocation context set pl.edu.icm.unity.exceptions.InternalException: The current call has no invocation context set at pl.edu.icm.unity.server.authn.InvocationContext.getCurrent(InvocationContext.java:57) at pl.edu.icm.unity.engine.events.EventDecoratingHandler.invoke(EventDecoratingHandler.java:39) at com.sun.proxy.$Proxy19.getEntity(Unknown Source) at terefang.unity.contrib.jsonrpc.JsonRpcServlet.userExists(JsonRpcServlet.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.googlecode.jsonrpc4j.JsonRpcServer.invoke(JsonRpcServer.java:513) at com.googlecode.jsonrpc4j.JsonRpcServer.handleObject(JsonRpcServer.java:384) at com.googlecode.jsonrpc4j.JsonRpcServer.handleNode(JsonRpcServer.java:293) at com.googlecode.jsonrpc4j.JsonRpcServer.handle(JsonRpcServer.java:230) at com.googlecode.jsonrpc4j.JsonRpcServer.handle(JsonRpcServer.java:207) at terefang.unity.contrib.jsonrpc.JsonRpcServlet.doPost(JsonRpcServlet.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229) 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.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:317) 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.content(AbstractHttpConnection.java:982) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196) 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) ---- it seams that the configured authentication methods do not get processed and hence the api calls are unauthorized i have looked into the other endpoints (Vaadim, CXF, Rest) but i do not understand how they authenticate via http-basic. please help. yours, -- terefang |