jdeppe-pivotal commented on a change in pull request #6883:
URL: https://github.com/apache/geode/pull/6883#discussion_r714072025
##########
File path:
geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/AuthIntegrationTest.java
##########
@@ -53,22 +54,33 @@ public int getPort() {
return port;
}
+ @Override
+ public String getUsername() {
+ return "dataWrite";
+ }
+
+ @Override
+ public String getPassword() {
+ return "dataWrite";
+ }
+
public void setupCacheWithSecurity() throws Exception {
- setupCache(true, true);
+ setupCache(getUsername(), true);
}
public void setupCacheWithoutSecurity() throws Exception {
- setupCache(false, false);
+ setupCache(null, false);
}
- private void setupCache(boolean withUsername, boolean withSecurityManager)
throws Exception {
+ private void setupCache(String username, boolean withSecurityManager) throws
Exception {
+ System.setProperty("io.netty.eventLoopThreads", "1");
Review comment:
Authentication and authorization is sometimes implemented and handled
using thread locals. Our security implementation can do this but the way it's
used here does not (and must not) since netty threads are shared between
connections. By using a single thread we can be sure that tests using multiple
connections will not inadvertently leak auth data across connections.
I've added some similar comments into the code.
--
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]