diff --git a/src/main/java/org/opensearch/security/auth/BackendRegistry.java b/src/main/java/org/opensearch/security/auth/BackendRegistry.java index 54816f8277..4e91aa542d 100644 --- a/src/main/java/org/opensearch/security/auth/BackendRegistry.java +++ b/src/main/java/org/opensearch/security/auth/BackendRegistry.java @@ -437,12 +437,12 @@ public boolean authenticate(final SecurityRequestChannel request) { * Checks if incoming auth request is from an anonymous user * Defaults all requests to yes, to allow anonymous authentication to succeed * @param params the query parameters passed in this request - * @return false only if an explicit `auth_request_type` param is supplied and its value is not anonymous, + * @return false only if an explicit `auth_type` param is supplied and its value is not anonymous, * otherwise returns true */ private boolean isRequestForAnonymousLogin(Map params) { - if (params.containsKey("auth_request_type")) { - return params.get("auth_request_type").equals("anonymous"); + if (params.containsKey("auth_type")) { + return params.get("auth_type").equals("anonymous"); } return true; }