duongkame commented on code in PR #4597:
URL: https://github.com/apache/ozone/pull/4597#discussion_r1191431621


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecretKeysApi.java:
##########
@@ -155,11 +156,12 @@ private void setSecureConfig() throws IOException {
 
     String realm = miniKdc.getRealm();
     String hostAndRealm = host + "@" + realm;
-    conf.set(HDDS_SCM_KERBEROS_PRINCIPAL_KEY, "scm/" + hostAndRealm);
+    ozonePrincipal = "scm/" + hostAndRealm;
+    conf.set(HDDS_SCM_KERBEROS_PRINCIPAL_KEY, ozonePrincipal);
     conf.set(HDDS_SCM_HTTP_KERBEROS_PRINCIPAL_KEY, "HTTP_SCM/" + hostAndRealm);
-    conf.set(OZONE_OM_KERBEROS_PRINCIPAL_KEY, "scm/" + hostAndRealm);
+    conf.set(OZONE_OM_KERBEROS_PRINCIPAL_KEY, ozonePrincipal);

Review Comment:
   Actually, I just realized that testing with different principals (identity) 
is impossible, because integration tests lunch services in the same JVM, and 
the authentication context is stored statically in class context.
   
   (I feel dumb for not realizing this earlier :P)



-- 
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