Project

General

Profile

Bug #4518

Updated by François ARMAND over 10 years ago

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.

Back