From 2e3fdd5794743961e3dcf039b7506f33164456d0 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Fri, 15 Mar 2024 14:19:29 +0200 Subject: [PATCH] dna plugin: use global configuration for replica communication With https://github.com/389ds/389-ds-base/pull/6124, DNA plugin will be able to pick up dnaRemoteBindMethod and dnaRemoteConnProtocol from the global plugin entry and apply to all server entries automatically. We do not need anymore to wait until the server configuration entry is created and update it explicitly. Related: https://github.com/389ds/389-ds-base/issues/6123 Signed-off-by: Alexander Bokovoy --- install/share/dna.ldif | 7 ++++++- ipaserver/install/plugins/update_dna_shared_config.py | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/install/share/dna.ldif b/install/share/dna.ldif index 8660fdf5f70..1c6038c4054 100644 --- a/install/share/dna.ldif +++ b/install/share/dna.ldif @@ -38,4 +38,9 @@ dn: cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config changetype: modify replace: nsslapd-pluginEnabled nsslapd-pluginEnabled: on - +-- +add: dnaRemoteBindMethod +dnaRemoteBindMethod: SASL/GSSAPI +-- +add: dnaRemoteConnProtocol +dnaRemoteConnProtocol: LDAP diff --git a/ipaserver/install/plugins/update_dna_shared_config.py b/ipaserver/install/plugins/update_dna_shared_config.py index 955bee5dd83..6558958b96e 100644 --- a/ipaserver/install/plugins/update_dna_shared_config.py +++ b/ipaserver/install/plugins/update_dna_shared_config.py @@ -53,6 +53,11 @@ def get_shared_cfg(self, plugin_name): else: logger.debug('Found DNA config %s', dna_config_base) + remote_bind_method = entry.single_value.get("dnaRemoteBindMethod") + if remote_bind_method is not None: + logger.error( + "dnaRemoteBindMethod is set on the global DNA entry already.") + return None sharedcfgdn = entry.single_value.get("dnaSharedCfgDN") if sharedcfgdn is not None: sharedcfgdn = DN(sharedcfgdn)