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

Also available in: Atom PDF