summaryrefslogtreecommitdiff
path: root/op-mode-definitions/generate-openconnect-user-key.xml.in
diff options
context:
space:
mode:
authorgoodNETnick <pknet@ya.ru>2022-04-21 08:14:32 -0400
committergoodNETnick <pknet@ya.ru>2022-04-21 08:14:32 -0400
commit1e3909f4186e29d2d8e7be7e255ccdfec050537f (patch)
tree6d9101eb99d876a90efd98c6e738c0f25304b209 /op-mode-definitions/generate-openconnect-user-key.xml.in
parente5cdb9d8e2dd803f238001773d31c05ef7874117 (diff)
downloadvyos-1x-1e3909f4186e29d2d8e7be7e255ccdfec050537f.tar.gz
vyos-1x-1e3909f4186e29d2d8e7be7e255ccdfec050537f.zip
ocserv: T4380: 2FA OTP key generator in VyOS CLI
Diffstat (limited to 'op-mode-definitions/generate-openconnect-user-key.xml.in')
-rw-r--r--op-mode-definitions/generate-openconnect-user-key.xml.in67
1 files changed, 67 insertions, 0 deletions
diff --git a/op-mode-definitions/generate-openconnect-user-key.xml.in b/op-mode-definitions/generate-openconnect-user-key.xml.in
new file mode 100644
index 000000000..80cdfb3d7
--- /dev/null
+++ b/op-mode-definitions/generate-openconnect-user-key.xml.in
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="openconnect">
+ <properties>
+ <help>Generate OpenConnect client parameters</help>
+ </properties>
+ <children>
+ <tagNode name="username">
+ <properties>
+ <help>Username used for authentication</help>
+ <completionHelp>
+ <list>&lt;username&gt;</list>
+ </completionHelp>
+ </properties>
+ <children>
+ <node name="otp-key">
+ <properties>
+ <help>Generate OpenConnect OTP token</help>
+ </properties>
+ <children>
+ <node name="hotp-time">
+ <properties>
+ <help>HOTP time-based token</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval 30 --digits 6</command>
+ <children>
+ <tagNode name="interval">
+ <properties>
+ <help>Duration of single time interval</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "$8" --digits 6</command>
+ <children>
+ <tagNode name="digits">
+ <properties>
+ <help>The number of digits in the one-time password</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "$8" --digits "${10}"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ <tagNode name="digits">
+ <properties>
+ <help>The number of digits in the one-time password</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval 30 --digits "$8"</command>
+ <children>
+ <tagNode name="interval">
+ <properties>
+ <help>Duration of single time interval</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "${10}" --digits $8</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>