Class PrivilegesEvaluator
- java.lang.Object
-
- com.floragunn.searchguard.privileges.PrivilegesEvaluator
-
- All Implemented Interfaces:
DynamicConfigFactory.DCFListener
public class PrivilegesEvaluator extends Object implements DynamicConfigFactory.DCFListener
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.LoggeractionTraceprotected org.apache.logging.log4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description PrivilegesEvaluator(org.elasticsearch.client.Client localClient, org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.threadpool.ThreadPool threadPool, ConfigurationRepository configurationRepository, org.elasticsearch.cluster.metadata.IndexNameExpressionResolver resolver, AuditLog auditLog, org.elasticsearch.common.settings.Settings settings, ClusterInfoHolder clusterInfoHolder, IndexResolverReplacer irr, SpecialPrivilegesEvaluationContextProviderRegistry specialPrivilegesEvaluationContextProviderRegistry, GuiceDependencies guiceDependencies, org.elasticsearch.xcontent.NamedXContentRegistry namedXContentRegistry, boolean enterpriseModulesEnabled)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PrivilegesEvaluatorResponseevaluate(User user, String action0, org.elasticsearch.action.ActionRequest request, org.elasticsearch.tasks.Task task, SpecialPrivilegesEvaluationContext specialPrivilegesEvaluationContext)Map<String,Boolean>evaluateClusterAndTenantPrivileges(User user, org.elasticsearch.common.transport.TransportAddress caller, Collection<String> privilegesAskedFor)Set<String>getAllConfiguredTenantNames()booleanhasClusterPermission(User user, String action)static booleanisClusterPerm(String action0)static booleanisIndexPerm(String action)booleanisInitialized()booleanisKibanaRbacEnabled()static booleanisTenantPerm(String action0)StringkibanaIndex()StringkibanaServerUsername()Set<String>mapSgRoles(User user, org.elasticsearch.common.transport.TransportAddress caller)Map<String,Boolean>mapTenants(User user, Set<String> roles)Only used for authinfo REST APIbooleanmultitenancyEnabled()booleannotFailOnForbiddenEnabled()voidonChanged(ConfigModel cm, DynamicConfigModel dcm, InternalUsersModel ium)
-
-
-
Constructor Detail
-
PrivilegesEvaluator
public PrivilegesEvaluator(org.elasticsearch.client.Client localClient, org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.threadpool.ThreadPool threadPool, ConfigurationRepository configurationRepository, org.elasticsearch.cluster.metadata.IndexNameExpressionResolver resolver, AuditLog auditLog, org.elasticsearch.common.settings.Settings settings, ClusterInfoHolder clusterInfoHolder, IndexResolverReplacer irr, SpecialPrivilegesEvaluationContextProviderRegistry specialPrivilegesEvaluationContextProviderRegistry, GuiceDependencies guiceDependencies, org.elasticsearch.xcontent.NamedXContentRegistry namedXContentRegistry, boolean enterpriseModulesEnabled)
-
-
Method Detail
-
onChanged
public void onChanged(ConfigModel cm, DynamicConfigModel dcm, InternalUsersModel ium)
- Specified by:
onChangedin interfaceDynamicConfigFactory.DCFListener
-
isInitialized
public boolean isInitialized()
-
evaluate
public PrivilegesEvaluatorResponse evaluate(User user, String action0, org.elasticsearch.action.ActionRequest request, org.elasticsearch.tasks.Task task, SpecialPrivilegesEvaluationContext specialPrivilegesEvaluationContext)
-
mapSgRoles
public Set<String> mapSgRoles(User user, org.elasticsearch.common.transport.TransportAddress caller)
-
multitenancyEnabled
public boolean multitenancyEnabled()
-
notFailOnForbiddenEnabled
public boolean notFailOnForbiddenEnabled()
-
kibanaIndex
public String kibanaIndex()
-
kibanaServerUsername
public String kibanaServerUsername()
-
isClusterPerm
public static boolean isClusterPerm(String action0)
-
isTenantPerm
public static boolean isTenantPerm(String action0)
-
isIndexPerm
public static boolean isIndexPerm(String action)
-
mapTenants
public Map<String,Boolean> mapTenants(User user, Set<String> roles)
Only used for authinfo REST API
-
evaluateClusterAndTenantPrivileges
public Map<String,Boolean> evaluateClusterAndTenantPrivileges(User user, org.elasticsearch.common.transport.TransportAddress caller, Collection<String> privilegesAskedFor)
-
isKibanaRbacEnabled
public boolean isKibanaRbacEnabled()
-
-