From 202eebf1da2a1074010ac3fe9387428202377071 Mon Sep 17 00:00:00 2001 From: Andriy Dobush Date: Mon, 2 Oct 2023 15:51:04 +0300 Subject: [PATCH] Add unit test and remove not needed parts --- doc/aaa/ldap/hld_ldap.md | 27 +++++++++++++-------------- doc/aaa/ldap/sonic-system-ldap.yang | 7 ------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/doc/aaa/ldap/hld_ldap.md b/doc/aaa/ldap/hld_ldap.md index b67562cd97..993e1807b3 100755 --- a/doc/aaa/ldap/hld_ldap.md +++ b/doc/aaa/ldap/hld_ldap.md @@ -117,7 +117,6 @@ LDAP_TABLE:{ " hostname_check ": {{False}} " ldap_version": {{3}} " user_base_dn": {{ou=users,dc=example,dc=com (string)}} - " login_name_attribute ": {{num}} " ldap_port": {{389}} " referrals": {{enabled}} " timeout": {{5 (duration_sec)}} @@ -145,10 +144,6 @@ uid=6000(test_admin), groups=1000(admin),4(adm),27(sudo),999(docker),1001(redis) not relevant -### Configuration and management -TODO restapi? -ngmi? - #### Manifest (if the feature is an Application Extension) not relevant @@ -286,13 +281,6 @@ module sonic-system-ldap { description "Ldap user base dn"; } - leaf login_name_attribute { - type string { - length "1..65"; - } - description "Ldap login name attribute"; - } - leaf ldap_port { type inet:port-number; default 389; @@ -412,7 +400,7 @@ Example of error flows: • Timeout • Loss of network connectivity -When LDAP login failed as result of authentication timeout. If configured fallback enabled(TBD: check if default in SONiC). The login flow will do the next follow the authentication method detected. +When LDAP login failed as result of authentication timeout the login flow will do the next following authentication method detected. If configured fallback enabled. Authentication failed – user will not be able to connect like regular authentication fail. ### Restrictions/Limitations @@ -443,7 +431,18 @@ AAA LDAP login configuration: - Configure AAA authentication login local, ldap #### Unit Test cases -TODO +#### Unit Test cases +Test changes in database affect end-point configuration. +Check config files after all config are set +- Configure base-dn +- Configure bind-dn +- Configure bind-password +- Configure ldap server-ip +- Configure group-attribute +- Configure ldap port +- Configure scope +- Configure timeout +- Configure version #### System Test cases diff --git a/doc/aaa/ldap/sonic-system-ldap.yang b/doc/aaa/ldap/sonic-system-ldap.yang index e9d2b52232..e7cf4e6d7d 100644 --- a/doc/aaa/ldap/sonic-system-ldap.yang +++ b/doc/aaa/ldap/sonic-system-ldap.yang @@ -127,13 +127,6 @@ module sonic-system-ldap { description "Ldap user base dn"; } - leaf login_name_attribute { - type string { - length "1..65"; - } - description "Ldap login name attribute"; - } - leaf ldap_port { type inet:port-number; default 389;