Module org.elasticsearch.security
Class SecurityMigrations.CleanupRoleMappingDuplicatesMigration
java.lang.Object
org.elasticsearch.xpack.security.support.SecurityMigrations.CleanupRoleMappingDuplicatesMigration
- All Implemented Interfaces:
SecurityMigrations.SecurityMigration
- Enclosing class:
SecurityMigrations
public static class SecurityMigrations.CleanupRoleMappingDuplicatesMigration
extends Object
implements SecurityMigrations.SecurityMigration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPreConditions(SecurityIndexManager.State securityIndexManagerState) Check that any pre-conditions are met before launching migrationgetDuplicateRoleMappingNames(ExpressionRoleMapping... roleMappings) voidmigrate(SecurityIndexManager indexManager, Client client, ActionListener<Void> listener) Method that will execute the actual migration - needs to be idempotent and non-blockingintThe min mapping version required to support this migration.Any node features that are required for this migration to run.
-
Constructor Details
-
CleanupRoleMappingDuplicatesMigration
public CleanupRoleMappingDuplicatesMigration()
-
-
Method Details
-
migrate
public void migrate(SecurityIndexManager indexManager, Client client, ActionListener<Void> listener) Description copied from interface:SecurityMigrations.SecurityMigrationMethod that will execute the actual migration - needs to be idempotent and non-blocking- Specified by:
migratein interfaceSecurityMigrations.SecurityMigration- Parameters:
indexManager- for the security indexclient- the index clientlistener- listener to provide updates back to caller
-
checkPreConditions
Description copied from interface:SecurityMigrations.SecurityMigrationCheck that any pre-conditions are met before launching migration- Specified by:
checkPreConditionsin interfaceSecurityMigrations.SecurityMigration- Parameters:
securityIndexManagerState- current state of the security index- Returns:
- true if pre-conditions met, otherwise false
-
nodeFeaturesRequired
Description copied from interface:SecurityMigrations.SecurityMigrationAny node features that are required for this migration to run. This makes sure that all nodes in the cluster can handle any changes in behaviour introduced by the migration.- Specified by:
nodeFeaturesRequiredin interfaceSecurityMigrations.SecurityMigration- Returns:
- a set of features needed to be supported or an empty set if no change in behaviour is expected
-
minMappingVersion
public int minMappingVersion()Description copied from interface:SecurityMigrations.SecurityMigrationThe min mapping version required to support this migration. This makes sure that the index has at least the min mapping that is required to support the migration.- Specified by:
minMappingVersionin interfaceSecurityMigrations.SecurityMigration- Returns:
- the minimum mapping version required to apply this migration
-
getDuplicateRoleMappingNames
-