java.lang.Object
org.elasticsearch.xpack.security.authc.Realms
All Implemented Interfaces:
Iterable<org.elasticsearch.xpack.core.security.authc.Realm>

public class Realms extends Object implements Iterable<org.elasticsearch.xpack.core.security.authc.Realm>
Serves as a realms registry (also responsible for ordering the realms appropriately)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Realms(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.env.Environment env, Map<String,org.elasticsearch.xpack.core.security.authc.Realm.Factory> factories, org.elasticsearch.license.XPackLicenseState licenseState, org.elasticsearch.common.util.concurrent.ThreadContext threadContext, ReservedRealm reservedRealm)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<org.elasticsearch.xpack.core.security.authc.Realm>
    calculateLicensedRealms(org.elasticsearch.license.XPackLicenseState licenseStateSnapshot)
     
    List<org.elasticsearch.xpack.core.security.authc.Realm>
     
    List<org.elasticsearch.xpack.core.security.authc.Realm>
    Returns a list of realms that are configured, but are not permitted under the current license.
    protected void
    handleDisabledRealmDueToLicenseChange(org.elasticsearch.xpack.core.security.authc.Realm realm, org.elasticsearch.license.XPackLicenseState licenseStateSnapshot)
     
    protected List<org.elasticsearch.xpack.core.security.authc.Realm>
    initRealms(List<org.elasticsearch.xpack.core.security.authc.RealmConfig> realmConfigs)
     
    static boolean
    isRealmTypeAvailable(org.elasticsearch.license.XPackLicenseState licenseState, String type)
     
    Iterator<org.elasticsearch.xpack.core.security.authc.Realm>
     
    org.elasticsearch.xpack.core.security.authc.Realm
    realm(String name)
     
    org.elasticsearch.xpack.core.security.authc.Realm.Factory
     
    protected void
     
    Stream<org.elasticsearch.xpack.core.security.authc.Realm>
     
    void
    usageStats(org.elasticsearch.action.ActionListener<Map<String,Object>> listener)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • Realms

      public Realms(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.env.Environment env, Map<String,org.elasticsearch.xpack.core.security.authc.Realm.Factory> factories, org.elasticsearch.license.XPackLicenseState licenseState, org.elasticsearch.common.util.concurrent.ThreadContext threadContext, ReservedRealm reservedRealm) throws Exception
      Throws:
      Exception
  • Method Details

    • recomputeActiveRealms

      protected void recomputeActiveRealms()
    • handleDisabledRealmDueToLicenseChange

      protected void handleDisabledRealmDueToLicenseChange(org.elasticsearch.xpack.core.security.authc.Realm realm, org.elasticsearch.license.XPackLicenseState licenseStateSnapshot)
    • iterator

      public Iterator<org.elasticsearch.xpack.core.security.authc.Realm> iterator()
      Specified by:
      iterator in interface Iterable<org.elasticsearch.xpack.core.security.authc.Realm>
    • getUnlicensedRealms

      public List<org.elasticsearch.xpack.core.security.authc.Realm> getUnlicensedRealms()
      Returns a list of realms that are configured, but are not permitted under the current license.
    • stream

      public Stream<org.elasticsearch.xpack.core.security.authc.Realm> stream()
    • getActiveRealms

      public List<org.elasticsearch.xpack.core.security.authc.Realm> getActiveRealms()
    • calculateLicensedRealms

      protected List<org.elasticsearch.xpack.core.security.authc.Realm> calculateLicensedRealms(org.elasticsearch.license.XPackLicenseState licenseStateSnapshot)
    • isRealmTypeAvailable

      public static boolean isRealmTypeAvailable(org.elasticsearch.license.XPackLicenseState licenseState, String type)
    • realm

      public org.elasticsearch.xpack.core.security.authc.Realm realm(String name)
    • realmFactory

      public org.elasticsearch.xpack.core.security.authc.Realm.Factory realmFactory(String type)
    • initRealms

      protected List<org.elasticsearch.xpack.core.security.authc.Realm> initRealms(List<org.elasticsearch.xpack.core.security.authc.RealmConfig> realmConfigs) throws Exception
      Throws:
      Exception
    • usageStats

      public void usageStats(org.elasticsearch.action.ActionListener<Map<String,Object>> listener)