Class RewriterProxy

java.lang.Object
org.forgerock.opendj.examples.RewriterProxy

public final class RewriterProxy extends Object
This example is based on the Proxy. This example does no load balancing, but instead rewrites attribute descriptions and DN suffixes in requests to and responses from a directory server using hard coded configuration.
  • It transforms DNs ending in o=example on the client side to end in dc=example,dc=com on the server side and vice versa.
  • It transforms the attribute description fullname on the client side to cn on the server side and vice versa.
This example has a number of restrictions.
  • It does not support SSL connections.
  • It does not support StartTLS.
  • It does not support Abandon or Cancel requests.
  • It has very basic authentication and authorization support.
  • It does not rewrite bind DNs.
  • It uses proxied authorization, so if you use OpenDJ directory server, you must set the proxied-auth privilege for the proxy user.
  • It does not touch matched DNs in results.
  • It does not rewrite attributes with options in search result entries.
  • It does not touch search result references.
This example takes the following command line parameters:
  <localAddress> <localPort> <proxyDN> <proxyPassword> <serverAddress> <serverPort>
 
If you have imported the users from Example.ldif, then you can set proxyUserDN to cn=My App,ou=Apps,dc=example,dc=com and proxyUserPassword to password.
  • Method Details

    • main

      public static void main(String[] args)
      Main method.
      Parameters:
      args - The command line arguments: local address, local port, proxy user DN, proxy user password, server address, server port