Class LdapSecurityManager

java.lang.Object
io.milton.http.http11.auth.LdapSecurityManager
All Implemented Interfaces:
SecurityManager

public class LdapSecurityManager extends Object implements SecurityManager
NOT TESTED YET!!!!!! From here: http://www.forumeasy.com/forums/thread.jsp?tid=115170863235&fid=ldapprof5&highlight=Why+DIGEST-MD5+Authentication+Does+Work Server: AD 2003 Client: JNDI application User: cn=testuser,cn=users,dc=mydomain,dc=com Realm: MYREALM Passwd: (password stored in hash format) The following settings works env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5"); env.put(Context.SECURITY_PRINCIPAL, "testuser"); The following settings dose NOT works env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5"); env.put(Context.SECURITY_PRINCIPAL, "MYREAM\\testuser"); The following settings dose NOT works env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5"); env.put(Context.SECURITY_PRINCIPAL, "testuser@mydomain.com");
Author:
brad
  • Constructor Details

    • LdapSecurityManager

      public LdapSecurityManager()
  • Method Details

    • authenticate

      public Object authenticate(DigestResponse digestRequest)
      Description copied from interface: SecurityManager
      Authenticate a digest request
      Specified by:
      authenticate in interface SecurityManager
      Returns:
      See Also:
    • authenticate

      public Object authenticate(String user, String password)
      Specified by:
      authenticate in interface SecurityManager
      Returns:
      - some object representing the user to associate with the request
    • authorise

      public boolean authorise(Request request, Request.Method method, Auth auth, Resource resource)
      Description copied from interface: SecurityManager
      Check that the authenticater user can access the given resource for the given method.
      Specified by:
      authorise in interface SecurityManager
      Parameters:
      request - - the request itself
      method - - the request method
      auth - - authentication object representing the current user
      resource - - the resource being operated on
      Returns:
      - true to indicate that the user is allowed access
    • getRealm

      public String getRealm(String host)
      Specified by:
      getRealm in interface SecurityManager
      Returns:
      - the name of the security realm this is managing
    • setRealm

      public void setRealm(String realm)
    • isDigestAllowed

      public boolean isDigestAllowed()
      Specified by:
      isDigestAllowed in interface SecurityManager
    • setEnableDigest

      public void setEnableDigest(boolean enableDigest)
    • isEnableDigest

      public boolean isEnableDigest()
    • getLdapUrl

      public String getLdapUrl()
    • setLdapUrl

      public void setLdapUrl(String ldapUrl)