Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » user & password parameters to connect
user & password parameters to connect [message #1085233] Mon, 12 August 2013 16:21 Go to next message
José Litux is currently offline José LituxFriend
Messages: 52
Registered: March 2013
Hello everybody

after one month of hard work and a very complex report deployed to production server, someone (my boss) asked out of the blue for security credentials: "I need user & pass asked prior to any data is delivered. I need secured connections"

Taking a deep breath (changing requirements when the project is in production drives me nuts) now I'm trying to implement user&pass parameters but....(There is always a "but") if i use property binding for user&pass on the datasource the first combo-box asking for the "continent" parameter of my report is blank, driving to a beautiful error.

Making the long story short, my report is made from two hyperlinked reports. On the first one you choose "continent" and a summarized view for the company figures on that part of the world, and there's a link to the second report. When clicking on that link, second report is rendered with the continent parameter passed via URL. Then you choose "country" (second combo-box) for all the countries belonging to that continent.

Creating other DataConnection just for rendering the "continents" combo-box is a "quick and dirty" workaround but security is compromised anyway.

how could this be done having said that my two reports use 45 datasets each (so creating every dataset from scratch is not an option)?

In addition to this, how can be warned the user that user&password combination is not valid instead of that ugly error dialog that Birt Engine delivers?

[Updated on: Mon, 12 August 2013 16:24]

Report message to a moderator

Re: user & password parameters to connect [message #1086128 is a reply to message #1085233] Tue, 13 August 2013 21:28 Go to previous message
Kristopher Clark is currently offline Kristopher ClarkFriend
Messages: 130
Registered: January 2013
Senior Member
I don't have an example ready but one thing you could try to do is create your own Java class that takes a username, password, and url as parameters. Then in the beforeOpen() of your data source. Then have that class return -1 if sql throws an error that is complaining about the password.

Once you know that the username/password is incorrect you could change the data source from script to some other non sensitive DB. This will get rid of that error screen you want to leave behind.

Then to avoid any other error you could take each report and place it in a grid and then drop that entire grid from the beforeOpen() only leaving one label that gives some error message.

If you wanted to further the security even more, you could encrypt the username and password that was passed to the birt report from beforeOpen() before sending it to the class and then have your java decrypt it on that end.

I know you don't want to create another data connection but this is the easiest way I can think of that still provides some level of security.
Previous Topic:SQL on DetailRow or Table in Table
Next Topic:How to create multiple sheets in excel output report through BIRT
Goto Forum:

Current Time: Sat Sep 25 10:39:03 GMT 2021

Powered by FUDForum. Page generated in 0.02017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top