diff options
Diffstat (limited to 'templates/service/snmp/v3/user')
12 files changed, 71 insertions, 0 deletions
diff --git a/templates/service/snmp/v3/user/node.def b/templates/service/snmp/v3/user/node.def new file mode 100644 index 00000000..e6a8bc87 --- /dev/null +++ b/templates/service/snmp/v3/user/node.def @@ -0,0 +1,6 @@ +tag: +type: txt +help: Specifies the user with name username +syntax:expression: pattern $VAR(@) "^[^-]*$" ; "characters '-' in name is not supported yet" +commit:expression: $VAR(auth/) != "" || $VAR(tsm-key/) != ""; "must specify auth or tsm-key" +commit:expression: $VAR(mode/) != ""; "must specify mode"
\ No newline at end of file diff --git a/templates/service/snmp/v3/user/node.tag/auth/encrypted-key/node.def b/templates/service/snmp/v3/user/node.tag/auth/encrypted-key/node.def new file mode 100644 index 00000000..3cf6bd31 --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/auth/encrypted-key/node.def @@ -0,0 +1,2 @@ +type: txt +help: Defines the encrypted key for authentication protocol diff --git a/templates/service/snmp/v3/user/node.tag/auth/node.def b/templates/service/snmp/v3/user/node.tag/auth/node.def new file mode 100644 index 00000000..68959a8e --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/auth/node.def @@ -0,0 +1,3 @@ +help: Specifies the auth +commit:expression: $VAR(type/) != "" ; "must specify type" +commit:expression: $VAR(plaintext-key/) != "" || $VAR(encrypted-key/) != "" ; "must specify plaintext-key or encrypted-key"
\ No newline at end of file diff --git a/templates/service/snmp/v3/user/node.tag/auth/plaintext-key/node.def b/templates/service/snmp/v3/user/node.tag/auth/plaintext-key/node.def new file mode 100644 index 00000000..4f840d7c --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/auth/plaintext-key/node.def @@ -0,0 +1,5 @@ +type: txt +help: Defines the key in the clear text for authentication protocol +syntax:expression: pattern $VAR(@) "^.{8,}$" ; "key must contain 8 or more characters" + +update:expression: $VAR(../encrypted-key/@) = ""
\ No newline at end of file diff --git a/templates/service/snmp/v3/user/node.tag/auth/type/node.def b/templates/service/snmp/v3/user/node.tag/auth/type/node.def new file mode 100644 index 00000000..5a2ffc52 --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/auth/type/node.def @@ -0,0 +1,8 @@ +type: txt +default: "md5" +help: Defines the protocol using for authentication +syntax:expression: $VAR(@) in "md5", "sha" +allowed: echo md5 sha + +val_help: md5; Message Digest 5 +val_help: sha; Secure Hash Algorithm
\ No newline at end of file diff --git a/templates/service/snmp/v3/user/node.tag/group/node.def b/templates/service/snmp/v3/user/node.tag/group/node.def new file mode 100644 index 00000000..66543579 --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/group/node.def @@ -0,0 +1,11 @@ +type: txt +help: Specifies group for user name +allowed: list=`cli-shell-api listNodes service snmp v3 group` + echo $list +syntax:expression:exec "regex=\"(^| )$VAR(@)( |$)\"; \ + if [[ \"$VAR(/service/snmp/v3/group/@@)\" =~ $regex ]] ; \ + then \ + exit 0; \ + else \ + exit 1; \ + fi" ; "You must create \"$VAR(@)\" group first" diff --git a/templates/service/snmp/v3/user/node.tag/mode/node.def b/templates/service/snmp/v3/user/node.tag/mode/node.def new file mode 100644 index 00000000..9855f5fb --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/mode/node.def @@ -0,0 +1,8 @@ +type: txt +default: "ro" +help: Specifies the mode for access rights of user, read only or write +syntax:expression: $VAR(@) in "ro", "rw" +allowed: echo ro rw + +val_help: ro; +val_help: rw; diff --git a/templates/service/snmp/v3/user/node.tag/privacy/encrypted-key/node.def b/templates/service/snmp/v3/user/node.tag/privacy/encrypted-key/node.def new file mode 100644 index 00000000..8feef111 --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/privacy/encrypted-key/node.def @@ -0,0 +1,2 @@ +type: txt +help: Defines the encrypted key for privacy protocol diff --git a/templates/service/snmp/v3/user/node.tag/privacy/node.def b/templates/service/snmp/v3/user/node.tag/privacy/node.def new file mode 100644 index 00000000..94bf850c --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/privacy/node.def @@ -0,0 +1,3 @@ +help: Specifies the privacy +commit:expression: $VAR(type/) != "" ; "must specify type" +commit:expression: $VAR(plaintext-key/) != "" || $VAR(encrypted-key/) != "" ; "must specify plaintext-key or encrypted-key"
\ No newline at end of file diff --git a/templates/service/snmp/v3/user/node.tag/privacy/plaintext-key/node.def b/templates/service/snmp/v3/user/node.tag/privacy/plaintext-key/node.def new file mode 100644 index 00000000..5d706712 --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/privacy/plaintext-key/node.def @@ -0,0 +1,5 @@ +type: txt +help: Defines the key in the clear text for protocol for privacy +syntax:expression: pattern $VAR(@) "^.{8,}$" ; "key must contain 8 or more characters" + +update:expression: $VAR(../encrypted-key/@) = ""
\ No newline at end of file diff --git a/templates/service/snmp/v3/user/node.tag/privacy/type/node.def b/templates/service/snmp/v3/user/node.tag/privacy/type/node.def new file mode 100644 index 00000000..bbfd5331 --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/privacy/type/node.def @@ -0,0 +1,8 @@ +type: txt +default: "des" +help: Defines the protocol for privacy +syntax:expression: $VAR(@) in "des", "aes" +allowed: echo des aes + +val_help: des; Data Encryption Standard +val_help: aes; Advanced Encryption Standard
\ No newline at end of file diff --git a/templates/service/snmp/v3/user/node.tag/tsm-key/node.def b/templates/service/snmp/v3/user/node.tag/tsm-key/node.def new file mode 100644 index 00000000..e9f55a5f --- /dev/null +++ b/templates/service/snmp/v3/user/node.tag/tsm-key/node.def @@ -0,0 +1,10 @@ +type: txt +help: Specifies finger print or file name of TSM certificate. +allowed: sudo ls /etc/snmp/tls/certs +syntax:expression: pattern $VAR(@) "^[0-9A-F]{2}(:[0-9A-F]{2}){19}$" || + exec "if [ `sudo ls \"/etc/snmp/tls/certs/$VAR(@)\" 2> /dev/null` ]; \ + then \ + exit 0; \ + else \ + exit 1; \ + fi" ; "value can be finger print key or filename in /etc/snmp/tls/certs folder"
\ No newline at end of file |