[
https://issues.apache.org/jira/browse/THRIFT-3606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112784#comment-18112784
]
Sylwester Lachiewicz edited comment on THRIFT-3606 at 9/8/26 1:45 PM:
----------------------------------------------------------------------
[TSaslClientTransport.java:68|https://github.com/apache/thrift/blob/master/lib/java/src/main/java/org/apache/thrift/transport/TSaslClientTransport.java#L68]
is still {{Map<String, String> props}}, the over-typed parameter this ticket
asks to widen to {{Map<String, ?>}}. The {{TSaslClientTransport(SaslClient,
TTransport)}} constructor lets a caller build the {{SaslClient}} themselves and
pass a {{GSSCredential}} that way, but that is a workaround, not the requested
change. Reopening.
was (Author: slachiewicz):
[TSaslClientTransport.java:68|https://github.com/apache/thrift/blob/master/lib/java/src/main/java/org/apache/thrift/transport/TSaslClientTransport.java#L68]
is still {{Map<String, String> props}}, the over-typed parameter this ticket
asks to widen to {{Map<String, ?>}}. The {{TSaslClientTransport(SaslClient,
TTransport)}} constructor lets a caller build the {{SaslClient}} themselves and
pass a {{GSSCredential}} that way, but that is a workaround, not the requested
change. Reopening.
> TSaslClientTransport props typed too strongly
> ---------------------------------------------
>
> Key: THRIFT-3606
> URL: https://issues.apache.org/jira/browse/THRIFT-3606
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.9.3
> Reporter: David Schreibman
> Priority: Minor
>
> The constructor in TSaslClientTransport.java with signature:
> public TSaslClientTransport(
> String mechanism,
> String authorizationId, String protocol,
> String serverName,
> Map<String, String> props,
> CallbackHandler cbh,
> TTransport transport)
> Is passing along the props Map to Sasl.createSaslClient(....). However,
> createSaslClient actually accepts props as Map<String, ?>. Having the props
> as Map<String, String> means that we cannot pass legitimate non-string
> property values. For example, you cannot pass in the JGSS
> javax.security.sasl.policy.credentials property which is an object of type
> GSSCredential.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)