Encrypting Hidden Input Controls

0

Hi,

Is it possible to encrypt hidden input controls passed into a jasper report? I have a report with multiple sub reports, one of those subreports needs to access a new db which has a dynamic name (I'm using mongodb) so I need to create a new mongodb connection midway through the report.

Right now I have it like this

<connectionExpression><![CDATA[new com.jaspersoft.mongodb.connection.MongoDbConnection("mongodb://My.Ip.Address.27017/"+$P{databaseName}", "myUsername "myPassword")]]></connectionExpression>

but that's not really very secure at all. Also, if the connection info changes then I gotta go in to anywhere that creates that new connection and edit it accordingly (which is in a few reports) so I thought that it would be best to create the ipaddress, username and password in a hidden input control somewhere and then create a referenced input control in any report that requires a new db connection but my worry is that then they would be passed in plaintext (eg the rest api returns all values). Is there a way to encrypt them? Another option would be to create a jar and use it to update a variable in the report I suppose but I'm curious to see if you can do it the way I said.

Thanks!

jasperUser12's picture
Joined: May 23 2014 - 4:52pm
Last seen: 4 years 6 months ago

0 Answers:

No answers yet
Feedback
randomness