Jump to content

Recommended Posts

Posted

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!

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...