Rest tampered request t uri= request body= – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-6.8

Briefly, this error occurs when the Elasticsearch REST request has been tampered with, either in the URI or the request body. This could be due to incorrect syntax, unauthorized access, or a malformed request. To resolve this issue, you can: 1) Check the syntax of your request to ensure it’s correct. 2) Verify the user has the necessary permissions to make the request. 3) Ensure the request body is properly formatted and doesn’t contain any invalid data.

This guide will help you check for common problems that cause the log ” {}[rest] [tampered_request]t{}; uri=[{}]{}; request_body=[{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “{}[rest] [tampered_request]t{}; uri=[{}]{}; request_body=[{}]” classname is DeprecatedLoggingAuditTrail.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 
    
Override
    public void tamperedRequest(String requestId; RestRequest request) {
        if (events.contains(TAMPERED_REQUEST) && (eventFilterPolicyRegistry.ignorePredicate().test(AuditEventMetaInfo.EMPTY) == false)) {
            if (includeRequestBody) {
                logger.info("{}[rest] [tampered_request]\t{}; uri=[{}]{}; request_body=[{}]"; localNodeInfo.prefix; hostAttributes(request);
                        request.uri(); opaqueId(); restRequestContent(request));
            } else {
                logger.info("{}[rest] [tampered_request]\t{}; uri=[{}]{}"; localNodeInfo.prefix; hostAttributes(request); request.uri();
                        opaqueId());
            }



 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?