How do we do it
1) A flash interface connecting a remote object with a Java facade on a web server.
Java:
public class AdminServer {
2) LDAP authentication and exception handling
Then java calls the ldap server call through the delegate method (is excluded), the UserDisplay object is populated and always returns with a state representing success / failure / exception and the user authentication level. You can do it your own way.
3) Then we find AdminServer as the flex destination in spring / config as:
It is important that destination = "adminServer" (below) matches the bean identifier in the spring configuration (see above).
4) In the flex code: ..
5) Use AMFSecureChannel To prevent sending a password in a box from flex-> java, you also need to use the AMFSecure channel in your flex configuration file, setting it as the default value.
6) Use an Ldap certificate and key store to protect java-> ldap messages
In the java material, the ldap certificate must be used to encrypt it, which in our case means setting up the keystore file (see java keytool) on the server (Tomcat) with the following import into ORDER:
- Top Level Root Trust Certificate
- certificate signed by our key pair
- Our generated key pair, which we sent for signing according to (2).
If you do not follow this order, you will not import your public / private key
7) Location of the keystore file
This file was placed in ~ / .keystore to automatically get the selected tomcat. Your server may be different.
8) use the secure web server port Finally, we had to uncomment https tomcat in the server.xml configuration to provide a secure channel for working on port 8443.
Then we could enter: https://www.oursite.com:8443/ourcontext/login.html
and provide a secure connection.