Project

General

Profile

Actions

Bug #4518

closed

Inventory with empty CFEngine agent public key cannot be processed by Rudder raising exceptions

Added by François ARMAND over 10 years ago. Updated over 9 years ago.

Status:
Released
Priority:
2
Category:
Web - Nodes & inventories
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When we have:

<CFKEY>-----BEGIN RSA PUBLIC KEY-----
-----END RSA PUBLIC KEY-----</CFKEY>

We get:
java.lang.AssertionError: assertion failed at scala.Predef$.assert(Predef.scala:165) at
com.normation.inventory.domain.PublicKey.<init>(DataTypes.scala:61) at
com.normation.inventory.provisioning.fusion.RudderPublicKeyParsing.apply(RudderParsingRules.scala:185)

This the equivalent of a Null Pointer Exception: Rudder does not correctly handle the case where the actual RSA key is empty.

So the intent of that ticket is JUST to correct that error handling so that we consistently process these case:
- no CFKEY tag,
- CFKEY tag with no content,
- CFKEY tag with a content that does looks like a RSA key (i.e no BEGIN RSA/END RSA)
- CFEKEY with BEGIN RSA/END RSA but with no actual content (that ticket).

IF we want to make CFKEY a mandatory non empty attribute, like UUID is, and what CFKEY is NOT at the moment, it must go into an other ticket (and better look like a new user story). On the same idea, if there is a Fusion bug that leads to the empty RSA key whereas there is, actually, a CF-Key that should have been put here, an other ticket must be open.

Actions

Also available in: Atom PDF