From a25e3f33b32ec25902fc9dc4e8d4068ae726e1b6 Mon Sep 17 00:00:00 2001 From: Tomasz Durda Date: Thu, 23 Nov 2023 11:49:04 +0100 Subject: [PATCH] Started work over minio admin (ldap) --- minio/minioadmin.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/minio/minioadmin.py b/minio/minioadmin.py index 95dea98df..e139e15e3 100644 --- a/minio/minioadmin.py +++ b/minio/minioadmin.py @@ -79,6 +79,8 @@ "SITE_REPLICATION_STATUS": "site-replication/status", "SITE_REPLICATION_EDIT": "site-replication/edit", "SITE_REPLICATION_REMOVE": "site-replication/remove", + "LDAP_ENTITIES": "idp/ldap/policy-entities", + "ENTITIES": "idp/builtin/policy-entities", }, ) @@ -336,6 +338,22 @@ def user_list(self): ) return plain_data.decode() + def entities(self): + """List all users""" + response = self._url_open("GET", _COMMAND.ENTITIES) + plain_data = decrypt( + response.data, self._provider.retrieve().secret_key + ) + return plain_data.decode() + + def ldap_entities(self): + """List all users""" + response = self._url_open("GET", _COMMAND.LDAP_ENTITIES) + plain_data = decrypt( + response.data, self._provider.retrieve().secret_key + ) + return plain_data.decode() + def group_add(self, group_name, members): """Add users a new or existing group.""" body = json.dumps({