-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CALCITE-4152] Switch to ConfigurableSpnego Jetty implementations #132
Conversation
9176742
to
d3fe71e
Compare
Just updated this pull request. Getting closer, but still not there. YCSB test results were very promising. In a nutshell, doing However, when I tried to use the Python client with Spnego, I ran into issues. Specifically, I was seeing a NullPointerException where the result from It would be great to get a set of eyes on this now as there is some breaking runtime semantics.
|
a9723ff
to
ef277ff
Compare
Finally got the time to revisit this. Sure enough, the java solution worked out of the box again and the python approach failed. I started poking around with GDB, which lead to LLDB, which was able to show me:
Meaning, requests-gssapi was using gssapi which was calling out to the OSX-provided Heimdal libraries instead of the MIT kerberos libraries I intended to be used. I popped open a Linux docker container and the same python code worked immediately. It seems like something with the Heimdal libraries that get bundled with OSX don't work with the current SPNEGO code in Jetty. I have no interest in trying to debug that :). I'm gonna work on getting this code cleaned up and a real pull request published. |
…mplementation Jetty has deprecated the previously-used version of SPNEGO login code. This change requires a few other changes to adopt: 1. Removal of automatic server login via JAAS (Jetty removed this and expects explicit logins for the server). 2. Separation of Authentication and Authorization (we're required to use a LoginService for authz to use the new SPNEGO authentication). For the benefit of making this change, we automatically inherit the Jetty Session logic which can skip SPNEGO authentication for the 2nd to Nth call to Avatica. For a "workload" which previously took N HTTP calls to Avatica to perform, this can now be done in (N/2)+1 HTTP calls which, for average Avatica calls, results in a nearly 2x speed-up. Jetty Sessions will cause a JSESSIONID cookie to be sent back on the successful SPNEGO authentication handshake. As long as the client resubmits this cookie for subsequent requests, the identity of the client is kept intact. To test this more easily, this change also includes updates to the Avatica StandaloneServer, which more easily enables setup of Avatica against any database (e.g. hsqldb with the SCOTT dataset).
d3fe71e
to
8afc50b
Compare
Also, fyi @stoty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @joshelser !
The new ConfigurableSpnego* classes in Jetty give us the ability to use the SessionHandler to send back a session cookie and avoid having to execute the spnego handshake for each and every call. This is a big improvement in reducing the traffic to the avatica server.
Still a draft