• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

url encryption

 
Mike Ash
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using JSP together with struts and I need to set up a user with a link with sensitive information in the query string. So far I have not been able to find a way to encrypt the query string so the parameters are invisible encrypted to the user. I have tried this code with no success:

<%
String redirectURL = "http://someurl?name=param&id=3455";
response.sendRedirect(encodeRedirectUrl(redirectURL));
%>

I thought there may be a tag library or java library that would accomplish this task, but I've been unsuccessful so far. Any thoughts?

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Any URL encodings are just that - encodings, which are easily reversed. If you're really concerned about it, use encryption (e.g. using the JCE API, with help of the JCE taglib).

But what exactly do you mean by "sensitive"? What kinds of attacks do you expect? Or is it that the user should not see the ID?
[ December 20, 2006: Message edited by: Ulf Dittmer ]
 
Mike Ash
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using this in conjunction with Oracle Reports. The link that the user will be clicking on could potentially have information about their account and such. Basically, one of the requirements on the project is that the url be either encrypted or not visible...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would a user not be allowed to see information (or even just IDs) for their own account?

A non-visible URL (or hidden parameter) provides no security at all.
[ December 20, 2006: Message edited by: Ulf Dittmer ]
 
Mike Ash
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle Reports lives on a completely separate server and there is authentication information for that particular server that no user should ever see.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then you will need to use encryption which, as pointed out, is not the same as encoding.

We don't have a specific forum dedicated to encryption, so I've moved this to the intermediate Java forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic