[ 
https://issues.apache.org/jira/browse/THRIFT-876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron T. Myers updated THRIFT-876:
----------------------------------

    Attachment: thrift-876.txt.6

New patch attached.

bq. I think EncodingUtils.encodeInteger would be more properly named 
encodeBigEndian or something like that.

Done.

bq. Should TSaslClientTransport's mechanism field be final?

Done.

bq. You seem to have a no-content comment in TSaslTransport above messageHeader.

Fixed. Thanks for catching that.

bq. in receiveSaslMessage, you use the set of valid statuses to check if you 
should throw an exception. You should either make VALID_STATUSES a HashSet (to 
avoid the linear-time contains check) or make a method called isValidStatus 
that just checks 0 <= s <= 5.

Changed to a HashSet.

bq. When you get a BAD or ERROR response, you should probably throw the error 
with new String(payload, "UTF-8"), right?

Done.

bq. TSaslTransport.readLength still calls TFramedTransport.decodeFrameSize.

Whoops! Fixed.

bq. I think your test should include a test that actually uses a complete 
server, rather than just animating the transports yourself.

Done. Note that I had to make a slight change to ServerTestBase to make this 
work. ServerTestBase wasn't actually using getTransport(), even though it 
required subclasses to implement it.

Also, note that I had to create a TTransportFactory for TSaslServerTransport. 
This implementation involves a bit of a hack to work around the fact that 
TServers use different TTransport instances for input and output. I'm not in 
love with this solution, and am very much open to alternatives.

> Add SASL support
> ----------------
>
>                 Key: THRIFT-876
>                 URL: https://issues.apache.org/jira/browse/THRIFT-876
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Java - Library
>            Reporter: Aaron T. Myers
>            Assignee: Aaron T. Myers
>         Attachments: thrift-876.txt, thrift-876.txt.2, thrift-876.txt.3, 
> thrift-876.txt.5, thrift-876.txt.6, thrift-sasl-spec.txt, thrift-sasl-spec.txt
>
>
> It'd be nice if there were some way of securing Thrift communication in a 
> pluggable fashion. SASL is the implementation chosen by Hadoop for this. 
> Seems like a good option for Thrift, too.
> I'll start with a Java implementation, then move on to support the other 
> language bindings.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to