Meaningless Drivel is fun!*
The moose likes Security and the fly likes LDAP over HttpURLConnection? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "LDAP over HttpURLConnection?" Watch "LDAP over HttpURLConnection?" New topic
Author

LDAP over HttpURLConnection?

Theodore Casser
Ranch Hand

Joined: Mar 14, 2001
Posts: 1902

As with so many questions around here, this one's an odd one.

I'm trying to figure out a difficult problem - how to make (essentially) an asynchronous HttpUrlConnection (or HttpsUrlConnection) from a servlet to a URL on the same server secured with LDAP. Normally, I'd encapsulate the functionality I need in a ServletFilter, but I'm basically needing to call another URL while continuing on with the servlet.

Is there any way for me to pick up the user's session information from the initial servlet call and pass those along?

I'd come up with another method, but I'm somewhat limited by the underlying COTS system with what I can do. Thanks in advance.


Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
[TC:]   Is there any way for me to pick up the user's session information from the initial servlet call and pass those along?

What user's session information ?

Hint: 'cannot see the forest because all the trees are in the way'


"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
Theodore Casser
Ranch Hand

Joined: Mar 14, 2001
Posts: 1902

Ya know, your 'hint' was vaguely unkind and entirely unhelpful.

In the end, it didn't matter - my coworkers finally took up my suggestion to circumvent the problem by taking an alternate route.
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
Well sorry, there seems to be a general consensus not to try to do all the work for someone and I was just trying to follow that style. What I meant was one generally should generate a session ID at initial page request time and the solution seems remarkably obvious to me. Trying to asynchronous HttpUrlConnection (or HttpsUrlConnection) from a servlet to a URL on the same server secured with (Lightweight Directory Access Protocol) seems to me error-prone unless these fancy tools had scheduling and user-allocation built in at design concepting, thus I thought my remark carefully before posting.

These happen, no big deal.
[ December 22, 2007: Message edited by: Nicholas Jordan ]
 
 
subject: LDAP over HttpURLConnection?
 
Similar Threads
Problems connecting to LDAP from Weblogic Server: BAD_CERTIFICATE error!
two URLConnection
LDAP Integration with JNDI
Servlet design - static methods
problem in reading from an InputStream when sending data across two applications