Skip to content

Commit

Permalink
Removed v6 configuration related code
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Bandener <[email protected]>
  • Loading branch information
nibix committed Sep 24, 2024
1 parent 8c43198 commit 5631248
Show file tree
Hide file tree
Showing 39 changed files with 21 additions and 4,085 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@
import org.opensearch.core.xcontent.XContentParser;
import org.opensearch.security.DefaultObjectMapper;
import org.opensearch.security.auditlog.config.AuditConfig;
import org.opensearch.security.securityconf.Migration;
import org.opensearch.security.securityconf.impl.CType;
import org.opensearch.security.securityconf.impl.SecurityDynamicConfiguration;
import org.opensearch.security.securityconf.impl.v6.RoleV6;
import org.opensearch.security.securityconf.impl.v7.TenantV7;
import org.opensearch.security.support.ConfigConstants;
import org.opensearch.security.support.ConfigHelper;
import org.opensearch.security.support.SecurityUtils;
Expand Down Expand Up @@ -121,17 +118,6 @@ public void success(SecurityDynamicConfiguration<?> dConf) {

result.with(dConf);

if (dConf.getCType() == CType.ROLES && dConf.getAutoConvertedFrom() != null) {
// Special case for configuration that was auto-converted from v6:
// We need to generate tenant config from role config.
// Having such a special case here is not optimal, but IMHO acceptable, as this
// should be only a temporary measure until V6 configuration is completely discontinued.
@SuppressWarnings("unchecked")
SecurityDynamicConfiguration<RoleV6> roleV6config = (SecurityDynamicConfiguration<RoleV6>) dConf.getAutoConvertedFrom();
SecurityDynamicConfiguration<TenantV7> tenants = Migration.createTenants(roleV6config);
result.with(tenants);
}

latch.countDown();
if (isDebugEnabled) {
log.debug(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ public static Collection<RestHandler> getHandler(
),
new AuthTokenProcessorAction(clusterService, threadPool, securityApiDependencies),
new TenantsApiAction(clusterService, threadPool, securityApiDependencies),
new MigrateApiAction(clusterService, threadPool, securityApiDependencies),
new ValidateApiAction(clusterService, threadPool, securityApiDependencies),
new AccountApiAction(clusterService, threadPool, securityApiDependencies, passwordHasher),
new NodesDnApiAction(clusterService, threadPool, securityApiDependencies),
new WhitelistApiAction(clusterService, threadPool, securityApiDependencies),
Expand Down
Loading

0 comments on commit 5631248

Please sign in to comment.