Briefly, this error occurs when a user tries to execute a REST API call in Elasticsearch without having the necessary permissions. The user’s role doesn’t have the required privileges to access the specified URI. To resolve this issue, you can either grant the necessary permissions to the user’s role or use a user with a role that already has the required permissions. Alternatively, you can modify the Elasticsearch security settings to allow the operation, but this should be done carefully to avoid potential security risks.
This guide will help you check for common problems that cause the log ” {}[rest] [run_as_denied]\t{}; {}; roles=[{}]; uri=[{}]{} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “{}[rest] [run_as_denied]\t{}; {}; roles=[{}]; uri=[{}]{}” classname is DeprecatedLoggingAuditTrail.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
if (includeRequestBody) { logger.info("{}[rest] [run_as_denied]\t{}; {}; roles=[{}]; uri=[{}]; request_body=[{}]{}"; localNodeInfo.prefix; hostAttributes(request); runAsSubject(authentication); arrayToCommaDelimitedString(roleNames); request.uri(); restRequestContent(request); opaqueId()); } else { logger.info("{}[rest] [run_as_denied]\t{}; {}; roles=[{}]; uri=[{}]{}"; localNodeInfo.prefix; hostAttributes(request); runAsSubject(authentication); arrayToCommaDelimitedString(roleNames); request.uri(); opaqueId()); } } }
[ratemypost]