Project

General

Profile

Bug #12496

"rudder-keys change-key" does not check for key file existence

Added by Janos Mattyasovszky over 1 year ago. Updated 12 months ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Small
Priority:
0

Description

The usage says:

  /opt/rudder/bin/rudder-keys change-key <node_uuid> <public_key_file>

However, the script only checks if the <public key file> is not zero (-z), but not for the existence.

Additionally, it just forwards the user-supplied value publicKey:< file://${PUBKEY}, which requires a full path otherwise it gives you a not-too-much saying error like:

ldapmodify: invalid format (line 4) entry: "nodeId=f809f201-6980-4467-ae70-7104a1253286,ou=Nodes,ou=Accepted Inventories,ou=Inventories,cn=rudder-configuration" 

If would be advisable to put a -s test and a readlink -f on the file-parameter.

Associated revisions

Revision ada47817 (diff)
Added by Benoît PECCATTE about 1 year ago

Fixes #12496: rudder-keys change-key needs full path

History

#1

Updated by Benoît PECCATTE over 1 year ago

  • Category set to Agent
  • Assignee set to Benoît PECCATTE
  • Target version set to 4.1.13
#2

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.13 to 4.1.14
#3

Updated by Benoît PECCATTE over 1 year ago

  • Target version changed from 4.1.14 to 4.1.15
  • Priority changed from 32 to 31
#4

Updated by Benoît PECCATTE about 1 year ago

  • Effort required set to Small
  • Priority changed from 31 to 45
#5

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 4.1.15 to 4.1.16
  • Priority changed from 45 to 44
#6

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 4.1.16 to 4.1.17
#7

Updated by Benoît PECCATTE about 1 year ago

  • Status changed from New to In progress
  • Priority changed from 44 to 0
#8

Updated by Benoît PECCATTE about 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/1720
#9

Updated by Benoît PECCATTE about 1 year ago

  • Status changed from Pending technical review to Pending release
#10

Updated by François ARMAND 12 months ago

  • Subject changed from rudder-keys change-key needs full path to "rudder-keys change-key" does not check for key file existence
#11

Updated by Vincent MEMBRÉ 12 months ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.17, 4.3.7 and 5.0.3 which were released today.
Changelog
Changelog
Changelog

Also available in: Atom PDF