Project

General

Profile

Actions

Bug #10715

closed

escaping ${SSH_ORIGINAL_COMMAND} in GUI - sshKeyDistribution/3.0

Bug #10715: escaping ${SSH_ORIGINAL_COMMAND} in GUI - sshKeyDistribution/3.0

Added by Ferenc Ulrich over 8 years ago. Updated over 8 years ago.

Status:
Released
Priority:
N/A
Category:
-
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
36
Name check:
Fix check:
Regression:

Description

Hi,

How do i escape string ${SSH_ORIGINAL_COMMAND} in GUI, so that it won't be interpreted as a cf-engine variable?
i tried ${const.dollar}{SSH_ORIGINAL_COMMAND}, \${const.dollar}{SSH_ORIGINAL_COMMAND}, $\{SSH_ORIGINAL_COMMAND}, ${const.dollar}\{SSH_ORIGINAL_COMMAND}.
None of them worked.

Thanks,
Ferenc Ulrich


Related issues 1 (1 open0 closed)

Related to Rudder - Architecture #10747: regextract cannot extract values that contains ${TEXT} if TEXT is not a variableNewActions

Updated by Ferenc Ulrich over 8 years ago Actions #1

Please handle this issue as a real BUG.

Updated by Vincent MEMBRÉ over 8 years ago Actions #2

In which field do you want to insert that string ?

Updated by François ARMAND over 8 years ago Actions #3

To be clearer, we need to better understand what you are trying to do exactly, what you would expect to get (in the generated file), and what you are actually getting.
That would help better understand the problem. Thanks for the help!

Updated by Janos Mattyasovszky over 8 years ago Actions #4

The usecase is to have options prepended to the authorized_keys, which include shell environment variables, like example:

from="host.fqdn",command="sudo $SSH_ORIGINAL_COMMAND" ssh-rsa.... 

Updated by Ferenc Ulrich over 8 years ago Actions #5

example:

from="host.fqdn",command="sudo ${SSH_ORIGINAL_COMMAND}" ssh-rsa....

Updated by François ARMAND over 8 years ago Actions #6

  • Target version set to 3.1.20
  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority changed from 0 to 36

Updated by Nicolas CHARLES over 8 years ago Actions #7

  • Assignee set to Nicolas CHARLES

Updated by Nicolas CHARLES over 8 years ago Actions #8

First result: somehow, regextract doesn't evaluate ${keyspec}, even if k${keyspec} can be read correctly, when it contains ${SSH_ORIGINAL_COMMAND}

Updated by Nicolas CHARLES over 8 years ago Actions #9

Hard codding values in regextract doesn't solve the issue.
However, using $SSH_ORIGINAL_COMMAND (without {}) does work

We need to find a replacement for regextract to make the technique work

Updated by Nicolas CHARLES over 8 years ago Actions #10

  • Related to Architecture #10747: regextract cannot extract values that contains ${TEXT} if TEXT is not a variable added

Updated by Nicolas CHARLES over 8 years ago Actions #11

  • Status changed from New to In progress

Updated by Nicolas CHARLES over 8 years ago Actions #12

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/1143

Updated by Nicolas CHARLES over 8 years ago Actions #13

  • Status changed from Pending technical review to Pending release

Updated by Vincent MEMBRÉ over 8 years ago Actions #14

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.20, 4.0.5 and 4.1.2 which were released today.

Actions

Also available in: PDF Atom