All Implemented Interfaces:
UserRoleMapper

public class DnRoleMapper extends AbstractRoleMapperClearRealmCache
This class loads and monitors the file defining the mappings of DNs to internal ES Roles.
  • Field Details

  • Constructor Details

  • Method Details

    • resolveFile

      public static Path resolveFile(RealmConfig realmConfig)
    • parseFileLenient

      public static Map<String,List<String>> parseFileLenient(Path path, org.apache.logging.log4j.Logger logger, String realmType, String realmName)
      Internally in this class, we try to load the file, but if for some reason we can't, we're being more lenient by logging the error and skipping/removing all mappings. This is aligned with how we handle other auto-loaded files in security.
    • parseFile

      public static Map<String,List<String>> parseFile(Path path, org.apache.logging.log4j.Logger logger, String realmType, String realmName, boolean strict)
    • resolveRoles

      public void resolveRoles(UserRoleMapper.UserData user, ActionListener<Set<String>> listener)
    • resolveRoles

      public Set<String> resolveRoles(String userDnString, Collection<String> groupDns)
      This will map the groupDN's to ES Roles