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 #1

Updated by François ARMAND over 10 years ago

  • Description updated (diff)
  • Status changed from In progress to Pending technical review
  • Pull Request set to https://github.com/Normation/ldap-inventory/pull/29
Actions #2

Updated by François ARMAND over 10 years ago

  • Pull Request changed from https://github.com/Normation/ldap-inventory/pull/29 to https://github.com/Normation/ldap-inventory/pull/30

With the actual correct branch target.

Actions #3

Updated by François ARMAND over 10 years ago

  • Description updated (diff)

Updating description to be clearer on the intent.

Actions #4

Updated by François ARMAND over 10 years ago

  • Assignee changed from François ARMAND to Nicolas CHARLES
Actions #5

Updated by François ARMAND over 10 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset ldap-inventory:commit:1968bcd4da9c3b0a1d732cc18973233b2c11133a.

Actions #6

Updated by Nicolas CHARLES over 10 years ago

Applied in changeset ldap-inventory:commit:aac38d3299a8839b924afb3302e1f5c4452a929f.

Actions #7

Updated by Vincent MEMBRÉ over 10 years ago

  • Subject changed from Empty RSA key in CFKEY element of inventory leads to an exception to Inventory with empty CFEngine agent public key cannot be processed by Rudder raising exceptions
Actions #8

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.6.11, which was released today.
Check out:

Actions #9

Updated by Benoît PECCATTE over 9 years ago

  • Category changed from 26 to Web - Nodes & inventories
Actions

Also available in: Atom PDF