-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01fac15
commit a70b5f6
Showing
2 changed files
with
324 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
module sonic-system-ldap { | ||
yang-version 1.1; | ||
namespace "http://github.com/Azure/sonic-system-ldap"; | ||
prefix ssys; | ||
|
||
import ietf-inet-types { | ||
prefix inet; | ||
} | ||
|
||
import sonic-port { | ||
prefix port; | ||
} | ||
|
||
import sonic-portchannel { | ||
prefix lag; | ||
} | ||
|
||
import sonic-loopback-interface { | ||
prefix loopback; | ||
} | ||
|
||
import sonic-interface { | ||
prefix interface; | ||
} | ||
|
||
import sonic-mgmt_port { | ||
prefix mgmt-port; | ||
} | ||
|
||
description "LDAP YANG Module for SONiC OS"; | ||
|
||
revision 2023-10-01 { | ||
description "First Revision"; | ||
} | ||
|
||
container sonic-system-ldap { | ||
|
||
container LDAP_SERVER { | ||
list LDAP_SERVER_LIST { | ||
max-elements 8; | ||
key "ipaddress"; | ||
|
||
leaf ipaddress { | ||
type inet:host; | ||
description | ||
"LDAP server's Domain name or IP address (IPv4 or IPv6)"; | ||
} | ||
|
||
leaf priority { | ||
default 1; | ||
type uint8 { | ||
range "1..8" { | ||
error-message "LDAP server priority must be 1..8"; | ||
} | ||
} | ||
description "Server priority"; | ||
} | ||
} | ||
|
||
container LDAP { | ||
|
||
container global { | ||
|
||
|
||
leaf bind_dn { | ||
type string { | ||
length "1..65"; | ||
} | ||
description | ||
'LDAP global bind dn'; | ||
} | ||
|
||
leaf bind_password { | ||
type string { | ||
length "1..65"; | ||
pattern "[^ #,]*" { | ||
error-message 'TACACS shared secret (Valid chars are ASCII printable except SPACE, "#", and ",")'; | ||
} | ||
} | ||
description "Shared secret used for encrypting the communication"; | ||
} | ||
|
||
leaf bind_timeout { | ||
default 5; | ||
type uint16 { | ||
range "1..120" { | ||
error-message "Ldap bind timeout must be 1..120"; | ||
} | ||
} | ||
description "Ldap bind timeout"; | ||
} | ||
|
||
leaf group_base_dn { | ||
type string { | ||
length "1..65"; | ||
} | ||
description "Ldap group base dn"; | ||
} | ||
|
||
leaf group_member_attribute { | ||
type string { | ||
length "1..65"; | ||
} | ||
description "Ldap group member attribute"; | ||
} | ||
|
||
leaf hostname_check { | ||
description "Ldap server hostname check"; | ||
default false; | ||
type boolean; | ||
} | ||
|
||
leaf ldap_version { | ||
default 3; | ||
type uint16 { | ||
range "1..3" { | ||
error-message "Ldap version must be 1..3"; | ||
} | ||
} | ||
description "Ldap version"; | ||
} | ||
|
||
leaf user_base_dn { | ||
type string { | ||
length "1..65"; | ||
} | ||
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; | ||
description "TCP port to communite with LDAP server"; | ||
} | ||
|
||
leaf referrals { | ||
description "Should Ldap referrals be enabled/disabled"; | ||
default true; | ||
type boolean; | ||
} | ||
|
||
leaf timeout { | ||
description "Ldap timeout duration in sec"; | ||
type uint16 { | ||
range "1..60" { | ||
error-message "LDAP timeout must be 1..60"; | ||
} | ||
} | ||
} | ||
} /* container global */ | ||
} /* container LDAP */ | ||
}/* container sonic-system-ldap */ | ||
}/* end of module sonic-system-ldap */ |