summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-22 21:04:24 +0100
committerChristian Breunig <christian@breunig.cc>2024-01-22 21:08:03 +0100
commit064e0b81f0ac0ca19a108d0e05c1756b9a220cc2 (patch)
tree8a20f0ee157dbde0985ca24d4eb74f92e139ba41 /op-mode-definitions
parentdc003f5fe9eaa8d0463d9b9606f968bcb9cbbab6 (diff)
downloadvyos-1x-064e0b81f0ac0ca19a108d0e05c1756b9a220cc2.tar.gz
vyos-1x-064e0b81f0ac0ca19a108d0e05c1756b9a220cc2.zip
op-mode: T5975: add missing 2FA OTP commands
Diffstat (limited to 'op-mode-definitions')
-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 85bfdcdba..027eec6de 100644
--- a/op-mode-definitions/show-system.xml.in
+++ b/op-mode-definitions/show-system.xml.in
@@ -102,6 +102,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>