diff --git a/.bazelproject b/.bazelproject new file mode 100644 index 0000000..47d0a2e --- /dev/null +++ b/.bazelproject @@ -0,0 +1,6 @@ +directories: + . + +targets: + //... + diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 0000000..fcdb2e1 --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +4.0.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..40f03b9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Release plugin +on: + workflow_dispatch: + inputs: + version: + description: 'Version' + required: true + +jobs: + bazel: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: mishas/setup-bazelisk-action@v1 + + - name: Version + run: bazel version + + - name: Bazel build + run: bazel build ... + - name: List plugin contents + run: | + FILE=$(bazel aquery 'outputs(".*zip", //src/main/java/com/etsy/elasticsearch/restlog:restlog_plugin_versioned)' 2>/dev/null|grep -oE 'Outputs: .+' | sed 's/Outputs: \[//' | sed 's/\]//' | tr "," "\n") + unzip -l $FILE + CHECKSUM=$(sha256sum $FILE | cut -d " " -f 1 ) + echo "FILE=$FILE" >> $GITHUB_ENV + echo "CHECKSUM=$CHECKSUM" >> $GITHUB_ENV + - name: Bazel test + run: bazel test ... --test_output=streamed + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.event.inputs.version }} + name: Release for ${{ github.event.inputs.version }} + body: "sha256sum: ${{ env.CHECKSUM }}" + files: "${{ env.FILE }}" + # fail_on_unmatched_files: true \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bc19ba5 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Bazel build and test +on: + pull_request: + branches: + - master +jobs: + bazel: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: mishas/setup-bazelisk-action@v1 + + - name: Version + run: bazel version + + - name: Bazel build + run: bazel build ... + + - name: List plugin contents + run: | + FILE=$(bazel aquery 'outputs(".*zip", //src/main/java/com/etsy/elasticsearch/restlog:restlog_plugin_versioned)' 2>/dev/null|grep -oE 'Outputs: .+' | sed 's/Outputs: \[//' | sed 's/\]//' | tr "," "\n") + unzip -l $FILE + + - name: Bazel test + run: bazel test ... --test_output=streamed \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2693394..e4a124a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,34 @@ target/ - # gah macs .DS_Store -# intellij -.idea/ +# intellij user-specific stuff +.idea/workspace.xml +.idea/tasks.xml +.idea/dictionaries +.idea/saveactions_settings.xml +.idea/compiler.xml +.idea/sshConfigs.xml + +# IntellJ IDEA Bazel plugin settings +.ijwb + +# managed by gradle's intellij (or is it intellij's gradle) plugin +.idea/libraries + +# intellij high-churn +.idea/deployment.xml +.idea/uiDesigner.xml +.idea/inspectionProfiles +.idea/webServers.xml +.idea/modules.xml +.idea/misc.xml +.idea/codeStyles/ + *.iml + +# See: https://docs.bazel.build/versions/master/best-practices.html#bazelrc +user.bazelrc +bazel- +bazel-* +build/ \ No newline at end of file diff --git a/project/plugins.sbt b/BUILD.bazel similarity index 100% rename from project/plugins.sbt rename to BUILD.bazel diff --git a/README.md b/README.md index f724c48..2935f4e 100644 --- a/README.md +++ b/README.md @@ -20,28 +20,48 @@ Note that Elasticsearch provides the 'slowlog' mechanism for capturing index or ## Installation -The plugin is available for Elastisearch 2.x +The plugin is available for Elastisearch 7.x ### pre-packaged -The release naming scheme is `es-restlog-${plugin.version}-es_maj_min_patch_etc.zip`. - Head over to `Releases` on Github to find the latest plugin package. ### packaging -Use the [sbt](http://www.scala-sbt.org/#install) target `pack`, which will generate a plugin zip under `target/`. +We use [bazel](https://bazel.build/) to build and package the es-restlog elasticsearch plugin. -The ES version is overridable with the `esVersion` setting, so you can do: +1. Install [bazelisk](https://docs.bazel.build/versions/master/install-bazelisk.html), a simple bazel wrapper and add it in your `$PATH`. +Bazelisk will automatically download the required bazel version defined in `.bazelversion`. -``` -$ sbt 'set esVersion := "2.0.1"' clean pack -``` +2. To build the plugin locally: + ``` + bazelisk build //src/main/java/com/etsy/elasticsearch/restlog:restlog_plugin_versioned + ``` + + The plugin `zip` file will be available in the following path: + ``` + bazel-bin/src/main/java/com/etsy/elasticsearch/restlog/restlog-plugin-X.Y.Z.zip + ``` + +3. To update the version of `elasticsearch` before building the plugin: + - update the ES version in `version.bzl` + - update the jvm dependencies for the new version by running: + ```bash + REPIN=1 bazelisk run @unpinned_jvm_deps//:pin + ``` + - build the plugin: `bazelisk build //src/main/java/com/etsy/elasticsearch/restlog:restlog_plugin_versioned` ## Configuration +### x-pack security module +`es-restlog` and X-Pack security module can't run together, so the latter needs to be disabled. + +Add `xpack.security.enabled: false` to `elasticsearch.yml` + ### plugin +The following plugin configuration can be added in `elasticsearch.yml`: + `restlog.category` the logger category to be used, defaults to "restlog". `restlog.path_regex` allows for filtering what gets logged at the level of the HTTP request path, defaults to blank which implies matching everything. If you only want to include search requests for example, you could set this to `\/_search\/?\??.*`. @@ -50,25 +70,4 @@ $ sbt 'set esVersion := "2.0.1"' clean pack `restlog.null_value` how any value that is not available (e.g. if there was no request body) get encoded in the log line, defaults to "-". -### logging - -Note that the plugin uses `INFO` level for logging at the configured category. - -You will probably want to direct the restlog output to a dedicated logfile. The configuration can be based off how the slowlogs get configured in `logging.yml`, for example: - -```yaml -logger: - restlog: INFO, restlog - -additivity: - restlog: false - -appender: - restlog: - type: dailyRollingFile - file: ${path.logs}/${cluster.name}_rest.log - datePattern: "'.'yyyy-MM-dd" - layout: - type: pattern - conversionPattern: "%m%n" -``` +`restlog.uuid_header` log this request header value if present in the request (e.g. X-Request-ID), defaults to "" (disabled) \ No newline at end of file diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 0000000..990b694 --- /dev/null +++ b/WORKSPACE @@ -0,0 +1,53 @@ +workspace(name = "restlog") + +load("//:version.bzl", "elasticsearch_version") + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +RULES_JVM_EXTERNAL_TAG = "6a3bd6a2cf02e96fd5041500bafa3a35731d4981" # master as of 9 Mar 2021 +RULES_JVM_EXTERNAL_SHA = "42712b494220629e3dbd3d0edee1fb675fb41f507695ca80284b53c291a76299" + +http_archive( + name = "rules_jvm_external", + strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, + sha256 = RULES_JVM_EXTERNAL_SHA, + url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, +) + +load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps") + +rules_jvm_external_deps() + +load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup") + +rules_jvm_external_setup() + +load("@rules_jvm_external//:defs.bzl", "maven_install") + +maven_install( + name = "jvm_deps", + artifacts = [ + "org.elasticsearch:elasticsearch:%s" % elasticsearch_version, + "org.elasticsearch.test:framework:%s" % elasticsearch_version, + "org.elasticsearch.client:elasticsearch-rest-high-level-client:%s" % elasticsearch_version, + 'org.apache.logging.log4j:log4j-api:jar:2.11.1', + 'org.apache.logging.log4j:log4j-slf4j-impl:jar:2.11.1', + 'org.apache.logging.log4j:log4j-core:2.11.1', + 'com.google.guava:guava:29.0-jre', + 'org.mockito:mockito-core:3.5.13', + 'org.mockito:mockito-inline:3.5.13', + 'junit:junit:4.12', + ], + repositories = [ + "https://repo1.maven.org/maven2", + ], + maven_install_json = "@//:jvm_deps_install.json", + # fails if maven_install_json was not regenerated after updating artifacts + fail_if_repin_required = True, +) + + +load("@jvm_deps//:defs.bzl", pinned_jvm_deps_install = "pinned_maven_install") + +pinned_jvm_deps_install() + diff --git a/jvm_deps_install.json b/jvm_deps_install.json new file mode 100644 index 0000000..afdacf7 --- /dev/null +++ b/jvm_deps_install.json @@ -0,0 +1,1205 @@ +{ + "dependency_tree": { + "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", + "__INPUT_ARTIFACTS_HASH": 1361544724, + "__RESOLVED_ARTIFACTS_HASH": 1531968836, + "conflict_resolution": {}, + "dependencies": [ + { + "coord": "com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.1", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/com/carrotsearch/randomizedtesting/randomizedtesting-runner/2.7.1/randomizedtesting-runner-2.7.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/carrotsearch/randomizedtesting/randomizedtesting-runner/2.7.1/randomizedtesting-runner-2.7.1.jar" + ], + "sha256": "0cab98d652bc38d6a48bdb4cd73fa9336f927b1c3ef881c7eb04a483bda9ed38", + "url": "https://repo1.maven.org/maven2/com/carrotsearch/randomizedtesting/randomizedtesting-runner/2.7.1/randomizedtesting-runner-2.7.1.jar" + }, + { + "coord": "com.carrotsearch:hppc:0.8.1", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/com/carrotsearch/hppc/0.8.1/hppc-0.8.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/carrotsearch/hppc/0.8.1/hppc-0.8.1.jar" + ], + "sha256": "f540703478636d88f699f4666242e6fc9175a996c08ddceaf02106517b970406", + "url": "https://repo1.maven.org/maven2/com/carrotsearch/hppc/0.8.1/hppc-0.8.1.jar" + }, + { + "coord": "com.fasterxml.jackson.core:jackson-core:2.8.11", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.8.11/jackson-core-2.8.11.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.8.11/jackson-core-2.8.11.jar" + ], + "sha256": "b51bf33caa83a10b67a30fceb3111a58df1089cc1b59c23f0442661ecbef7f22", + "url": "https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.8.11/jackson-core-2.8.11.jar" + }, + { + "coord": "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.11", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.8.11/jackson-dataformat-cbor-2.8.11.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.8.11/jackson-dataformat-cbor-2.8.11.jar" + ], + "sha256": "ff7c36f1e0464b909e81856570edb4ebdebaa282cc01c5ba334cf19a71464d26", + "url": "https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.8.11/jackson-dataformat-cbor-2.8.11.jar" + }, + { + "coord": "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.11", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.8.11/jackson-dataformat-smile-2.8.11.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.8.11/jackson-dataformat-smile-2.8.11.jar" + ], + "sha256": "7b53b22d373ad60e98b802f4a6e5efee6acde0f2e93215e8254b24df8a505b95", + "url": "https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.8.11/jackson-dataformat-smile-2.8.11.jar" + }, + { + "coord": "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.11", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.8.11/jackson-dataformat-yaml-2.8.11.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.8.11/jackson-dataformat-yaml-2.8.11.jar" + ], + "sha256": "f8076ad5d8937ec1b56de17bb788c59acc10f789be48e28f6b78b778180a5d4b", + "url": "https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.8.11/jackson-dataformat-yaml-2.8.11.jar" + }, + { + "coord": "com.github.spullara.mustache.java:compiler:0.9.6", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/com/github/spullara/mustache/java/compiler/0.9.6/compiler-0.9.6.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/github/spullara/mustache/java/compiler/0.9.6/compiler-0.9.6.jar" + ], + "sha256": "c4d697fd3619cb616cc5e22e9530c8a4fd4a8e9a76953c0655ee627cb2d22318", + "url": "https://repo1.maven.org/maven2/com/github/spullara/mustache/java/compiler/0.9.6/compiler-0.9.6.jar" + }, + { + "coord": "com.google.code.findbugs:jsr305:3.0.2", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar" + ], + "sha256": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7", + "url": "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar" + }, + { + "coord": "com.google.errorprone:error_prone_annotations:2.3.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar" + ], + "sha256": "baf7d6ea97ce606c53e11b6854ba5f2ce7ef5c24dddf0afa18d1260bd25b002c", + "url": "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar" + }, + { + "coord": "com.google.guava:failureaccess:1.0.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" + ], + "sha256": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26", + "url": "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" + }, + { + "coord": "com.google.guava:guava:29.0-jre", + "dependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.errorprone:error_prone_annotations:2.3.4", + "com.google.guava:failureaccess:1.0.1", + "org.checkerframework:checker-qual:2.11.1" + ], + "directDependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.errorprone:error_prone_annotations:2.3.4", + "com.google.guava:failureaccess:1.0.1", + "org.checkerframework:checker-qual:2.11.1" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar" + ], + "sha256": "b22c5fb66d61e7b9522531d04b2f915b5158e80aa0b40ee7282c8bfb07b0da25", + "url": "https://repo1.maven.org/maven2/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar" + }, + { + "coord": "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" + ], + "sha256": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99", + "url": "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" + }, + { + "coord": "com.google.j2objc:j2objc-annotations:1.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" + ], + "sha256": "21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b", + "url": "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" + }, + { + "coord": "com.tdunning:t-digest:3.2", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/com/tdunning/t-digest/3.2/t-digest-3.2.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/com/tdunning/t-digest/3.2/t-digest-3.2.jar" + ], + "sha256": "03db291a8887b474f90db67bfb1f92d084e990150037e231babbb374ee11d7c3", + "url": "https://repo1.maven.org/maven2/com/tdunning/t-digest/3.2/t-digest-3.2.jar" + }, + { + "coord": "commons-codec:commons-codec:1.11", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.jar" + ], + "sha256": "e599d5318e97aa48f42136a2927e6dfa4e8881dff0e6c8e3109ddbbff51d7b7d", + "url": "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.jar" + }, + { + "coord": "commons-logging:commons-logging:1.1.3", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar" + ], + "sha256": "70903f6fc82e9908c8da9f20443f61d90f0870a312642991fe8462a0b9391784", + "url": "https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar" + }, + { + "coord": "joda-time:joda-time:2.10.4", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/joda-time/joda-time/2.10.4/joda-time-2.10.4.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/joda-time/joda-time/2.10.4/joda-time-2.10.4.jar" + ], + "sha256": "ac6fda8989775776f428df8b5a4517cdb06d923465abf9bda0746ec07dfcc657", + "url": "https://repo1.maven.org/maven2/joda-time/joda-time/2.10.4/joda-time-2.10.4.jar" + }, + { + "coord": "junit:junit:4.12", + "dependencies": [ + "org.hamcrest:hamcrest-core:1.3" + ], + "directDependencies": [ + "org.hamcrest:hamcrest-core:1.3" + ], + "file": "v1/https/repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar" + ], + "sha256": "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a", + "url": "https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar" + }, + { + "coord": "net.bytebuddy:byte-buddy-agent:1.10.15", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.10.15/byte-buddy-agent-1.10.15.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.10.15/byte-buddy-agent-1.10.15.jar" + ], + "sha256": "15cecd0ca128d0517d99b5bb8682b4f187c73a68eeff4a1797168322bc0ebc5c", + "url": "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.10.15/byte-buddy-agent-1.10.15.jar" + }, + { + "coord": "net.bytebuddy:byte-buddy:1.10.15", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.10.15/byte-buddy-1.10.15.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.10.15/byte-buddy-1.10.15.jar" + ], + "sha256": "79be97529a296fca4a885c4652814a939ae37f1a86a6b13bd29d0725fa4e5711", + "url": "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.10.15/byte-buddy-1.10.15.jar" + }, + { + "coord": "net.sf.jopt-simple:jopt-simple:5.0.2", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/5.0.2/jopt-simple-5.0.2.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/5.0.2/jopt-simple-5.0.2.jar" + ], + "sha256": "457877c79e038f390557db5f8e92c4436fb4f4b3ba63f28bc228500fee080193", + "url": "https://repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/5.0.2/jopt-simple-5.0.2.jar" + }, + { + "coord": "org.apache.httpcomponents:httpasyncclient:4.1.4", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/httpcomponents/httpasyncclient/4.1.4/httpasyncclient-4.1.4.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/httpcomponents/httpasyncclient/4.1.4/httpasyncclient-4.1.4.jar" + ], + "sha256": "50e981a8e567a16ebdad104605b156540a863459fa127b8ba647f310dfc83ef8", + "url": "https://repo1.maven.org/maven2/org/apache/httpcomponents/httpasyncclient/4.1.4/httpasyncclient-4.1.4.jar" + }, + { + "coord": "org.apache.httpcomponents:httpclient:4.5.10", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.10/httpclient-4.5.10.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.10/httpclient-4.5.10.jar" + ], + "sha256": "38b9f16f504928e4db736a433b9cd10968d9ec8d6f5d0e61a64889a689172134", + "url": "https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.10/httpclient-4.5.10.jar" + }, + { + "coord": "org.apache.httpcomponents:httpcore-nio:4.4.12", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/httpcomponents/httpcore-nio/4.4.12/httpcore-nio-4.4.12.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore-nio/4.4.12/httpcore-nio-4.4.12.jar" + ], + "sha256": "11448f4b5c7f13d9396a67b33aa938d05f660665e0f14fd08e25acfd3c20ae80", + "url": "https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore-nio/4.4.12/httpcore-nio-4.4.12.jar" + }, + { + "coord": "org.apache.httpcomponents:httpcore:4.4.12", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.12/httpcore-4.4.12.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.12/httpcore-4.4.12.jar" + ], + "sha256": "ab765334beabf0ea024484a5e90a7c40e8160b145f22d199e11e27f68d57da08", + "url": "https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.12/httpcore-4.4.12.jar" + }, + { + "coord": "org.apache.logging.log4j:log4j-api:2.11.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar" + ], + "sha256": "493b37b5a6c49c4f5fb609b966375e4dc1783df436587584ca1dc7e861d0742b", + "url": "https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar" + }, + { + "coord": "org.apache.logging.log4j:log4j-core:2.11.1", + "dependencies": [ + "org.apache.logging.log4j:log4j-api:2.11.1" + ], + "directDependencies": [ + "org.apache.logging.log4j:log4j-api:2.11.1" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.1/log4j-core-2.11.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.1/log4j-core-2.11.1.jar" + ], + "sha256": "a20c34cdac4978b76efcc9d0db66e95600bd807c6a0bd3f5793bcb45d07162ec", + "url": "https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.1/log4j-core-2.11.1.jar" + }, + { + "coord": "org.apache.logging.log4j:log4j-slf4j-impl:2.11.1", + "dependencies": [ + "org.slf4j:slf4j-api:1.7.25", + "org.apache.logging.log4j:log4j-core:2.11.1", + "org.apache.logging.log4j:log4j-api:2.11.1" + ], + "directDependencies": [ + "org.apache.logging.log4j:log4j-api:2.11.1", + "org.apache.logging.log4j:log4j-core:2.11.1", + "org.slf4j:slf4j-api:1.7.25" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/logging/log4j/log4j-slf4j-impl/2.11.1/log4j-slf4j-impl-2.11.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-slf4j-impl/2.11.1/log4j-slf4j-impl-2.11.1.jar" + ], + "sha256": "21a53ca21dfdce610036da8428e6142d2c8c0c7af210d97a6ec5c97c55ce9ae5", + "url": "https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-slf4j-impl/2.11.1/log4j-slf4j-impl-2.11.1.jar" + }, + { + "coord": "org.apache.lucene:lucene-analyzers-common:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common/8.4.0/lucene-analyzers-common-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common/8.4.0/lucene-analyzers-common-8.4.0.jar" + ], + "sha256": "84c9a4dacda8b7e92de7a1325a185bafe3e599ef057376e3f9ee48954305a316", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common/8.4.0/lucene-analyzers-common-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-backward-codecs:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/8.4.0/lucene-backward-codecs-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/8.4.0/lucene-backward-codecs-8.4.0.jar" + ], + "sha256": "3371dd4352499dc6d108a14df00252727d0bdb178d850215ad2c52e78c55663e", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/8.4.0/lucene-backward-codecs-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-codecs:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-codecs/8.4.0/lucene-codecs-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-codecs/8.4.0/lucene-codecs-8.4.0.jar" + ], + "sha256": "0165f87219a699a8d8c0d78d4843957084bd214f93f812637b0152a93f6afd8e", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-codecs/8.4.0/lucene-codecs-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-core:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-core/8.4.0/lucene-core-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-core/8.4.0/lucene-core-8.4.0.jar" + ], + "sha256": "2715688a4606978d8d0b4cb7aa1d3cbd865454da3e3880e2785a72137f75d327", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-core/8.4.0/lucene-core-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-grouping:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-grouping/8.4.0/lucene-grouping-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-grouping/8.4.0/lucene-grouping-8.4.0.jar" + ], + "sha256": "25f6a5403eef9da51eac9ac1334695fb02874a1d6005af54df34a45cb636a7a7", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-grouping/8.4.0/lucene-grouping-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-highlighter:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-highlighter/8.4.0/lucene-highlighter-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-highlighter/8.4.0/lucene-highlighter-8.4.0.jar" + ], + "sha256": "31e6e77e27c155968a384bb493ff1cc08e2be33ae6eeae85a3dd3b4eebd785ed", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-highlighter/8.4.0/lucene-highlighter-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-join:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-join/8.4.0/lucene-join-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-join/8.4.0/lucene-join-8.4.0.jar" + ], + "sha256": "9f95f1327e2162d7192854ac6745bb1436f25c779dfde6832d30f6eb432b617c", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-join/8.4.0/lucene-join-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-memory:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-memory/8.4.0/lucene-memory-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory/8.4.0/lucene-memory-8.4.0.jar" + ], + "sha256": "b4d73c54459692d089705ab96cd431566a1200036242a1a482147a8ff6c53473", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory/8.4.0/lucene-memory-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-misc:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-misc/8.4.0/lucene-misc-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc/8.4.0/lucene-misc-8.4.0.jar" + ], + "sha256": "83f2dd316be13cf25788e5af5e70d50d6591acdbf6340f5a4bf6c99a9f0b7685", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc/8.4.0/lucene-misc-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-queries:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-queries/8.4.0/lucene-queries-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-queries/8.4.0/lucene-queries-8.4.0.jar" + ], + "sha256": "c3918bb8819c7e5ef27645b09171a58f9566bdb5ff2bce1fd26fd48d6d918e27", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-queries/8.4.0/lucene-queries-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-queryparser:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-queryparser/8.4.0/lucene-queryparser-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-queryparser/8.4.0/lucene-queryparser-8.4.0.jar" + ], + "sha256": "3974ab8d5eafe84eb9807599342377cb9e5bdf84c2834ac2fe8efb8e54e62134", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-queryparser/8.4.0/lucene-queryparser-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-sandbox:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-sandbox/8.4.0/lucene-sandbox-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-sandbox/8.4.0/lucene-sandbox-8.4.0.jar" + ], + "sha256": "d761d8d84198afac46f4d8ba289a4e2a0f3d053c085ac11de0f530b4c1122d2e", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-sandbox/8.4.0/lucene-sandbox-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-spatial-extras:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-spatial-extras/8.4.0/lucene-spatial-extras-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial-extras/8.4.0/lucene-spatial-extras-8.4.0.jar" + ], + "sha256": "05d93b999707a4705cc5ed8606cb9c273166edcc77a3b604958279031ec1937a", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial-extras/8.4.0/lucene-spatial-extras-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-spatial3d:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-spatial3d/8.4.0/lucene-spatial3d-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial3d/8.4.0/lucene-spatial3d-8.4.0.jar" + ], + "sha256": "e998cbd05a0e56799a8b6b59ee7404e8932e8677be5cfd056595f8220fc3e0db", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial3d/8.4.0/lucene-spatial3d-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-spatial:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-spatial/8.4.0/lucene-spatial-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial/8.4.0/lucene-spatial-8.4.0.jar" + ], + "sha256": "4b6f4d3bd27f368721e48eb30eb6ea90eb4321b808f10717c10feda029f638d4", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial/8.4.0/lucene-spatial-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-suggest:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-suggest/8.4.0/lucene-suggest-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-suggest/8.4.0/lucene-suggest-8.4.0.jar" + ], + "sha256": "d57754d998ed454e60c66819ffb8a4b93304eebda77bdf53f1dd77ce06ddd2d8", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-suggest/8.4.0/lucene-suggest-8.4.0.jar" + }, + { + "coord": "org.apache.lucene:lucene-test-framework:8.4.0", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/apache/lucene/lucene-test-framework/8.4.0/lucene-test-framework-8.4.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/apache/lucene/lucene-test-framework/8.4.0/lucene-test-framework-8.4.0.jar" + ], + "sha256": "168106c1371d0d7a1005623adcf3509f50b924d66046f5713208871ffa2b24d9", + "url": "https://repo1.maven.org/maven2/org/apache/lucene/lucene-test-framework/8.4.0/lucene-test-framework-8.4.0.jar" + }, + { + "coord": "org.checkerframework:checker-qual:2.11.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar" + ], + "sha256": "015224a4b1dc6de6da053273d4da7d39cfea20e63038169fc45ac0d1dc9c5938", + "url": "https://repo1.maven.org/maven2/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar" + }, + { + "coord": "org.elasticsearch.client:elasticsearch-rest-client-sniffer:7.6.0", + "dependencies": [ + "org.apache.httpcomponents:httpclient:4.5.10", + "org.apache.httpcomponents:httpcore-nio:4.4.12", + "commons-logging:commons-logging:1.1.3", + "commons-codec:commons-codec:1.11", + "org.apache.httpcomponents:httpasyncclient:4.1.4", + "org.elasticsearch.client:elasticsearch-rest-client:7.6.0", + "org.apache.httpcomponents:httpcore:4.4.12", + "com.fasterxml.jackson.core:jackson-core:2.8.11" + ], + "directDependencies": [ + "org.apache.httpcomponents:httpclient:4.5.10", + "commons-logging:commons-logging:1.1.3", + "commons-codec:commons-codec:1.11", + "org.elasticsearch.client:elasticsearch-rest-client:7.6.0", + "org.apache.httpcomponents:httpcore:4.4.12", + "com.fasterxml.jackson.core:jackson-core:2.8.11" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-client-sniffer/7.6.0/elasticsearch-rest-client-sniffer-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-client-sniffer/7.6.0/elasticsearch-rest-client-sniffer-7.6.0.jar" + ], + "sha256": "6122ca6289ceccd4b1e4bb001d405a96e3ca7bc360f095c54a04ad1c48f20359", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-client-sniffer/7.6.0/elasticsearch-rest-client-sniffer-7.6.0.jar" + }, + { + "coord": "org.elasticsearch.client:elasticsearch-rest-client:7.6.0", + "dependencies": [ + "org.apache.httpcomponents:httpclient:4.5.10", + "org.apache.httpcomponents:httpcore-nio:4.4.12", + "commons-logging:commons-logging:1.1.3", + "commons-codec:commons-codec:1.11", + "org.apache.httpcomponents:httpasyncclient:4.1.4", + "org.apache.httpcomponents:httpcore:4.4.12" + ], + "directDependencies": [ + "org.apache.httpcomponents:httpclient:4.5.10", + "org.apache.httpcomponents:httpcore-nio:4.4.12", + "commons-logging:commons-logging:1.1.3", + "commons-codec:commons-codec:1.11", + "org.apache.httpcomponents:httpasyncclient:4.1.4", + "org.apache.httpcomponents:httpcore:4.4.12" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-client/7.6.0/elasticsearch-rest-client-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-client/7.6.0/elasticsearch-rest-client-7.6.0.jar" + ], + "sha256": "0dc1b330daf625a58095833cfebc2259104a19e4e40570ad58e34d5e2949b2f8", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-client/7.6.0/elasticsearch-rest-client-7.6.0.jar" + }, + { + "coord": "org.elasticsearch.client:elasticsearch-rest-high-level-client:7.6.0", + "dependencies": [ + "org.elasticsearch.plugin:parent-join-client:7.6.0", + "org.apache.httpcomponents:httpclient:4.5.10", + "org.apache.lucene:lucene-misc:8.4.0", + "org.apache.lucene:lucene-backward-codecs:8.4.0", + "com.github.spullara.mustache.java:compiler:0.9.6", + "net.sf.jopt-simple:jopt-simple:5.0.2", + "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.11", + "org.apache.lucene:lucene-queries:8.4.0", + "org.elasticsearch:elasticsearch-cli:7.6.0", + "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.11", + "org.elasticsearch.plugin:lang-mustache-client:7.6.0", + "com.tdunning:t-digest:3.2", + "org.elasticsearch:elasticsearch-x-content:7.6.0", + "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.11", + "org.apache.logging.log4j:log4j-api:2.11.1", + "joda-time:joda-time:2.10.4", + "org.apache.lucene:lucene-join:8.4.0", + "org.hdrhistogram:HdrHistogram:2.1.9", + "org.apache.lucene:lucene-spatial:8.4.0", + "org.elasticsearch.plugin:aggs-matrix-stats-client:7.6.0", + "org.elasticsearch:elasticsearch-secure-sm:7.6.0", + "org.apache.lucene:lucene-spatial3d:8.4.0", + "org.apache.httpcomponents:httpcore-nio:4.4.12", + "commons-logging:commons-logging:1.1.3", + "commons-codec:commons-codec:1.11", + "org.apache.lucene:lucene-highlighter:8.4.0", + "org.apache.lucene:lucene-queryparser:8.4.0", + "org.apache.lucene:lucene-core:8.4.0", + "com.carrotsearch:hppc:0.8.1", + "org.apache.httpcomponents:httpasyncclient:4.1.4", + "org.elasticsearch.client:elasticsearch-rest-client:7.6.0", + "org.apache.lucene:lucene-analyzers-common:8.4.0", + "org.elasticsearch:elasticsearch-core:7.6.0", + "org.yaml:snakeyaml:1.17", + "org.elasticsearch:elasticsearch-geo:7.6.0", + "org.apache.lucene:lucene-sandbox:8.4.0", + "org.apache.lucene:lucene-memory:8.4.0", + "org.apache.lucene:lucene-spatial-extras:8.4.0", + "org.elasticsearch:jna:4.5.1", + "org.apache.lucene:lucene-suggest:8.4.0", + "org.elasticsearch.plugin:mapper-extras-client:7.6.0", + "org.elasticsearch:elasticsearch:7.6.0", + "org.apache.httpcomponents:httpcore:4.4.12", + "org.apache.lucene:lucene-grouping:8.4.0", + "com.fasterxml.jackson.core:jackson-core:2.8.11", + "org.elasticsearch.plugin:rank-eval-client:7.6.0" + ], + "directDependencies": [ + "org.elasticsearch.plugin:parent-join-client:7.6.0", + "org.elasticsearch.plugin:lang-mustache-client:7.6.0", + "org.elasticsearch.plugin:aggs-matrix-stats-client:7.6.0", + "org.elasticsearch.client:elasticsearch-rest-client:7.6.0", + "org.elasticsearch.plugin:mapper-extras-client:7.6.0", + "org.elasticsearch:elasticsearch:7.6.0", + "org.elasticsearch.plugin:rank-eval-client:7.6.0" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-high-level-client/7.6.0/elasticsearch-rest-high-level-client-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-high-level-client/7.6.0/elasticsearch-rest-high-level-client-7.6.0.jar" + ], + "sha256": "cc77a976f146f20e728a79f7321bc051c585b7414e7cc32dcda76e10ab824c18", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/client/elasticsearch-rest-high-level-client/7.6.0/elasticsearch-rest-high-level-client-7.6.0.jar" + }, + { + "coord": "org.elasticsearch.plugin:aggs-matrix-stats-client:7.6.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/plugin/aggs-matrix-stats-client/7.6.0/aggs-matrix-stats-client-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/plugin/aggs-matrix-stats-client/7.6.0/aggs-matrix-stats-client-7.6.0.jar" + ], + "sha256": "9f39afe82a4ca92f4c9e1a92ac6ff55bc88535d5c8f4b6ff283e7038c56e8291", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/plugin/aggs-matrix-stats-client/7.6.0/aggs-matrix-stats-client-7.6.0.jar" + }, + { + "coord": "org.elasticsearch.plugin:lang-mustache-client:7.6.0", + "dependencies": [ + "com.github.spullara.mustache.java:compiler:0.9.6" + ], + "directDependencies": [ + "com.github.spullara.mustache.java:compiler:0.9.6" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/plugin/lang-mustache-client/7.6.0/lang-mustache-client-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/plugin/lang-mustache-client/7.6.0/lang-mustache-client-7.6.0.jar" + ], + "sha256": "12b9c4b3148d79be253053f99b69af13f83d88c88fc71ed4cfad393300fbd068", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/plugin/lang-mustache-client/7.6.0/lang-mustache-client-7.6.0.jar" + }, + { + "coord": "org.elasticsearch.plugin:mapper-extras-client:7.6.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/plugin/mapper-extras-client/7.6.0/mapper-extras-client-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/plugin/mapper-extras-client/7.6.0/mapper-extras-client-7.6.0.jar" + ], + "sha256": "ac0ff02870f8302e53e23cd84f0a48c9b20305663f1273b4f86b3cd6cdb7389f", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/plugin/mapper-extras-client/7.6.0/mapper-extras-client-7.6.0.jar" + }, + { + "coord": "org.elasticsearch.plugin:parent-join-client:7.6.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/plugin/parent-join-client/7.6.0/parent-join-client-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/plugin/parent-join-client/7.6.0/parent-join-client-7.6.0.jar" + ], + "sha256": "e15236eaf1ed9512d80b58dbfd8bb7a298a9f2fecd72d810a35eaf2dd35e5c14", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/plugin/parent-join-client/7.6.0/parent-join-client-7.6.0.jar" + }, + { + "coord": "org.elasticsearch.plugin:rank-eval-client:7.6.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/plugin/rank-eval-client/7.6.0/rank-eval-client-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/plugin/rank-eval-client/7.6.0/rank-eval-client-7.6.0.jar" + ], + "sha256": "f0e49cb69c47e49ad7fc8ef1e439b53352fdad0336b105caf3e4915a0ad0685d", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/plugin/rank-eval-client/7.6.0/rank-eval-client-7.6.0.jar" + }, + { + "coord": "org.elasticsearch.test:framework:7.6.0", + "dependencies": [ + "org.apache.httpcomponents:httpclient:4.5.10", + "org.apache.lucene:lucene-misc:8.4.0", + "org.apache.lucene:lucene-backward-codecs:8.4.0", + "net.sf.jopt-simple:jopt-simple:5.0.2", + "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.11", + "org.apache.lucene:lucene-queries:8.4.0", + "org.elasticsearch:elasticsearch-cli:7.6.0", + "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.11", + "com.tdunning:t-digest:3.2", + "org.apache.lucene:lucene-test-framework:8.4.0", + "com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.1", + "org.elasticsearch:elasticsearch-x-content:7.6.0", + "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.11", + "org.apache.logging.log4j:log4j-api:2.11.1", + "joda-time:joda-time:2.10.4", + "org.apache.lucene:lucene-join:8.4.0", + "org.hdrhistogram:HdrHistogram:2.1.9", + "org.apache.lucene:lucene-spatial:8.4.0", + "junit:junit:4.12", + "org.elasticsearch.client:elasticsearch-rest-client-sniffer:7.6.0", + "org.elasticsearch:elasticsearch-secure-sm:7.6.0", + "org.hamcrest:hamcrest:2.1", + "org.apache.lucene:lucene-spatial3d:8.4.0", + "org.apache.httpcomponents:httpcore-nio:4.4.12", + "commons-logging:commons-logging:1.1.3", + "commons-codec:commons-codec:1.11", + "org.apache.lucene:lucene-highlighter:8.4.0", + "org.apache.lucene:lucene-codecs:8.4.0", + "org.apache.lucene:lucene-queryparser:8.4.0", + "org.apache.lucene:lucene-core:8.4.0", + "com.carrotsearch:hppc:0.8.1", + "org.elasticsearch:mocksocket:1.2", + "org.apache.httpcomponents:httpasyncclient:4.1.4", + "org.elasticsearch.client:elasticsearch-rest-client:7.6.0", + "org.apache.lucene:lucene-analyzers-common:8.4.0", + "org.elasticsearch:securemock:1.2", + "org.elasticsearch:elasticsearch-core:7.6.0", + "org.yaml:snakeyaml:1.17", + "org.elasticsearch:elasticsearch-geo:7.6.0", + "org.apache.lucene:lucene-sandbox:8.4.0", + "org.apache.lucene:lucene-memory:8.4.0", + "org.apache.lucene:lucene-spatial-extras:8.4.0", + "org.elasticsearch:jna:4.5.1", + "org.apache.lucene:lucene-suggest:8.4.0", + "org.elasticsearch:elasticsearch:7.6.0", + "org.apache.httpcomponents:httpcore:4.4.12", + "org.apache.lucene:lucene-grouping:8.4.0", + "org.elasticsearch:elasticsearch-nio:7.6.0", + "com.fasterxml.jackson.core:jackson-core:2.8.11" + ], + "directDependencies": [ + "org.elasticsearch:elasticsearch-cli:7.6.0", + "org.apache.lucene:lucene-test-framework:8.4.0", + "com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.1", + "junit:junit:4.12", + "org.elasticsearch.client:elasticsearch-rest-client-sniffer:7.6.0", + "org.hamcrest:hamcrest:2.1", + "commons-logging:commons-logging:1.1.3", + "commons-codec:commons-codec:1.11", + "org.apache.lucene:lucene-codecs:8.4.0", + "org.elasticsearch:mocksocket:1.2", + "org.elasticsearch.client:elasticsearch-rest-client:7.6.0", + "org.elasticsearch:securemock:1.2", + "org.elasticsearch:elasticsearch:7.6.0", + "org.elasticsearch:elasticsearch-nio:7.6.0" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/test/framework/7.6.0/framework-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/test/framework/7.6.0/framework-7.6.0.jar" + ], + "sha256": "5733ca92a7278d20a429d4b12b0cf5e0f9724b62bded49277d4f8550ab403459", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/test/framework/7.6.0/framework-7.6.0.jar" + }, + { + "coord": "org.elasticsearch:elasticsearch-cli:7.6.0", + "dependencies": [ + "net.sf.jopt-simple:jopt-simple:5.0.2", + "org.elasticsearch:elasticsearch-core:7.6.0" + ], + "directDependencies": [ + "net.sf.jopt-simple:jopt-simple:5.0.2", + "org.elasticsearch:elasticsearch-core:7.6.0" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/elasticsearch-cli/7.6.0/elasticsearch-cli-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-cli/7.6.0/elasticsearch-cli-7.6.0.jar" + ], + "sha256": "096a1d718721e16e7a7e1c0421f827defa18f5af3921e7dbd4c5395ddefc70f1", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-cli/7.6.0/elasticsearch-cli-7.6.0.jar" + }, + { + "coord": "org.elasticsearch:elasticsearch-core:7.6.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/elasticsearch-core/7.6.0/elasticsearch-core-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-core/7.6.0/elasticsearch-core-7.6.0.jar" + ], + "sha256": "e4a9fccc821afaa96d36cb15e9fb8fe578f60e424007792774a2ff1fed6fa87e", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-core/7.6.0/elasticsearch-core-7.6.0.jar" + }, + { + "coord": "org.elasticsearch:elasticsearch-geo:7.6.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/elasticsearch-geo/7.6.0/elasticsearch-geo-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-geo/7.6.0/elasticsearch-geo-7.6.0.jar" + ], + "sha256": "9c7e9232a1896d74232aefa9974849e15c9baa163958524657c36d61ac33c240", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-geo/7.6.0/elasticsearch-geo-7.6.0.jar" + }, + { + "coord": "org.elasticsearch:elasticsearch-nio:7.6.0", + "dependencies": [ + "org.elasticsearch:elasticsearch-core:7.6.0" + ], + "directDependencies": [ + "org.elasticsearch:elasticsearch-core:7.6.0" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/elasticsearch-nio/7.6.0/elasticsearch-nio-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-nio/7.6.0/elasticsearch-nio-7.6.0.jar" + ], + "sha256": "dad28fd579e98f190dbdcc568abdf8d6057fb095b7ce55ec10e53367fc0d4606", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-nio/7.6.0/elasticsearch-nio-7.6.0.jar" + }, + { + "coord": "org.elasticsearch:elasticsearch-secure-sm:7.6.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/elasticsearch-secure-sm/7.6.0/elasticsearch-secure-sm-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-secure-sm/7.6.0/elasticsearch-secure-sm-7.6.0.jar" + ], + "sha256": "d552c197fbb3c62a055e408f418185d9f22b633a57d77ce037ca205f9c1778c0", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-secure-sm/7.6.0/elasticsearch-secure-sm-7.6.0.jar" + }, + { + "coord": "org.elasticsearch:elasticsearch-x-content:7.6.0", + "dependencies": [ + "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.11", + "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.11", + "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.11", + "org.elasticsearch:elasticsearch-core:7.6.0", + "org.yaml:snakeyaml:1.17", + "com.fasterxml.jackson.core:jackson-core:2.8.11" + ], + "directDependencies": [ + "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.11", + "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.11", + "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.11", + "org.elasticsearch:elasticsearch-core:7.6.0", + "org.yaml:snakeyaml:1.17", + "com.fasterxml.jackson.core:jackson-core:2.8.11" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/elasticsearch-x-content/7.6.0/elasticsearch-x-content-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-x-content/7.6.0/elasticsearch-x-content-7.6.0.jar" + ], + "sha256": "bcc76c30825da8d7db750764aaf872bf356d7a85ba3307823b97bf3a6c2f1a3e", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-x-content/7.6.0/elasticsearch-x-content-7.6.0.jar" + }, + { + "coord": "org.elasticsearch:elasticsearch:7.6.0", + "dependencies": [ + "org.apache.lucene:lucene-misc:8.4.0", + "org.apache.lucene:lucene-backward-codecs:8.4.0", + "net.sf.jopt-simple:jopt-simple:5.0.2", + "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.11", + "org.apache.lucene:lucene-queries:8.4.0", + "org.elasticsearch:elasticsearch-cli:7.6.0", + "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.11", + "com.tdunning:t-digest:3.2", + "org.elasticsearch:elasticsearch-x-content:7.6.0", + "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.11", + "org.apache.logging.log4j:log4j-api:2.11.1", + "joda-time:joda-time:2.10.4", + "org.apache.lucene:lucene-join:8.4.0", + "org.hdrhistogram:HdrHistogram:2.1.9", + "org.apache.lucene:lucene-spatial:8.4.0", + "org.elasticsearch:elasticsearch-secure-sm:7.6.0", + "org.apache.lucene:lucene-spatial3d:8.4.0", + "org.apache.lucene:lucene-highlighter:8.4.0", + "org.apache.lucene:lucene-queryparser:8.4.0", + "org.apache.lucene:lucene-core:8.4.0", + "com.carrotsearch:hppc:0.8.1", + "org.apache.lucene:lucene-analyzers-common:8.4.0", + "org.elasticsearch:elasticsearch-core:7.6.0", + "org.yaml:snakeyaml:1.17", + "org.elasticsearch:elasticsearch-geo:7.6.0", + "org.apache.lucene:lucene-sandbox:8.4.0", + "org.apache.lucene:lucene-memory:8.4.0", + "org.apache.lucene:lucene-spatial-extras:8.4.0", + "org.elasticsearch:jna:4.5.1", + "org.apache.lucene:lucene-suggest:8.4.0", + "org.apache.lucene:lucene-grouping:8.4.0", + "com.fasterxml.jackson.core:jackson-core:2.8.11" + ], + "directDependencies": [ + "org.apache.lucene:lucene-misc:8.4.0", + "org.apache.lucene:lucene-backward-codecs:8.4.0", + "org.apache.lucene:lucene-queries:8.4.0", + "org.elasticsearch:elasticsearch-cli:7.6.0", + "com.tdunning:t-digest:3.2", + "org.elasticsearch:elasticsearch-x-content:7.6.0", + "org.apache.logging.log4j:log4j-api:2.11.1", + "joda-time:joda-time:2.10.4", + "org.apache.lucene:lucene-join:8.4.0", + "org.hdrhistogram:HdrHistogram:2.1.9", + "org.apache.lucene:lucene-spatial:8.4.0", + "org.elasticsearch:elasticsearch-secure-sm:7.6.0", + "org.apache.lucene:lucene-spatial3d:8.4.0", + "org.apache.lucene:lucene-highlighter:8.4.0", + "org.apache.lucene:lucene-queryparser:8.4.0", + "org.apache.lucene:lucene-core:8.4.0", + "com.carrotsearch:hppc:0.8.1", + "org.apache.lucene:lucene-analyzers-common:8.4.0", + "org.elasticsearch:elasticsearch-core:7.6.0", + "org.elasticsearch:elasticsearch-geo:7.6.0", + "org.apache.lucene:lucene-sandbox:8.4.0", + "org.apache.lucene:lucene-memory:8.4.0", + "org.apache.lucene:lucene-spatial-extras:8.4.0", + "org.elasticsearch:jna:4.5.1", + "org.apache.lucene:lucene-suggest:8.4.0", + "org.apache.lucene:lucene-grouping:8.4.0" + ], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/elasticsearch/7.6.0/elasticsearch-7.6.0.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/7.6.0/elasticsearch-7.6.0.jar" + ], + "sha256": "21e30e597d8452a5348956e16d723bd05b1b37b8c687290464351d402d3ea2cd", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/7.6.0/elasticsearch-7.6.0.jar" + }, + { + "coord": "org.elasticsearch:jna:4.5.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/jna/4.5.1/jna-4.5.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/jna/4.5.1/jna-4.5.1.jar" + ], + "sha256": "8b95d97d2ba3235097a973fa4ddb4b1e5ccc0f91fa75a9e2fdcddcb35bf02217", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/jna/4.5.1/jna-4.5.1.jar" + }, + { + "coord": "org.elasticsearch:mocksocket:1.2", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/mocksocket/1.2/mocksocket-1.2.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/mocksocket/1.2/mocksocket-1.2.jar" + ], + "sha256": "630f27aa2c6d2929795707f7c06af88aad9f6d6bd9b89503afaf7e76321c5c61", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/mocksocket/1.2/mocksocket-1.2.jar" + }, + { + "coord": "org.elasticsearch:securemock:1.2", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/elasticsearch/securemock/1.2/securemock-1.2.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/elasticsearch/securemock/1.2/securemock-1.2.jar" + ], + "sha256": "dd54abf70274bdae8530ebac254c5e3378a550e276ce91e4248eb4a45249c68d", + "url": "https://repo1.maven.org/maven2/org/elasticsearch/securemock/1.2/securemock-1.2.jar" + }, + { + "coord": "org.hamcrest:hamcrest-core:1.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" + ], + "sha256": "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9", + "url": "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" + }, + { + "coord": "org.hamcrest:hamcrest:2.1", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/hamcrest/hamcrest/2.1/hamcrest-2.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/hamcrest/hamcrest/2.1/hamcrest-2.1.jar" + ], + "sha256": "ba93b2e3a562322ba432f0a1b53addcc55cb188253319a020ed77f824e692050", + "url": "https://repo1.maven.org/maven2/org/hamcrest/hamcrest/2.1/hamcrest-2.1.jar" + }, + { + "coord": "org.hdrhistogram:HdrHistogram:2.1.9", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar" + ], + "sha256": "95d40913be28dfd439cefea9170c40898ea84f11f25e6ff8de50339b8a7b5e3e", + "url": "https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar" + }, + { + "coord": "org.mockito:mockito-core:3.5.13", + "dependencies": [ + "net.bytebuddy:byte-buddy-agent:1.10.15", + "net.bytebuddy:byte-buddy:1.10.15", + "org.objenesis:objenesis:3.1" + ], + "directDependencies": [ + "net.bytebuddy:byte-buddy:1.10.15", + "net.bytebuddy:byte-buddy-agent:1.10.15", + "org.objenesis:objenesis:3.1" + ], + "file": "v1/https/repo1.maven.org/maven2/org/mockito/mockito-core/3.5.13/mockito-core-3.5.13.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/mockito/mockito-core/3.5.13/mockito-core-3.5.13.jar" + ], + "sha256": "406d5493a277d57ce0607fa23e0a5022c038fa813fce04f7579ed4bfc471bb1c", + "url": "https://repo1.maven.org/maven2/org/mockito/mockito-core/3.5.13/mockito-core-3.5.13.jar" + }, + { + "coord": "org.mockito:mockito-inline:3.5.13", + "dependencies": [ + "net.bytebuddy:byte-buddy-agent:1.10.15", + "org.mockito:mockito-core:3.5.13", + "net.bytebuddy:byte-buddy:1.10.15", + "org.objenesis:objenesis:3.1" + ], + "directDependencies": [ + "org.mockito:mockito-core:3.5.13" + ], + "file": "v1/https/repo1.maven.org/maven2/org/mockito/mockito-inline/3.5.13/mockito-inline-3.5.13.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/mockito/mockito-inline/3.5.13/mockito-inline-3.5.13.jar" + ], + "sha256": "f6659305159bb5bc24492b464ce18274f29ab2332f3dfa5cc8e31084413511b7", + "url": "https://repo1.maven.org/maven2/org/mockito/mockito-inline/3.5.13/mockito-inline-3.5.13.jar" + }, + { + "coord": "org.objenesis:objenesis:3.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/objenesis/objenesis/3.1/objenesis-3.1.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/objenesis/objenesis/3.1/objenesis-3.1.jar" + ], + "sha256": "cdb3d038c188de6f46ffd5cd930be2d5e5dba59c53b26437995d534e3db2fb80", + "url": "https://repo1.maven.org/maven2/org/objenesis/objenesis/3.1/objenesis-3.1.jar" + }, + { + "coord": "org.slf4j:slf4j-api:1.7.25", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" + ], + "sha256": "18c4a0095d5c1da6b817592e767bb23d29dd2f560ad74df75ff3961dbde25b79", + "url": "https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" + }, + { + "coord": "org.yaml:snakeyaml:1.17", + "dependencies": [], + "directDependencies": [], + "exclusions": [ + "*:*" + ], + "file": "v1/https/repo1.maven.org/maven2/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar", + "mirror_urls": [ + "https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar" + ], + "sha256": "5666b36f9db46f06dd5a19d73bbff3b588d5969c0f4b8848fde0f5ec849430a5", + "url": "https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar" + } + ], + "version": "0.1.0" + } +} diff --git a/project/Build.scala b/project/Build.scala deleted file mode 100644 index a2b3d3c..0000000 --- a/project/Build.scala +++ /dev/null @@ -1,67 +0,0 @@ -import java.io.File - -import sbt.Keys._ -import sbt._ - -object Build extends sbt.Build { - - val javaVersion = "1.8" - - lazy val esVersion = SettingKey[String]("Elasticsearch version") - - lazy val restlog = Project( - id = "es-restlog", - base = file(".") - ).settings( - organization := "es-restlog", - version := "0.4", - esVersion := "2.1.1", - description := "REST request logging for Elasticsearch", - autoScalaLibrary := false, - crossPaths := false, - javacOptions ++= Seq("-source", javaVersion, "-target", javaVersion) - ).settings( - pack <<= packTask - ).settings( - libraryDependencies ++= Seq( - "org.elasticsearch" % "elasticsearch" % esVersion.value % "provided" - ) - ) - - lazy val pack = TaskKey[File]("pack") - - def packTask = Def.task { - val esVersionQualifier = s"es_${esVersion.value.replace('.', '_')}" - val archive = target.value / s"${name.value}-${version.value}-$esVersionQualifier.zip" - - println(archive) - - val pluginDescriptorFile = { - val f = File.createTempFile(name.value, "tmp") - IO.write(f, - s"""name=${name.value} - |version=${version.value} - |description=${description.value} - |site=false - |jvm=true - |classname=com.etsy.elasticsearch.restlog.RestlogPlugin - |java.version=$javaVersion - |elasticsearch.version=${esVersion.value} - |""".stripMargin) - f - } - - val jar = (packageBin in Compile).value - - IO.zip( - Seq(jar -> jar.getName, pluginDescriptorFile -> "plugin-descriptor.properties") - ++ update.value.matching(configurationFilter("runtime")).map(f => f -> f.getName), - archive - ) - - pluginDescriptorFile.delete() - - archive - } - -} diff --git a/project/build.properties b/project/build.properties deleted file mode 100644 index 817bc38..0000000 --- a/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=0.13.9 diff --git a/src/main/java/com/etsy/elasticsearch/restlog/BUILD.bazel b/src/main/java/com/etsy/elasticsearch/restlog/BUILD.bazel new file mode 100644 index 0000000..f355b57 --- /dev/null +++ b/src/main/java/com/etsy/elasticsearch/restlog/BUILD.bazel @@ -0,0 +1,58 @@ +load("//:version.bzl", "elasticsearch_version") + +restlog_versioned_name = "restlog-%s" % elasticsearch_version # java_library will be librestlog-x.y.z.jar + +java_library( + name = restlog_versioned_name, + srcs = glob(["*.java"]), + visibility = ["//visibility:public"], + deps = [ + "@jvm_deps//:com_google_guava_guava", + "@jvm_deps//:org_apache_logging_log4j_log4j_api", + "@jvm_deps//:org_elasticsearch_elasticsearch", + "@jvm_deps//:org_elasticsearch_elasticsearch_x_content", + ], +) + +genrule( + name = "plugin_properties", + srcs = [], + outs = ["plugin-descriptor.properties"], + cmd = """cat << EOF > $@ +name=es-restlog +version=HEAD +description=REST request logging for Elasticsearch +classname=com.etsy.elasticsearch.restlog.RestlogPlugin +java.version=11 +elasticsearch.version=%s +EOF +""" % elasticsearch_version, + visibility = ["//visibility:public"], +) + +filegroup( + name = "restlog_plugin_dir", + srcs = [ + restlog_versioned_name, + ":plugin_properties", + # This runtime dependency must be explicitly included in the plugin. We can't use `java_binary` to + # automatically bundle dependencies because that would also pick up ES's classes, and ES fails at startup if + # any plugin includes the ES classes. + # N.B.: `data-snapshots-internal` does not seem to be getting updated jars. + "@jvm_deps//:com_google_guava_guava_29_0_jre", + ], + visibility = ["//visibility:public"], +) + +genrule( + name = "restlog_plugin_versioned", + srcs = [ + ":restlog_plugin_dir", + ], + outs = ["restlog-plugin-%s.zip" % elasticsearch_version], + # --must-match enforces that files are + # readable (instead of making an empty zip with a warning). + # --junk-paths stores just the file without paths + cmd = "zip --must-match --recurse-paths --junk-paths $@ $(SRCS)", + visibility = ["//visibility:public"], +) diff --git a/src/main/java/com/etsy/elasticsearch/restlog/ContentEncoder.java b/src/main/java/com/etsy/elasticsearch/restlog/ContentEncoder.java index f2cfb56..05e0a88 100644 --- a/src/main/java/com/etsy/elasticsearch/restlog/ContentEncoder.java +++ b/src/main/java/com/etsy/elasticsearch/restlog/ContentEncoder.java @@ -1,17 +1,17 @@ package com.etsy.elasticsearch.restlog; import com.google.common.io.BaseEncoding; -import org.elasticsearch.common.xcontent.XContentHelper; - import java.io.IOException; +import org.elasticsearch.common.bytes.BytesReference; +import org.elasticsearch.common.xcontent.XContentHelper; +import org.elasticsearch.common.xcontent.XContentType; public enum ContentEncoder { - JSON { @Override - public String encode(byte[] data, int offset, int len) { + public String encode(BytesReference content) { try { - return XContentHelper.convertToJson(data, offset, len, true); + return XContentHelper.convertToJson(content, true, XContentType.JSON); } catch (IOException e) { return "_failed_to_convert_"; } @@ -19,17 +19,16 @@ public String encode(byte[] data, int offset, int len) { }, BASE64 { @Override - public String encode(byte[] data, int offset, int len) { - return BaseEncoding.base64().encode(data, offset, len); + public String encode(BytesReference content) { + return BaseEncoding.base64().encode(BytesReference.toBytes(content)); } }, HEX { @Override - String encode(byte[] data, int offset, int len) { - return BaseEncoding.base16().encode(data, offset, len); + String encode(BytesReference content) { + return BaseEncoding.base16().encode(BytesReference.toBytes(content)); } }; - abstract String encode(byte[] data, int offset, int len); - + abstract String encode(BytesReference content); } diff --git a/src/main/java/com/etsy/elasticsearch/restlog/RestLoggerFilter.java b/src/main/java/com/etsy/elasticsearch/restlog/RestLoggerFilter.java index e9d8330..07ce089 100644 --- a/src/main/java/com/etsy/elasticsearch/restlog/RestLoggerFilter.java +++ b/src/main/java/com/etsy/elasticsearch/restlog/RestLoggerFilter.java @@ -1,61 +1,93 @@ package com.etsy.elasticsearch.restlog; import com.google.common.base.Joiner; +import java.util.Objects; +import java.util.function.Predicate; +import java.util.function.UnaryOperator; +import java.util.regex.Pattern; +import org.apache.logging.log4j.Logger; +import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.logging.ESLogger; -import org.elasticsearch.common.logging.ESLoggerFactory; +import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestChannel; -import org.elasticsearch.rest.RestFilter; -import org.elasticsearch.rest.RestFilterChain; +import org.elasticsearch.rest.RestHandler; import org.elasticsearch.rest.RestRequest; -import java.util.function.Predicate; -import java.util.regex.Pattern; - -final class RestLoggerFilter extends RestFilter { +final class RestLoggerFilter implements UnaryOperator { - private final ESLogger log; + private final Logger log; private final Predicate pathFilter; private final ContentEncoder contentEncoder; private final Joiner joiner; + private final String requestUuidHeader; public RestLoggerFilter(Settings settings) { - log = ESLoggerFactory.getLogger(settings.get("restlog.category", "restlog")); + log = Loggers.getLogger(RestlogPlugin.class, settings.get("restlog.category", "restlog")); pathFilter = pathFilter(settings.get("restlog.path_regex", "")); contentEncoder = encoder(settings.get("restlog.content_encoding", "json")); joiner = Joiner.on(" ").useForNull(settings.get("restlog.null_value", "-")); + requestUuidHeader = settings.get("restlog.uuid_header", ""); } @Override - public void process(RestRequest restRequest, RestChannel restChannel, RestFilterChain restFilterChain) throws Exception { - try { - if (log.isInfoEnabled() && pathFilter.test(restRequest.rawPath())) { - log.info( - joiner.join( - System.currentTimeMillis(), - restRequest.getLocalAddress(), - restRequest.getRemoteAddress(), - restRequest.method(), - restRequest.uri(), - encodeContent(restRequest.content()) - ) - ); + public RestHandler apply(RestHandler restHandler) { + if (log.isInfoEnabled()) { + return new LoggingRestHandler(restHandler); + } + return restHandler; + } + + class LoggingRestHandler implements RestHandler { + private final RestHandler wrapped; + + public LoggingRestHandler(RestHandler wrapped) { + this.wrapped = wrapped; + } + + @Override + public void handleRequest(RestRequest request, RestChannel channel, NodeClient client) + throws Exception { + try { + if (pathFilter.test(request.rawPath())) { + String requestUuidValue = null; + if (!requestUuidHeader.equals("")) { + requestUuidValue = request.header(requestUuidHeader); + } + String content = request.hasContent() ? encodeContent(request.content()) : "-"; + log.info( + joiner.join( + System.currentTimeMillis(), + request.getHttpChannel().getLocalAddress(), + request.getHttpChannel().getRemoteAddress(), + request.method(), + request.uri(), + Objects.requireNonNullElse(requestUuidValue, "-"), + content)); + } + } catch (Exception e) { + // errors shouldn't happen, but if they do, prevent it from interfering with + // request-processing + // don't want to emit weird log lines using `log` either, so just send a strace to stderr + e.printStackTrace(System.err); } - } catch (Exception e) { - // errors shouldn't happen, but if they do, prevent it from interfering with request-processing - // don't want to emit weird log lines using `log` either, so just send a strace to stderr - e.printStackTrace(System.err); + wrapped.handleRequest(request, channel, client); + } + + @Override + public boolean canTripCircuitBreaker() { + return wrapped.canTripCircuitBreaker(); + } + + @Override + public boolean supportsContentStream() { + return wrapped.supportsContentStream(); } - restFilterChain.continueProcessing(restRequest, restChannel); } private String encodeContent(BytesReference content) { if (content == null) return null; - final int offset = content.arrayOffset(); - final int length = content.length(); - if (length - offset == 0) return null; - return contentEncoder.encode(content.array(), offset, length); + return contentEncoder.encode(content); } private static Predicate pathFilter(String re) { @@ -71,5 +103,4 @@ private static ContentEncoder encoder(String type) { } return encoder; } - } diff --git a/src/main/java/com/etsy/elasticsearch/restlog/RestlogPlugin.java b/src/main/java/com/etsy/elasticsearch/restlog/RestlogPlugin.java index 0c5506e..d370b20 100644 --- a/src/main/java/com/etsy/elasticsearch/restlog/RestlogPlugin.java +++ b/src/main/java/com/etsy/elasticsearch/restlog/RestlogPlugin.java @@ -1,39 +1,44 @@ package com.etsy.elasticsearch.restlog; -import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.inject.Module; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Function; +import java.util.function.UnaryOperator; +import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.util.concurrent.ThreadContext; +import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.rest.RestController; +import org.elasticsearch.rest.RestHandler; -import java.util.Collection; -import java.util.Collections; +public class RestlogPlugin extends Plugin implements ActionPlugin { -public class RestlogPlugin extends Plugin { + private final Settings settings; - @Override - public String name() { - return "es-restlog"; + public RestlogPlugin(Settings settings) { + this.settings = settings; } @Override - public String description() { - return "REST request logging for Elasticsearch"; + public UnaryOperator getRestHandlerWrapper(ThreadContext threadContext) { + return new RestLoggerFilter(this.settings); } @Override - public Collection nodeModules() { - final Module restLoggerModule = binder -> binder.bind(RestLogger.class).asEagerSingleton(); - return Collections.singleton(restLoggerModule); - } - - public static class RestLogger { - - @Inject - public RestLogger(RestController restController, Settings settings) { - restController.registerFilter(new RestLoggerFilter(settings)); - } - + public List> getSettings() { + List> settings = new ArrayList<>(); + settings.add( + new Setting<>( + "restlog.category", "restlog", Function.identity(), Setting.Property.NodeScope)); + settings.add( + new Setting<>("restlog.path_regex", "", Function.identity(), Setting.Property.NodeScope)); + settings.add( + new Setting<>( + "restlog.content_encoding", "json", Function.identity(), Setting.Property.NodeScope)); + settings.add( + new Setting<>("restlog.null_value", "-", Function.identity(), Setting.Property.NodeScope)); + settings.add( + new Setting<>("restlog.uuid_header", "", Function.identity(), Setting.Property.NodeScope)); + return settings; } - } diff --git a/src/test/java/com/etsy/elasticsearch/restlog/BUILD.bazel b/src/test/java/com/etsy/elasticsearch/restlog/BUILD.bazel new file mode 100644 index 0000000..3f75e6d --- /dev/null +++ b/src/test/java/com/etsy/elasticsearch/restlog/BUILD.bazel @@ -0,0 +1,26 @@ +load("//:version.bzl", "elasticsearch_version") + +[java_test( + name = "{}".format(file.replace(".java", "")), + size = "small", + srcs = ["{}".format(file)], + runtime_deps = [ + "@jvm_deps//:org_apache_logging_log4j_log4j_slf4j_impl", + ], + deps = [ + "//src/main/java/com/etsy/elasticsearch/restlog:restlog-%s" % elasticsearch_version, + "@jvm_deps//:junit_junit", + "@jvm_deps//:org_apache_logging_log4j_log4j_core", + "@jvm_deps//:org_mockito_mockito_core", + "@jvm_deps//:org_mockito_mockito_inline", + "@jvm_deps//:org_slf4j_slf4j_api", + "@jvm_deps//:org_apache_logging_log4j_log4j_api", + "@jvm_deps//:org_elasticsearch_client_elasticsearch_rest_high_level_client", + "@jvm_deps//:org_elasticsearch_elasticsearch", + "@jvm_deps//:org_elasticsearch_test_framework", + "@jvm_deps//:org_elasticsearch_elasticsearch_x_content", + ], +) for file in [ + "RestLoggerFilterTest.java", + "RestlogPluginTest.java", +]] diff --git a/src/test/java/com/etsy/elasticsearch/restlog/RestLoggerFilterTest.java b/src/test/java/com/etsy/elasticsearch/restlog/RestLoggerFilterTest.java new file mode 100644 index 0000000..359fc1b --- /dev/null +++ b/src/test/java/com/etsy/elasticsearch/restlog/RestLoggerFilterTest.java @@ -0,0 +1,216 @@ +package com.etsy.elasticsearch.restlog; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.lang.reflect.Field; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import org.apache.logging.log4j.Logger; +import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.bytes.BytesArray; +import org.elasticsearch.common.bytes.BytesReference; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.xcontent.NamedXContentRegistry; +import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.rest.RestChannel; +import org.elasticsearch.rest.RestHandler; +import org.elasticsearch.rest.RestRequest; +import org.elasticsearch.test.rest.FakeRestChannel; +import org.elasticsearch.test.rest.FakeRestRequest; +import org.junit.Test; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; + +public class RestLoggerFilterTest { + /* This will hold the string passed to log.info as received by the mocked logger */ + private final LinkedList testingLogCalls = new LinkedList(); + + @Test + public void testRestlogNoSettings() throws Exception { + // clear any previous captured log calls just in case + testingLogCalls.clear(); + Logger mockLogger = getMockLogger(); + RestLoggerFilter rlogger = new RestLoggerFilter(Settings.EMPTY); + // Make sure we use our mocked logger + injectMockLogger(rlogger, mockLogger); + + TestRestHandler testRequestHandler = new TestRestHandler(); + RestHandler restHandler = rlogger.apply(testRequestHandler); + // ES data + BytesReference testContent = new BytesArray("{\"query\": {\"match_all\": {}} }"); + FakeRestRequest testReq = + new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY) + .withMethod(RestRequest.Method.POST) + .withPath("/index1/_search?routing=1") + .withContent(testContent, XContentType.JSON) + .build(); + FakeRestChannel testChannel = new FakeRestChannel(testReq, false, 1); + // actual call + restHandler.handleRequest(testReq, testChannel, mock(NodeClient.class)); + String outputLogLine = ((String) testingLogCalls.pop()); + assertTrue( + "restlog no settings, actual output: " + outputLogLine, + outputLogLine.contains("POST /index1/_search?routing=1 - {\"query\":{\"match_all\":{}}}")); + } + + @Test + public void testRestlogUUID() throws Exception { + // clear any previous captured log calls just in case + testingLogCalls.clear(); + Logger mockLogger = getMockLogger(); + Settings uuidHeader = + Settings.builder().put("restlog.uuid_header", "X-Query-Request-Uuid").build(); + RestLoggerFilter rlogger = new RestLoggerFilter(uuidHeader); + // Make sure we use our mocked logger + injectMockLogger(rlogger, mockLogger); + + TestRestHandler testRequestHandler = new TestRestHandler(); + RestHandler restHandler = rlogger.apply(testRequestHandler); + // ES data + Map> uuidHeaders = + Map.of("X-Query-Request-Uuid", Collections.singletonList("test-uuid")); + BytesReference testContent = new BytesArray("{\"query\": {\"match_all\": {}} }"); + FakeRestRequest testReq = + new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY) + .withMethod(RestRequest.Method.POST) + .withPath("/index1/_search?routing=1") + .withContent(testContent, XContentType.JSON) + .withHeaders(uuidHeaders) + .build(); + FakeRestChannel testChannel = new FakeRestChannel(testReq, false, 1); + // actual call + restHandler.handleRequest(testReq, testChannel, mock(NodeClient.class)); + String outputLogLine = ((String) testingLogCalls.pop()); + assertTrue( + "restlog uuid_header, actual output: " + outputLogLine, + outputLogLine.contains( + "POST /index1/_search?routing=1 test-uuid {\"query\":{\"match_all\":{}}}")); + } + + @Test + public void testRestlogInvalidJson() throws Exception { + testingLogCalls.clear(); + Logger mockLogger = getMockLogger(); + RestLoggerFilter rlogger = new RestLoggerFilter(Settings.EMPTY); + injectMockLogger(rlogger, mockLogger); + + TestRestHandler testRequestHandler = new TestRestHandler(); + RestHandler restHandler = rlogger.apply(testRequestHandler); + BytesReference testContent = new BytesArray("{\"query\": "); + FakeRestRequest testReq = + new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY) + .withMethod(RestRequest.Method.POST) + .withPath("/index1/_search?routing=1") + .withContent(testContent, XContentType.JSON) + .build(); + FakeRestChannel testChannel = new FakeRestChannel(testReq, false, 1); + restHandler.handleRequest(testReq, testChannel, mock(NodeClient.class)); + String outputLogLine = ((String) testingLogCalls.pop()); + assertTrue( + "restlog with invalid json, actual output: " + outputLogLine, + outputLogLine.contains("POST /index1/_search?routing=1 - _failed_to_convert_")); + } + + @Test + public void testRestlogBase64() throws Exception { + testingLogCalls.clear(); + Logger mockLogger = getMockLogger(); + Settings base64Encoding = Settings.builder().put("restlog.content_encoding", "base64").build(); + RestLoggerFilter rlogger = new RestLoggerFilter(base64Encoding); + injectMockLogger(rlogger, mockLogger); + + TestRestHandler testRequestHandler = new TestRestHandler(); + RestHandler restHandler = rlogger.apply(testRequestHandler); + BytesReference testContent = new BytesArray("{\"query\": {\"match_all\": {}} }"); + FakeRestRequest testReq = + new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY) + .withMethod(RestRequest.Method.POST) + .withPath("/index1/_search?routing=1") + .withContent(testContent, XContentType.JSON) + .build(); + FakeRestChannel testChannel = new FakeRestChannel(testReq, false, 1); + restHandler.handleRequest(testReq, testChannel, mock(NodeClient.class)); + String outputLogLine = ((String) testingLogCalls.pop()); + assertTrue( + "restlog with base64 encoding, actual output: " + outputLogLine, + outputLogLine.contains( + "POST /index1/_search?routing=1 - eyJxdWVyeSI6IHsibWF0Y2hfYWxsIjoge319IH0=")); + } + + @Test + public void testRestlogWithRegex() throws Exception { + testingLogCalls.clear(); + Logger mockLogger = getMockLogger(); + // configure regex for a specific path + Settings regexSetting = + Settings.builder().put("restlog.path_regex", "\\/_search\\/?\\??.*").build(); + RestLoggerFilter rlogger = new RestLoggerFilter(regexSetting); + injectMockLogger(rlogger, mockLogger); + + TestRestHandler testRequestHandler = new TestRestHandler(); + RestHandler restHandler = rlogger.apply(testRequestHandler); + BytesReference testContent = new BytesArray("{\"query\": {\"match_all\": {}} }"); + + FakeRestRequest testSearchReq = + new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY) + .withMethod(RestRequest.Method.POST) + .withPath("/index1/_search?routing=1") + .withContent(testContent, XContentType.JSON) + .build(); + FakeRestChannel testChannel = new FakeRestChannel(testSearchReq, false, 1); + restHandler.handleRequest(testSearchReq, testChannel, mock(NodeClient.class)); + String outputLogLine = ((String) testingLogCalls.pop()); + assertTrue( + "restlog contains search query, actual output: " + outputLogLine, + outputLogLine.contains("POST /index1/_search?routing=1 - {\"query\":{\"match_all\":{}}}")); + BytesReference testBulkContent = + new BytesArray( + "{\"index\":{\"_index\":\"test\",\"_id\":\"885895542-4\",\"_search\":\"72271777\"}"); + FakeRestRequest testBulk = + new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY) + .withMethod(RestRequest.Method.POST) + .withPath("/_bulk?timeout=1m") + .withContent(testBulkContent, XContentType.JSON) + .build(); + restHandler.handleRequest(testBulk, testChannel, mock(NodeClient.class)); + assertEquals("no restlog output", 0, testingLogCalls.size()); + } + + private Logger getMockLogger() { + Logger mockLogger = mock(Logger.class); + when(mockLogger.isInfoEnabled()).thenReturn(true); + + doAnswer( + new Answer() { + @Override + public Object answer(InvocationOnMock invocationOnMock) throws Throwable { + testingLogCalls.push(invocationOnMock.getArguments()[0]); + return null; + } + }) + .when(mockLogger) + .info(anyString()); + return mockLogger; + } + + private void injectMockLogger(RestLoggerFilter restLogFilter, Logger mockLogger) + throws NoSuchFieldException, IllegalAccessException { + Field injected = RestLoggerFilter.class.getDeclaredField("log"); + injected.setAccessible(true); + injected.set(restLogFilter, mockLogger); + } +} + +class TestRestHandler implements RestHandler { + + @Override + public void handleRequest(RestRequest request, RestChannel channel, NodeClient client) + throws Exception {} +} diff --git a/src/test/java/com/etsy/elasticsearch/restlog/RestlogPluginTest.java b/src/test/java/com/etsy/elasticsearch/restlog/RestlogPluginTest.java new file mode 100644 index 0000000..7b93b9b --- /dev/null +++ b/src/test/java/com/etsy/elasticsearch/restlog/RestlogPluginTest.java @@ -0,0 +1,46 @@ +package com.etsy.elasticsearch.restlog; + +import static org.junit.Assert.assertTrue; + +import java.util.List; +import org.elasticsearch.common.settings.Setting; +import org.elasticsearch.common.settings.Settings; +import org.junit.Test; + +public class RestlogPluginTest { + + @Test + public void testDefaultSettings() throws Exception { + Settings settings = Settings.EMPTY; + RestlogPlugin plugin = new RestlogPlugin(settings); + List> pluginSettings = plugin.getSettings(); + assertTrue( + "setting: restlog.category", + pluginSettings.stream() + .anyMatch( + item -> + item.match("restlog.category") + && item.getDefaultRaw(Settings.EMPTY).equals("restlog"))); + assertTrue( + "setting: restlog.path_regex", + pluginSettings.stream() + .anyMatch( + item -> + item.match("restlog.path_regex") + && item.getDefaultRaw(Settings.EMPTY).equals(""))); + assertTrue( + "setting: restlog.content_encoding", + pluginSettings.stream() + .anyMatch( + item -> + item.match("restlog.content_encoding") + && item.getDefaultRaw(Settings.EMPTY).equals("json"))); + assertTrue( + "setting: restlog.null_value", + pluginSettings.stream() + .anyMatch( + item -> + item.match("restlog.null_value") + && item.getDefaultRaw(Settings.EMPTY).equals("-"))); + } +} diff --git a/version.bzl b/version.bzl new file mode 100644 index 0000000..6c4b542 --- /dev/null +++ b/version.bzl @@ -0,0 +1,2 @@ +elasticsearch_version = "7.6.0" +