WIP - Convert accumulo-proxy to single user#58
Conversation
|
I think there may still be work to be done here but I am going to mark this as ready for review now to start to get some feedback to make sure I am on the right track with these changes. |
ctubbsii
left a comment
There was a problem hiding this comment.
For my comments below, I use the term "preferred language client" to refer to the user's code written in Python, Ruby, or whatever, that talks to the proxy service. This is to distinguish it from the proxy service itself, which is an Accumulo client. The preferred language client can also be thought of as the "proxy client", because it is the client to the proxy service. I hope the terminology isn't too confusing.
| ) | ||
|
|
||
| void addSplits ( | ||
| 1:binary login |
There was a problem hiding this comment.
I think you're probably going to need to keep the login field, but use it differently. It is currently used to track authenticated sessions. I think we still need that, so the preferred language client can authenticate to the proxy with some kind of shared secret. The task at hand is to eliminate the need for the preferred language client to instruct the proxy on how to authenticate to Accumulo, because the proxy should be able to authenticate to Accumulo using the client properties file. But, we still want the proxy to not just allow anybody to connect to it and use it. So, the preferred language client should have some way to authenticate to the proxy. For that, this thrift field can be reused to pass that secret shared between the preferred language client and the proxy.
| client = Accumulo.newClient().from(props).build(); | ||
|
|
||
| try { | ||
| String tokenProp = props.getProperty("tokenClass", PasswordToken.class.getName()); |
There was a problem hiding this comment.
I don't think you need this check anymore. Accumulo.newClient() should be able to set up the client using whatever token type it supports. That restriction was in place before because the preferred language client could only support passwords... but now that we're not logging in using the preferred language client, and the proxy is setting up the client on its own, we don't need to restrict it.
| } | ||
|
|
||
| @Override | ||
| public void setTableProperty(ByteBuffer login, String tableName, String property, String value) |
There was a problem hiding this comment.
The shared secret can just be a String. We don't need it to be binary anymore.
|
Superseded by #59 |
Fixes #16