hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10685) libhdfs++: return explicit error when non-secured client connects to secured server
Date Sat, 10 Sep 2016 04:44:20 GMT

    [ https://issues.apache.org/jira/browse/HDFS-10685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15479145#comment-15479145
] 

Kai Jiang commented on HDFS-10685:
----------------------------------

Hi Bob,
Since I can't attach diff file in this JIRA, I pasted it as comment here.
{code:none}
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.cc
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.cc
index 44087ac..fccfb09 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.cc
@@ -293,11 +293,7 @@ Status RpcConnection::HandleRpcResponse(std::shared_ptr<Response>
response) {
   auto req = RemoveFromRunningQueue(h.callid());
   if (!req) {
     LOG_WARN(kRPC, << "RPC response with Unknown call id " << h.callid());
-    if (h.callid() == RpcEngine::kCallIdSasl) {
-      return Status::Error("You have an non-secured client connecting to a secured server");
-    } else {
-      return Status::Error("Rpc response with unknown call id");
-    }
+    return Status::Error("Rpc response with unknown call id");
   }
 
   Status status;

{code}

Do you mind to review this?

> libhdfs++: return explicit error when non-secured client connects to secured server
> -----------------------------------------------------------------------------------
>
>                 Key: HDFS-10685
>                 URL: https://issues.apache.org/jira/browse/HDFS-10685
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Bob Hansen
>
> When a non-secured client tries to connect to a secured server, the first indication
is an error from RpcConnection::HandleRpcRespose complaining about "RPC response with Unknown
call id -33".
> We should insert code in HandleRpcResponse to detect if the unknown call id == RpcEngine::kCallIdSasl
and return an informative error that you have an unsecured client connecting to a secured
server.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message