jdeppe-pivotal commented on a change in pull request #6844:
URL: https://github.com/apache/geode/pull/6844#discussion_r705555999
##########
File path:
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/connection/AuthExecutor.java
##########
@@ -15,35 +15,55 @@
*/
package org.apache.geode.redis.internal.executor.connection;
-import java.util.Arrays;
+import static
org.apache.geode.redis.internal.RedisConstants.ERROR_AUTH_CALLED_WITHOUT_PASSWORD_CONFIGURED;
+import static
org.apache.geode.redis.internal.RedisConstants.ERROR_INVALID_USERNAME_OR_PASSWORD;
+import static org.apache.geode.redis.internal.netty.Coder.bytesToString;
+
import java.util.List;
+import java.util.Properties;
-import org.apache.geode.redis.internal.RedisConstants;
import org.apache.geode.redis.internal.executor.Executor;
import org.apache.geode.redis.internal.executor.RedisResponse;
import org.apache.geode.redis.internal.netty.Command;
import org.apache.geode.redis.internal.netty.ExecutionHandlerContext;
+import org.apache.geode.security.AuthenticationFailedException;
+import org.apache.geode.security.SecurityManager;
public class AuthExecutor implements Executor {
@Override
- public RedisResponse executeCommand(Command command,
- ExecutionHandlerContext context) {
+ public RedisResponse executeCommand(Command command, ExecutionHandlerContext
context) {
List<byte[]> commandElems = command.getProcessedCommand();
- byte[] password = context.getAuthPassword();
- if (password == null) {
- return RedisResponse.error(RedisConstants.ERROR_NO_PASS);
+ SecurityManager securityManager = context.getSecurityManager();
+ Properties props = new Properties();
+ if (commandElems.size() == 2) {
Review comment:
Changed a lot since we're returning an error now when there is no
SecurityManager.
--
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]