summaryrefslogtreecommitdiff
path: root/op-mode-definitions/openconnect.xml.in
diff options
context:
space:
mode:
authorgoodNETnick <pknet@ya.ru>2022-05-08 21:01:28 -0400
committergoodNETnick <pknet@ya.ru>2022-05-16 02:59:46 -0400
commitea83ba23b998408f14d7ac8d32c99de23768bb78 (patch)
treef871a4b317a0129d0556fe347c841a7712603e51 /op-mode-definitions/openconnect.xml.in
parent9beeba732c2669024e76928cff12ef95e4f16c78 (diff)
downloadvyos-1x-ea83ba23b998408f14d7ac8d32c99de23768bb78.tar.gz
vyos-1x-ea83ba23b998408f14d7ac8d32c99de23768bb78.zip
ocserv: T4420: show configured 2FA OTP key
Diffstat (limited to 'op-mode-definitions/openconnect.xml.in')
-rw-r--r--op-mode-definitions/openconnect.xml.in47
1 files changed, 47 insertions, 0 deletions
diff --git a/op-mode-definitions/openconnect.xml.in b/op-mode-definitions/openconnect.xml.in
index 6b0082b4c..9343637c0 100644
--- a/op-mode-definitions/openconnect.xml.in
+++ b/op-mode-definitions/openconnect.xml.in
@@ -13,6 +13,53 @@
</properties>
<command>${vyos_op_scripts_dir}/openconnect-control.py --action="show_sessions"</command>
</leafNode>
+ <tagNode name="user">
+ <properties>
+ <help>Show OpenConnect configured user settings</help>
+ <completionHelp>
+ <script>sudo ${vyos_completion_dir}/list_openconnect_users.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <node name="otp">
+ <properties>
+ <help>Show OTP key information</help>
+ </properties>
+ <children>
+ <leafNode name="full">
+ <properties>
+ <help>Show full settings, including QR code and commands for VyOS</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="full"</command>
+ </leafNode>
+ <leafNode name="key-hex">
+ <properties>
+ <help>Show OTP authentication secret in Hex (used in VyOS config)</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="key-hex"</command>
+ </leafNode>
+ <leafNode name="key-b32">
+ <properties>
+ <help>Show OTP authentication secret in Base32 (used in mobile apps)</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="key-b32"</command>
+ </leafNode>
+ <leafNode name="qrcode">
+ <properties>
+ <help>Show OTP authentication QR code</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="qrcode"</command>
+ </leafNode>
+ <leafNode name="uri">
+ <properties>
+ <help>Show OTP authentication otpauth URI</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="uri"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </tagNode>
</children>
</node>
</children>