summaryrefslogtreecommitdiff
path: root/op-mode-definitions/show-system.xml.in
diff options
context:
space:
mode:
authorgoodNETnick <pknet@ya.ru>2022-10-18 02:55:01 -0400
committergoodNETnick <pknet@ya.ru>2022-11-01 12:56:33 -0400
commit0c51111829dcd7660fc5405ae6ac651a8b6987b8 (patch)
treeb0897b72ba17b3166132b391df537aef336bcbca /op-mode-definitions/show-system.xml.in
parent813236e6ca265f15fe81b09a0a61feb3a3d0193b (diff)
downloadvyos-1x-0c51111829dcd7660fc5405ae6ac651a8b6987b8.tar.gz
vyos-1x-0c51111829dcd7660fc5405ae6ac651a8b6987b8.zip
login: T4754: show configured 2FA OTP key
Diffstat (limited to 'op-mode-definitions/show-system.xml.in')
-rw-r--r--op-mode-definitions/show-system.xml.in49
1 files changed, 49 insertions, 0 deletions
diff --git a/op-mode-definitions/show-system.xml.in b/op-mode-definitions/show-system.xml.in
index 4a0e6c3b2..af4bce6b5 100644
--- a/op-mode-definitions/show-system.xml.in
+++ b/op-mode-definitions/show-system.xml.in
@@ -66,6 +66,55 @@
<help>Show user accounts</help>
</properties>
<children>
+ <node name="authentication">
+ <properties>
+ <help>Show user account authentication information</help>
+ </properties>
+ <children>
+ <tagNode name="user">
+ <properties>
+ <help>Show configured user</help>
+ <completionHelp>
+ <path>system login user</path>
+ </completionHelp>
+ </properties>
+ <children>
+ <node name="otp">
+ <properties>
+ <help>Show OTP key information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/otp.py show_login --username="$6" --info="full"</command>
+ <children>
+ <leafNode name="full">
+ <properties>
+ <help>Show full settings, including QR code and commands for VyOS</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/otp.py show_login --username="$6" --info="full"</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}/otp.py show_login --username="$6" --info="key-b32"</command>
+ </leafNode>
+ <leafNode name="qrcode">
+ <properties>
+ <help>Show OTP authentication QR code</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/otp.py show_login --username="$6" --info="qrcode"</command>
+ </leafNode>
+ <leafNode name="uri">
+ <properties>
+ <help>Show OTP authentication otpauth URI</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/otp.py show_login --username="$6" --info="uri"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </tagNode>
+ </children>
+ </node>
<node name="users">
<properties>
<help>Show user account information</help>