From 9cdab60b3f80fabb868e0f22b6c01c48c7a32f44 Mon Sep 17 00:00:00 2001 From: Manikumar Reddy O Date: Tue, 12 Jun 2018 14:28:58 +0530 Subject: [PATCH] KAFKA-6562: Make jackson-databind an optional clients dependency (#5110) Use `provided` scope in Maven. Reviewers: Rajini Sivaram , Ismael Juma --- build.gradle | 12 +++++++++++- docs/security.html | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 911ba09edecf..60476eebcf10 100644 --- a/build.gradle +++ b/build.gradle @@ -785,11 +785,20 @@ project(':examples') { project(':clients') { archivesBaseName = "kafka-clients" + configurations { + jacksonDatabindConfig + } + + // add jacksonDatabindConfig as provided scope config with high priority (1000) + conf2ScopeMappings.addMapping(1000, configurations.jacksonDatabindConfig, "provided") + dependencies { compile libs.lz4 compile libs.snappy compile libs.slf4jApi - compile libs.jacksonDatabind // for SASL/OAUTHBEARER bearer token parsing + compileOnly libs.jacksonDatabind // for SASL/OAUTHBEARER bearer token parsing + + jacksonDatabindConfig libs.jacksonDatabind // to publish as provided scope dependency. testCompile libs.bcpkix testCompile libs.junit @@ -798,6 +807,7 @@ project(':clients') { testCompile libs.powermockEasymock testRuntime libs.slf4jlog4j + testRuntime libs.jacksonDatabind } task determineCommitId { diff --git a/docs/security.html b/docs/security.html index 877ca579a52a..c1682ff8fbf9 100644 --- a/docs/security.html +++ b/docs/security.html @@ -715,6 +715,8 @@

7.3 Authentication using SASL security.protocol=SASL_SSL (or SASL_PLAINTEXT if non-production) sasl.mechanism=OAUTHBEARER +
  • The default implementation of SASL/OAUTHBEARER depends on the jackson-databind library. + Since it's an optional dependency, users have to configure it as a dependency via their build tool.
  • Unsecured Token Creation Options for SASL/OAUTHBEARER