Skip to content

Commit

Permalink
Update changelog
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crawford <[email protected]>
  • Loading branch information
stephen-crawford committed Aug 29, 2023
1 parent f568e03 commit 3bdc4e4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add events correlation engine plugin ([#6854](https://github.com/opensearch-project/OpenSearch/issues/6854))
- Introduce new dynamic cluster setting to control slice computation for concurrent segment search ([#9107](https://github.com/opensearch-project/OpenSearch/pull/9107))
- Implement on behalf of token passing for extensions ([#8679](https://github.com/opensearch-project/OpenSearch/pull/8679))
- Implement service account issuance and fetching for extensions ([#9618](https://github.com/opensearch-project/OpenSearch/pull/9618))

### Dependencies
- Bump `log4j-core` from 2.18.0 to 2.19.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,13 @@ public void testTokenNoopIssuance() {
assertTrue(token instanceof AuthToken);
}

public void testShouldSucceedIssueServiceAccountToken() {


}

public void testShouldFailIssueServiceAccountToken() {

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package org.opensearch.extensions;

import java.util.List;
import org.opensearch.action.ActionModule;
import org.opensearch.client.node.NodeClient;
import org.opensearch.cluster.service.ClusterService;
Expand All @@ -31,7 +32,7 @@
public class NoopExtensionsManager extends ExtensionsManager {

public NoopExtensionsManager() throws IOException {
super(Set.of());
super(Set.of(), new IdentityService(Settings.EMPTY, List.of()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void testLoadExtensions() throws Exception {

Set<Setting<?>> additionalSettings = extAwarePlugin.getExtensionSettings().stream().collect(Collectors.toSet());
ExtensionScopedSettings extensionScopedSettings = new ExtensionScopedSettings(additionalSettings);
ExtensionsManager extensionsManager = new ExtensionsManager(additionalSettings);
ExtensionsManager extensionsManager = new ExtensionsManager(additionalSettings, identityService);
ExtensionDependency dependentExtension = new ExtensionDependency("uniqueid0", Version.fromString("2.0.0"));

Extension firstExtension = new Extension(
Expand Down Expand Up @@ -278,7 +278,7 @@ public void testNonUniqueLoadedExtensions() throws Exception {
null,
null
);
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
extensionsManager.loadExtension(firstExtension);
IOException exception = expectThrows(IOException.class, () -> extensionsManager.loadExtension(secondExtension));
assertEquals(
Expand Down Expand Up @@ -317,7 +317,7 @@ public void testNonUniqueLoadedExtensions() throws Exception {
public void testMissingRequiredFieldsWhileLoadingExtension() throws Exception {

Extension firstExtension = new Extension("firstExtension", "uniqueid1", "127.0.0.0", "9300", "0.0.7", "3.0.0", "", null, null);
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);

IOException exception = expectThrows(IOException.class, () -> extensionsManager.loadExtension(firstExtension));
assertEquals("Required field [minimum opensearch version] is missing in the request", exception.getMessage());
Expand Down Expand Up @@ -374,7 +374,7 @@ public void testExtensionDependency() throws Exception {
}

public void testInitialize() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);

initialize(extensionsManager);

Expand Down Expand Up @@ -416,7 +416,7 @@ public void testInitialize() throws Exception {

public void testHandleRegisterRestActionsRequest() throws Exception {

ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);

String uniqueIdStr = "uniqueid1";
Expand All @@ -430,7 +430,7 @@ public void testHandleRegisterRestActionsRequest() throws Exception {
}

public void testHandleRegisterSettingsRequest() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);

String uniqueIdStr = "uniqueid1";
Expand All @@ -446,7 +446,7 @@ public void testHandleRegisterSettingsRequest() throws Exception {
}

public void testHandleRegisterRestActionsRequestWithInvalidMethod() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);

String uniqueIdStr = "uniqueid1";
Expand All @@ -461,7 +461,7 @@ public void testHandleRegisterRestActionsRequestWithInvalidMethod() throws Excep
}

public void testHandleRegisterRestActionsRequestWithInvalidDeprecatedMethod() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);

String uniqueIdStr = "uniqueid1";
Expand All @@ -476,7 +476,7 @@ public void testHandleRegisterRestActionsRequestWithInvalidDeprecatedMethod() th
}

public void testHandleRegisterRestActionsRequestWithInvalidUri() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);
String uniqueIdStr = "uniqueid1";
List<String> actionsList = List.of("GET", "PUT /bar", "POST /baz");
Expand All @@ -490,7 +490,7 @@ public void testHandleRegisterRestActionsRequestWithInvalidUri() throws Exceptio
}

public void testHandleRegisterRestActionsRequestWithInvalidDeprecatedUri() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);
String uniqueIdStr = "uniqueid1";
List<String> actionsList = List.of("GET /foo", "PUT /bar", "POST /baz");
Expand All @@ -504,7 +504,7 @@ public void testHandleRegisterRestActionsRequestWithInvalidDeprecatedUri() throw
}

public void testHandleExtensionRequest() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);

ExtensionRequest clusterStateRequest = new ExtensionRequest(ExtensionRequestProto.RequestType.REQUEST_EXTENSION_CLUSTER_STATE);
Expand Down Expand Up @@ -658,7 +658,7 @@ public void testEnvironmentSettingsDefaultValue() throws Exception {
}

public void testAddSettingsUpdateConsumerRequest() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);

List<Setting<?>> componentSettings = List.of(
Expand Down Expand Up @@ -702,7 +702,7 @@ public void testAddSettingsUpdateConsumerRequest() throws Exception {
}

public void testHandleAddSettingsUpdateConsumerRequest() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);

List<Setting<?>> componentSettings = List.of(
Expand All @@ -722,7 +722,7 @@ public void testHandleAddSettingsUpdateConsumerRequest() throws Exception {
}

public void testUpdateSettingsRequest() throws Exception {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
initialize(extensionsManager);

Setting<?> componentSetting = Setting.boolSetting("falseSetting", false, Property.Dynamic);
Expand Down Expand Up @@ -751,7 +751,7 @@ public void testUpdateSettingsRequest() throws Exception {

public void testRegisterHandler() throws Exception {

ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);

TransportService mockTransportService = spy(
new TransportService(
Expand All @@ -778,7 +778,7 @@ public void testRegisterHandler() throws Exception {
}

public void testIncompatibleExtensionRegistration() throws IOException {
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of());
ExtensionsManager extensionsManager = new ExtensionsManager(Set.of(), identityService);
Extension firstExtension = new Extension(
"firstExtension",
"uniqueid1",
Expand Down Expand Up @@ -819,7 +819,7 @@ public List<Setting<?>> getExtensionSettings() {
extensionScopedSettings
);

ExtensionsManager extensionsManager = new ExtensionsManager(additionalSettings);
ExtensionsManager extensionsManager = new ExtensionsManager(additionalSettings, identityService);
extensionsManager.loadExtension(firstExtension);

DiscoveryExtensionNode extension = new DiscoveryExtensionNode(
Expand Down Expand Up @@ -857,7 +857,7 @@ public void testAdditionalExtensionSettingsForExtensionWithoutCustomSettingSet()
extensionScopedSettings
);

ExtensionsManager extensionsManager = new ExtensionsManager(additionalSettings);
ExtensionsManager extensionsManager = new ExtensionsManager(additionalSettings, identityService);
extensionsManager.loadExtension(firstExtension);

DiscoveryExtensionNode extension = new DiscoveryExtensionNode(
Expand Down

0 comments on commit 3bdc4e4

Please sign in to comment.