mrtisttt commented on code in PR #5705:
URL: https://github.com/apache/kyuubi/pull/5705#discussion_r1400582474


##########
kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala:
##########
@@ -852,4 +852,92 @@ abstract class BatchesResourceSuiteBase extends 
KyuubiFunSuite
     val getBatchListResponse = response.readEntity(classOf[GetBatchesResponse])
     assert(getBatchListResponse.getTotal == 1)
   }
+
+  test("open batch session with proxyUser") {
+    // we use superUser to impersonate commonUser
+    val superUser = "superUser"
+    val commonUser = "commonUser"

Review Comment:
   Thanks, I get it. But there some differents here, In order for the following 
code to execute:
   ```
   KyuubiAuthenticationFactory.verifyProxyAccess(realUser, proxyUser, 
ipAddress, hadoopConf)
   ```
   So I set the user of AUTHORIZATION_HEADER to anonymous and removed the 
variable of adminUser.
   
   The purpose of this is to throw an exception to let me know that proxyUser 
actually took effect. I think that in the future, when writing test code that 
requires Kerberos authentication interaction, this behavior should be simulated 
through dynamic proxy instead of throwing exceptions. It's just that now that I 
see that the existing code is in this pattern, I keep this behavior first to 
ensure that the functional code has tests to execute.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to