Project

General

Profile

Actions

Bug #12496

closed

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

Added by Janos Mattyasovszky almost 6 years ago. Updated over 5 years ago.

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

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.

Actions #1

Updated by Benoît PECCATTE almost 6 years ago

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

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.13 to 4.1.14
Actions #3

Updated by Benoît PECCATTE over 5 years ago

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

Updated by Benoît PECCATTE over 5 years ago

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

Updated by Vincent MEMBRÉ over 5 years ago

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

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.16 to 4.1.17
Actions #7

Updated by Benoît PECCATTE over 5 years ago

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

Updated by Benoît PECCATTE over 5 years 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
Actions #9

Updated by Benoît PECCATTE over 5 years ago

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

Updated by François ARMAND over 5 years ago

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

Updated by Vincent MEMBRÉ over 5 years 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
Actions

Also available in: Atom PDF