Page MenuHomeVyOS Platform

Add html entities encoding for options field
Closed, WontfixPublicFEATURE 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="GIT_AUTHOR_EMAIL=mick@example.com",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

Version
-
Is it a breaking change?
Behavior change
Issue type
Feature (new 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 subscribed.

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

dmbaturin set Is it a breaking change? to Behavior change.

@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="GIT_AUTHOR_EMAIL=login@example.com",environment="GIT_AUTHOR_NAME=My NAME"'

It converts to:

vyos@r1-roll# sudo cat /home/vyos/.ssh/authorized_keys | grep foo
environment="GIT_AUTHOR_EMAIL=login@example.com",environment="GIT_AUTHOR_NAME=My NAME" ssh-rsa AAAA_some_public_key= foo@foo
syncer claimed this task.
dmbaturin set Issue type to Feature (new functionality).Nov 8 2024, 10:50 AM