Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Identity FeatureFlag #16024

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Implement WithFieldName interface in ValuesSourceAggregationBuilder & FieldSortBuilder ([#15916](https://github.com/opensearch-project/OpenSearch/pull/15916))
- Add successfulSearchShardIndices in searchRequestContext ([#15967](https://github.com/opensearch-project/OpenSearch/pull/15967))
- Remove identity-related feature flagged code from the RestController ([#15430](https://github.com/opensearch-project/OpenSearch/pull/15430))
- Remove Identity FeatureFlag ([#16024](https://github.com/opensearch-project/OpenSearch/pull/16024))

### Dependencies
- Bump `com.azure:azure-identity` from 1.13.0 to 1.13.2 ([#15578](https://github.com/opensearch-project/OpenSearch/pull/15578))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class IdentityAuthenticationIT extends HttpSmokeTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(FeatureFlags.IDENTITY, "true")
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ protected FeatureFlagSettings(

public static final Set<Setting<?>> BUILT_IN_FEATURE_FLAGS = Set.of(
FeatureFlags.EXTENSIONS_SETTING,
FeatureFlags.IDENTITY_SETTING,
FeatureFlags.TELEMETRY_SETTING,
FeatureFlags.DATETIME_FORMATTER_CACHING_SETTING,
FeatureFlags.TIERED_REMOTE_INDEX_SETTING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public class FeatureFlags {
*/
public static final String EXTENSIONS = "opensearch.experimental.feature.extensions.enabled";

/**
* Gates the functionality of identity.
*/
public static final String IDENTITY = "opensearch.experimental.feature.identity.enabled";

/**
* Gates the functionality of telemetry framework.
*/
Expand Down Expand Up @@ -82,8 +77,6 @@ public class FeatureFlags {

public static final Setting<Boolean> EXTENSIONS_SETTING = Setting.boolSetting(EXTENSIONS, false, Property.NodeScope);

public static final Setting<Boolean> IDENTITY_SETTING = Setting.boolSetting(IDENTITY, false, Property.NodeScope);

public static final Setting<Boolean> TELEMETRY_SETTING = Setting.boolSetting(TELEMETRY, false, Property.NodeScope);

public static final Setting<Boolean> DATETIME_FORMATTER_CACHING_SETTING = Setting.boolSetting(
Expand Down Expand Up @@ -138,7 +131,6 @@ public class FeatureFlags {
private static final List<Setting<Boolean>> ALL_FEATURE_FLAG_SETTINGS = List.of(
REMOTE_STORE_MIGRATION_EXPERIMENTAL_SETTING,
EXTENSIONS_SETTING,
IDENTITY_SETTING,
TELEMETRY_SETTING,
DATETIME_FORMATTER_CACHING_SETTING,
TIERED_REMOTE_INDEX_SETTING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Identity and access control for OpenSearch
*
* @opensearch.experimental
* @opensearch.api
reta marked this conversation as resolved.
Show resolved Hide resolved
* */
public class IdentityService {
private static final Logger log = LogManager.getLogger(IdentityService.class);
Expand Down
6 changes: 1 addition & 5 deletions server/src/main/java/org/opensearch/node/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,7 @@ protected Node(
FeatureFlags.initializeFeatureFlags(settings);

final List<IdentityPlugin> identityPlugins = new ArrayList<>();
if (FeatureFlags.isEnabled(FeatureFlags.IDENTITY)) {
// If identity is enabled load plugins implementing the extension point
logger.info("Identity on so found plugins implementing: " + pluginsService.filterPlugins(IdentityPlugin.class).toString());
identityPlugins.addAll(pluginsService.filterPlugins(IdentityPlugin.class));
}
identityPlugins.addAll(pluginsService.filterPlugins(IdentityPlugin.class));

final Set<DiscoveryNodeRole> additionalRoles = pluginsService.filterPlugins(Plugin.class)
.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import static org.opensearch.common.util.FeatureFlags.DATETIME_FORMATTER_CACHING;
import static org.opensearch.common.util.FeatureFlags.EXTENSIONS;
import static org.opensearch.common.util.FeatureFlags.IDENTITY;

public class FeatureFlagTests extends OpenSearchTestCase {

Expand All @@ -40,7 +39,7 @@ public void testNonBooleanFeatureFlag() {
}

public void testBooleanFeatureFlagWithDefaultSetToFalse() {
final String testFlag = IDENTITY;
final String testFlag = EXTENSIONS;
FeatureFlags.initializeFeatureFlags(Settings.EMPTY);
assertNotNull(testFlag);
assertFalse(FeatureFlags.isEnabled(testFlag));
Expand All @@ -49,15 +48,13 @@ public void testBooleanFeatureFlagWithDefaultSetToFalse() {
public void testBooleanFeatureFlagInitializedWithEmptySettingsAndDefaultSetToFalse() {
final String testFlag = DATETIME_FORMATTER_CACHING;
FeatureFlags.initializeFeatureFlags(Settings.EMPTY);
assertNotNull(testFlag);
assertFalse(FeatureFlags.isEnabled(testFlag));
}

public void testInitializeFeatureFlagsWithExperimentalSettings() {
FeatureFlags.initializeFeatureFlags(Settings.builder().put(IDENTITY, true).build());
assertTrue(FeatureFlags.isEnabled(IDENTITY));
FeatureFlags.initializeFeatureFlags(Settings.builder().put(EXTENSIONS, true).build());
assertTrue(FeatureFlags.isEnabled(EXTENSIONS));
assertFalse(FeatureFlags.isEnabled(DATETIME_FORMATTER_CACHING));
assertFalse(FeatureFlags.isEnabled(EXTENSIONS));
// reset FeatureFlags to defaults
FeatureFlags.initializeFeatureFlags(Settings.EMPTY);
}
Expand Down
Loading