From 42f34b578571e5f1c5a8bd4485e4710f8a5417b3 Mon Sep 17 00:00:00 2001 From: Mustafa Baser Date: Fri, 9 Aug 2024 12:12:18 +0300 Subject: [PATCH] fix: typo Signed-off-by: Mustafa Baser --- setup_app/utils/db_utils.py | 4 +++- templates/fido2/static-conf.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup_app/utils/db_utils.py b/setup_app/utils/db_utils.py index 3f735081..3a3196d4 100644 --- a/setup_app/utils/db_utils.py +++ b/setup_app/utils/db_utils.py @@ -411,7 +411,7 @@ def set_configuration(self, component, value, dn='ou=configuration,o=gluu'): self.cbm.exec_query(n1ql) - def dn_exists(self, dn): + def dn_exists(self, dn, check_only=False): mapping_location = self.get_backend_location_for_dn(dn) if mapping_location in (BackendTypes.MYSQL, BackendTypes.PGSQL): @@ -429,6 +429,8 @@ def dn_exists(self, dn): elif mapping_location == BackendTypes.LDAP: base.logIt("Querying LDAP for dn {}".format(dn)) result = self.ldap_conn.search(search_base=dn, search_filter='(objectClass=*)', search_scope=ldap3.BASE, attributes=['*']) + if check_only: + return result if result: key_doc = ldif_utils.get_document_from_entry(self.ldap_conn.response[0]['dn'], self.ldap_conn.response[0]['attributes']) if key_doc: diff --git a/templates/fido2/static-conf.json b/templates/fido2/static-conf.json index 37d22927..79ad355c 100644 --- a/templates/fido2/static-conf.json +++ b/templates/fido2/static-conf.json @@ -3,7 +3,7 @@ "configuration":"ou=configuration,o=gluu", "people":"ou=people,o=gluu", "scripts": "ou=scripts,o=gluu", - "attributes":"ou=attributes,o=jans", + "attributes":"ou=attributes,o=gluu", "sessions":"ou=sessions,o=gluu", "fido2Attestation":"ou=fido2_register,ou=fido2,o=gluu", "fido2Assertion":"ou=fido2_auth,ou=fido2,o=gluu",