Briefly, this error occurs when a user or client tries to perform an action on Elasticsearch but doesn’t have the necessary permissions. The roles assigned to the user or client do not allow the requested action. To resolve this issue, you can either assign the necessary permissions to the user or client, or use a user or client that already has the necessary permissions. Alternatively, you can modify the action request to fit within the permissions of the user or client.
This guide will help you check for common problems that cause the log ” {}[transport] [access_denied]\t{}; {}; roles=[{}]; action=[{}]; request=[{}]{} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “{}[transport] [access_denied]\t{}; {}; roles=[{}]; action=[{}]; request=[{}]{}” classname is DeprecatedLoggingAuditTrail.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
logger.info("{}[transport] [access_denied]\t{}; {}; roles=[{}]; action=[{}]; indices=[{}]; request=[{}]{}"; localNodeInfo.prefix; originAttributes(threadContext; message; localNodeInfo); subject(authentication); arrayToCommaDelimitedString(roleNames); action; arrayToCommaDelimitedString(indices.get()); message.getClass().getSimpleName(); opaqueId()); } else { logger.info("{}[transport] [access_denied]\t{}; {}; roles=[{}]; action=[{}]; request=[{}]{}"; localNodeInfo.prefix; originAttributes(threadContext; message; localNodeInfo); subject(authentication); arrayToCommaDelimitedString(roleNames); action; message.getClass().getSimpleName(); opaqueId()); } } }