This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git


The following commit(s) were added to refs/heads/develop by this push:
     new ebfa2f7  ZookeeperMetaDataCollector init method add zk digest acl 
support (#911)
ebfa2f7 is described below

commit ebfa2f7b757c46c84c2fac34d555d2847b433e4c
Author: sage.xue <[email protected]>
AuthorDate: Fri Jul 1 21:05:20 2022 +0800

    ZookeeperMetaDataCollector init method add zk digest acl support (#911)
---
 .../registry/metadata/impl/ZookeeperMetaDataCollector.java     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/registry/metadata/impl/ZookeeperMetaDataCollector.java
 
b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/registry/metadata/impl/ZookeeperMetaDataCollector.java
index 3048f64..9bba742 100644
--- 
a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/registry/metadata/impl/ZookeeperMetaDataCollector.java
+++ 
b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/registry/metadata/impl/ZookeeperMetaDataCollector.java
@@ -53,7 +53,15 @@ public class ZookeeperMetaDataCollector implements 
MetaDataCollector {
             group = Constants.PATH_SEPARATOR + group;
         }
         root = group;
-        client = CuratorFrameworkFactory.newClient(url.getAddress(), new 
ExponentialBackoffRetry(1000, 3));
+        CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.
+                builder()
+                .connectString(url.getAddress())
+                .retryPolicy(new ExponentialBackoffRetry(1000, 3));
+        String userInformation = url.getUserInformation();
+        if (userInformation != null && userInformation.length() > 0) {
+            builder = builder.authorization("digest", 
userInformation.getBytes());
+        }
+        client = builder.build();
         client.start();
     }
 

Reply via email to