Class UserRoleMapper.DistinguishedNameNormalizer

java.lang.Object
org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper.DistinguishedNameNormalizer
Enclosing interface:
UserRoleMapper

public static class UserRoleMapper.DistinguishedNameNormalizer extends Object
This class parse the given string into a DN and return its normalized format. If the input string is not a valid DN, null is returned. The DN parsing and normalization are cached internally so that the same input string will only be processed once (as long as the cache entry is not GC'd). The cache works regardless of whether the input string is a valid DN. The cache uses SoftReference for its values so that they free for GC. This is to prevent potential memory pressure when there are many concurrent role mapping processes coupled with large number of groups and role mappings, which in theory is unbounded.
  • Constructor Details

    • DistinguishedNameNormalizer

      public DistinguishedNameNormalizer()
  • Method Details

    • normalize

      public String normalize(String str)
      Parse the input string to a DN and returns its normalized form.
      Parameters:
      str - String that may represent a DN
      Returns:
      The normalized DN form of the input string or null if input string is not a DN