Page MenuHomeVyOS Platform

Improvement: system login: show configured 2FA OTP key
Closed, ResolvedPublic

Description

OTP requires passing parameters to the user.
It would be handy to have a mechanism to display the configured user's OTP settings in the VyOS CLI.

Suggested commands:

show system login authentication user <username> otp <full | key-b32 | key-hex | qrcode | uri >

Example:

vyos@vyos:~$ show system login authentication user tst otp full
# You can share it with the user, he just needs to scan the QR in his OTP app
# username:  tst
# OTP KEY:  5PA4SGYTQSGOBO3H3EQSSNCUNZAYAPH2
# OTP URL:  otpauth://totp/tst@vyos?secret=5PA4SGYTQSGOBO3H3EQSSNCUNZAYAPH2&digits=6&period=30
█████████████████████████████████████████
█████████████████████████████████████████
████ ▄▄▄▄▄ █▀ ██▄▀ ▄█▄▀▀▄▄▄▄██ ▄▄▄▄▄ ████
████ █   █ █▀ █▄▄▀▀▀▄█  ▄▄▀▄ █ █   █ ████
████ █▄▄▄█ █▀█▀▄▄▀  ▄▀ █▀ ▀▄██ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄█▄▀ ▀▄█ ▀ ▀ ▀ █▄█▄▄▄▄▄▄▄████
████  ▄▄▄▀▄▄  ▄███▀▄▀█▄██▀ ▀▄ ▀▄█ ▀ ▀████
████ ▀▀ ▀ ▄█▄ ▀ ▀▄ ▄█▀ ▄█ ▄▀▀▄██    █████
████▄ █▄▀▀▄█▀ ▀█▄█▄▄▄▄ ▄▀█▀▀█ ▀ ▄ ▀█▀████
█████  ▀█▀▄▄ █ ▀▄▄  ▄█▄    ▀█▀▀ █▀ ▄█████
████▀██▀█▄▄ ▀▀▀▀█▄▀ ▀█▄▄▀▀▀ ▀ ▀█▄██▀▀████
████▄ ▄ ▄▀▄██▀█ ▄ ▀▄██ ▄▄  ▀▀▄█▄██ ▄█████
████▀▀ ▄▀ ▄ ▀█▀█▀█  █▀█▄▄▀█▀█▄██▄▄█ ▀████
████ █ ▀█▄▄█▄ ▀ ▄▄▀▀  ▀ █▄█▀████ █▀ ▀████
████▄██▄██▄█▀ ▄▀ ▄▄▀▄  ▄▀█ ▄ ▄▄▄ ▀█▄ ████
████ ▄▄▄▄▄ █▄  ▀█▄█ ▄ ▀ ▄ ▄  █▄█ ▄▀▄█████
████ █   █ █ ▀▄██▄▄▀█▄▀▄██▄▀  ▄  ▀██▀████
████ █▄▄▄█ █ ██▀▄▄  ▀▄▄▀█▀ ▀█ ▄▀█ ▀██████
████▄▄▄▄▄▄▄█▄███▄███▄█▄▄▄▄█▄▄█▄██▄█▄█████
█████████████████████████████████████████
█████████████████████████████████████████
# To add this OTP key to configuration, run the following commands:
set system login user otptester authentication otp key '5PA4SGYTQSGOBO3H3EQSSNCUNZAYAPH2'

If the user does not exist or does not have an OTP key configured, a warning is issued:

vyos@vyos:~$ show system login authentication user tst5 otp full
There is no such user ("tst5") with an OTP key configured

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rolling
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Improvement (missing useful functionality)

Related Objects

StatusSubtypeAssignedTask
OpenFEATURE REQUESTNone
ResolvedUnknown Object (User)

Event Timeline

Unknown Object (User) claimed this task.Oct 17 2022, 12:45 AM
Unknown Object (User) created this task.
Unknown Object (User) created this object in space S1 VyOS Public.
Unknown Object (User) updated the task description. (Show Details)
Viacheslav changed the task status from Open to Needs testing.Sep 9 2023, 10:56 AM