Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

We have a web application which fetched PDF from government site base upon the current username, and this username is encrypted. But as a developer, I can pass the different username during debug mode and I can fetch PDF of any user.

Since this is a confidential file so my client wants to hide this business logic from the developer or want secure this so that no one can fetch PDFs of other users.

Is there any way to achieve this?

ASP.NET using VB.NET

Thanks

What I have tried:

I tried to add the password to PDF file but if the developer knows the logic then he can generate that password as well.
Posted
Updated 21-Aug-18 19:06pm

Quote:
But as a developer, I can pass the different username during debug mode and I can fetch PDF of any user.


True but developer should not access usernames from production users (that's common sense). Debugging shouldn't be done in production environments. If you are working on a real development that involves sensitive data then your team should have a different sets of environments and databases where you can move application code from development to production. For example:

Dev/Test Environment - this is where you would test your application logic, including fetching PDFs based on usernames. This also where you fix code and add features to the app.
Stage Environment - this is where you push changes from Test environment. This is where integration testing is done. No development should be done here aside application specific configurations.
Production Environment - this is the final product which real users used. No debugging and development should be used.

And you can't hide business logic to developers, however you can add restriction to some source code that only authorize developers can have access to it. Do a research on source/version controls for your code repositories.
 
Share this answer
 
Comments
Amol Sagvekar 21-Aug-18 15:50pm    
username is common in all environment, and it pass to function but you can change that value in debug mode. as i mentioned its fetching PDF from a government site and they don't have other environments.
Vincent Maverick Durano 21-Aug-18 15:57pm    
the government site should give you test username for you to test out the functionality in your end. And what do you mean by change the value? value of what?
One approach I would suggest is using create the separate project and use its dll.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900