Project

General

Profile

Bug #15034

Updated by François ARMAND almost 5 years ago

We got an inventory that lead to that error.  

 We are not sure that the data are actually bad, but in all case, it should not blow up the execution with: 

 <pre> 
 org.bouncycastle.util.encoders.DecoderException: unable to decode base64 string: invalid characters encountered in base64 data 
	 at org.bouncycastle.util.encoders.Base64.decode(Unknown Source) 
	 at org.bouncycastle.util.io.pem.PemReader.loadObject(Unknown Source) 
	 at org.bouncycastle.util.io.pem.PemReader.readPemObject(Unknown Source) 
	 at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source) 
	 at com.normation.inventory.domain.PublicKey.$anonfun$publicKey$3(DataTypes.scala:110) 
	 at scalaz.zio.internal.FiberContext.nextInstr(FiberContext.scala:412) 
	 at scalaz.zio.internal.FiberContext.evaluateNow(FiberContext.scala:164) 
	 at scalaz.zio.internal.FiberContext.$anonfun$evaluateLater$1(FiberContext.scala:322) 
 .... 
 Caused by:  
 scalaz.zio.FiberFailure: Fiber failed.|An unchecked error was produced.|org.bouncycastle.util.encoders.DecoderException: unable to decode base64 string: invalid characters encountered in base64 data|?at org.bouncycastle.util.encoders.Base64.decode(Unknown Source)|?at org.bouncycastle.util.io.pem.PemReader.loadObject(Unknown Source)|?at org.bouncycastle.util.io.pem.PemReader.readPemObject(Unknown Source)|?at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)|?at com.normation.inventory.domain.PublicKey.$anonfun$publicKey$3(DataTypes.scala:110)|?at scalaz.zio.internal.FiberContext.nextInstr(FiberContext.scala:412)|?at scalaz.zio.internal.FiberContext.evaluateNow(FiberContext.scala:164)|?at scalaz.zio.internal.FiberContext.$anonfun$evaluateLater$1(FiberContext.scala:322)|?at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)|?at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)|?at java.lang.Thread.run(Thread.java:748)|Caused by: java.io.IOException: invalid characters encountered in base64 data|?at org.bouncycastle.util.encoders.Base64Encoder.decode(Unknown Source)|?... 11 more 
	 at scalaz.zio.Runtime.$anonfun$unsafeRun$1(Runtime.scala:45) 
	 at scalaz.zio.Exit.getOrElse(Exit.scala:31) 
	 at scalaz.zio.Exit.getOrElse$(Exit.scala:29) 
	 at scalaz.zio.Exit$Failure.getOrElse(Exit.scala:187) 
	 at scalaz.zio.Runtime.unsafeRun(Runtime.scala:45) 
	 at scalaz.zio.Runtime.unsafeRun$(Runtime.scala:44) 
	 at com.normation.zio$ZioRuntime$.unsafeRun(ZioCommons.scala:242) 
	 at com.normation.inventory.provisioning.endpoint.FusionReportEndpoint.parseInventory$1(FusionReportEndpoint.scala:133) 
	 at com.normation.inventory.provisioning.endpoint.FusionReportEndpoint.onSubmit(FusionReportEndpoint.scala:160) 
	 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
	 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
	 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
 </pre> 

 This is a template, please edit and remove what is not relevant. 

 I found this bug in Rudder version [Your Version here], on [Distribution here] 

 This bug happens: 

 * During installation of Rudder agent / Rudder server 
 * While running rudder agent on a Node 
 * When using Rudder web interface 
 * When looking at compliance of a Node 
 * When configurations are generated on Rudder Server 
 * When a Nodes applies a configuration 

 Description: 


 You can reproduce it with the following steps: 

 * ... 
 * ... 

 You can workaround this issue by doing likewise: 

Back