Page MenuHomeVyOS Platform

Add html entities encoding for options field
Open, WishlistPublicFEATURE REQUEST

Description

I've recently discovered that it's not possible to add ssh options to ssh key, if they contain double quotes, e.g.:

vyos@vyatta2# set system login user root authentication public-keys mick@mick-office options 'environment="[email protected]",environment="GIT_AUTHOR_NAME=Mihail Vasilev"'

 Cannot use the double quote (") character in a value string
 Value validation failed
 Set failed

I've tried to add html entities like " instead, but get into faulty .ssh/authorized_keys - it just receives " as is.
It seems to me that it would be handy to add html entities encoding here (as it goes for dhcp server options) and should not harm existing systems.

I think, I can do it quite fast myself, but I think that this feature should be interesting for other community members.

What I'm trying to obtain by this feature - be able to put config.boot under version control AND minimize administration effort required to maintain accountability of engineers.

Details

Difficulty level
Normal (likely a few hours)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change
Issue type
Improvement (missing useful functionality)

Event Timeline

syncer triaged this task as Wishlist priority.Dec 21 2017, 9:39 PM
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 2.0.x.
dmbaturin added a subscriber: dmbaturin.

I'm not sure if HTML encoding is really the best thing to do, but I agree the problem exists.

dmbaturin changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).Jan 27 2021, 6:40 PM
dmbaturin set Is it a breaking change? to Behavior change.
dmbaturin set Issue type to Improvement (missing useful functionality).Sep 3 2021, 7:24 AM

@mickvav You can use &quot. Can you re-check it?
Tested on node VyOS 1.4-rolling-202110130217

set system login user vyos authentication public-keys foo@foo options 'environment="[email protected]",environment="GIT_AUTHOR_NAME=My NAME"'

It converts to:

vyos@r1-roll# sudo cat /home/vyos/.ssh/authorized_keys | grep foo
environment="[email protected]",environment="GIT_AUTHOR_NAME=My NAME" ssh-rsa AAAA_some_public_key= foo@foo