From 005aa12dfb76c45284ae5024cf39ee17a8d3f55e Mon Sep 17 00:00:00 2001 From: Yuki Shiga Date: Wed, 9 Aug 2017 15:27:48 +0900 Subject: [PATCH] Make athenzConf and athenzPrincipalHeader configurable (#661) --- .../pulsar/client/impl/auth/AuthenticationAthenz.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java b/pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java index ad971c0d41205..fe218a965916b 100644 --- a/pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java +++ b/pulsar-client-auth-athenz/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationAthenz.java @@ -90,6 +90,12 @@ public void configure(Map authParams) { this.providerDomain = authParams.get("providerDomain"); this.privateKeyPath = authParams.get("privateKeyPath"); this.keyId = authParams.getOrDefault("keyId", "0"); + if (authParams.containsKey("athenzConfPath")) { + System.setProperty("athenz.athenz_conf", authParams.get("athenzConfPath")); + } + if (authParams.containsKey("principalHeader")) { + System.setProperty("athenz.auth.principal.header", authParams.get("principalHeader")); + } } @Override