Class CmsJlanUsers

  • All Implemented Interfaces:

    public class CmsJlanUsers
    extends java.lang.Object
    implements org.alfresco.jlan.server.auth.UsersInterface
    This class is used for authenticating OpenCms users to JLAN.

    Since JLAN requires MD4 password hashes for authentication, which are not by default stored in the database, users who want to use the JLAN functionality should log in at least once into OpenCms normally so that the MD4 hash of their password can be computed and stored.

    • Field Summary

      Modifier and Type Field Description
      static java.lang.String DEFAULT_OU_SEPARATOR
      The default OU separator to use if none is configured.
      static java.lang.String JLAN_HASH
      The additional info key for the MD4 password hash.
      static java.lang.String PARAM_JLAN_OU_SEPARATOR
      Name of the runtime property used to configure the OU separator for CIFS login.
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.alfresco.jlan.server.auth.UserAccount getUserAccount​(java.lang.String userName)  
      static byte[] hashPassword​(java.lang.String password)
      Computes an MD4 hash for the password.
      void initializeUsers​(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params)  
      static void setAdminCms​(CmsObject cms)
      Sets the CMS context.
      static java.lang.String translateUser​(java.lang.String name)
      Translates user names by replacing a custom OU separator with the standard OU separator '/'.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • hashPassword

        public static byte[] hashPassword​(java.lang.String password)
        Computes an MD4 hash for the password.
        password - the password for which to compute the hash
        the password hash
      • setAdminCms

        public static void setAdminCms​(CmsObject cms)
        Sets the CMS context.

        cms - the context to set
      • translateUser

        public static final java.lang.String translateUser​(java.lang.String name)
        Translates user names by replacing a custom OU separator with the standard OU separator '/'. This is needed because either JLAN or the client cuts off the part before the slash during authentication, so OpenCms never gets to see it. So if we want CIFS authentication for users from non-root OUs, we need to use a different separator.

        name - the user name to translate
        the translated user name
      • getUserAccount

        public org.alfresco.jlan.server.auth.UserAccount getUserAccount​(java.lang.String userName)
        Specified by:
        getUserAccount in interface org.alfresco.jlan.server.auth.UsersInterface
        See Also:
      • initializeUsers

        public void initializeUsers​(org.alfresco.jlan.server.config.ServerConfiguration config,
                                    org.springframework.extensions.config.ConfigElement params)
        Specified by:
        initializeUsers in interface org.alfresco.jlan.server.auth.UsersInterface
        See Also:
        UsersInterface.initializeUsers(org.alfresco.jlan.server.config.ServerConfiguration, org.springframework.extensions.config.ConfigElement)