Module org.elasticsearch.xcore
Class UserRoleMapper.DistinguishedNameNormalizer
java.lang.Object
org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper.DistinguishedNameNormalizer
- Enclosing interface:
UserRoleMapper
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
DistinguishedNameNormalizer
public DistinguishedNameNormalizer()
-
-
Method Details
-
normalize
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
nullif input string is not a DN
-