Search code examples
javaldapproxy-server

How to access Active Directory via Proxy in java?


I have application say 'X' which is behind proxy server. From this application I need to call Active directory say 'Y'.

Currently we are able to make LDAP call successfully between X and Y when proxy server is not there. But same LDAP call fails when proxy server exists between X and Y. Because our corporate proxy server won't allow communication using ldap/ldaps (i.e 389/636) ports. Here X and Y exists on different networks.

Can anyone suggest any framework/API/procedure/architecture to address this situation.


Solution

  • We can implement this using HTTP tunneling. The following are the two ways to implement it.
    1.HTTP tunneling without using CONNECT method
    2.HTTP tunneling using CONNECT method.
    I've given here a detailed explanation on how I've implemented the second solution here https://dheerajgopali.wordpress.com/2015/08/17/how-to-access-an-on-premise-active-directory-from-cloud-using-java/