Actions
Architecture #8985
closedAdd node key in managed_nodes system variable
Status:
Released
Priority:
N/A
Assignee:
Category:
System techniques
Target version:
Fix check:
Regression:
Description
The variable would be MANAGED_NODES_KEY
Its content should be a list of hash in the form "MD5=xxx" where the hash algorithm is :
parse the key then
EVP_DigestInit(&context, md);
# extract modulus in big endian binary form
actlen = BN_bn2bin(key->n, buffer);
EVP_DigestUpdate(&context, buffer, actlen);
# extract exponent in big endian binary form
actlen = BN_bn2bin(key->e, buffer);
EVP_DigestUpdate(&context, buffer, actlen);
EVP_DigestFinal(&context, digest, &md_len);
To check a sum, just take a file in /var/rudder/cfengine-community/ppkeys and its hash must match the one in its name.
If a node's key is unknown, the hash should be replaced by an empty value.
Actions