Skip to content

Commit ec0ae3c

Browse files
committed
[backend/frontend] Continue
1 parent 3b05752 commit ec0ae3c

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

openaev-api/src/main/java/io/openaev/opencti/connectors/impl/SecurityCoverageConnector.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import static io.openaev.config.TenantUriUtils.TENANT_BASE_PATH;
44

5-
import io.openaev.api.stix_process.StixApi;
65
import io.openaev.config.OpenAEVConfig;
76
import io.openaev.opencti.config.OpenCTIConfig;
87
import io.openaev.opencti.connectors.ConnectorBase;
@@ -75,7 +74,6 @@ public String getListenCallbackURI() {
7574
return openAEVConfig.getBaseUrl()
7675
+ TENANT_BASE_PATH
7776
+ this.getTenantId()
78-
+ StixApi.STIX_URI
79-
+ "/process-bundle";
77+
+ "/stix/process-bundle";
8078
}
8179
}

openaev-api/src/test/java/io/openaev/api/stix_process/StixApiTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,11 @@ class StixApiTest extends IntegrationTest {
116116
@DynamicPropertySource
117117
static void registerProperties(DynamicPropertyRegistry registry) {
118118
mockServer = new ClientAndServer(Configuration.configuration(), PortFactory.findFreePort());
119+
String tenantKey = "openaev.xtm.opencti." + Tenant.DEFAULT_TENANT_UUID;
119120
registry.add(
120-
"openaev.xtm.opencti.url",
121-
() -> String.format("http://localhost:%d/", mockServer.getLocalPort()));
121+
tenantKey + ".url", () -> String.format("http://localhost:%d/", mockServer.getLocalPort()));
122+
registry.add(tenantKey + ".enable", () -> "true");
123+
registry.add(tenantKey + ".token", () -> "test-token");
122124
registry.add(
123125
"openaev.test.connector.url",
124126
() -> String.format("http://localhost:%d/", mockServer.getLocalPort()));

openaev-api/src/test/java/io/openaev/opencti/connectors/service/OpenCTIConnectorServiceTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public class RegisterAllConnectorsTest {
5757
@Test
5858
@DisplayName("When API return is error, the connector is NOT registered")
5959
public void whenApiReturnIsError_connectorIsNotRegistered() throws IOException {
60+
ConnectorBase connector = getInstanceOfSecurityCoverageConnector().get();
61+
connector.setRegistered(false);
62+
6063
Response jwksSchemaResponse = ResponseFixture.getSchemaResponseWithJwks();
6164
when(mockOpenCTIClient.execute(any(), any(), any(QueryTypeFields.class)))
6265
.thenReturn(jwksSchemaResponse);
@@ -65,7 +68,6 @@ public void whenApiReturnIsError_connectorIsNotRegistered() throws IOException {
6568

6669
openCTIConnectorService.registerOrPingAllConnectors();
6770

68-
ConnectorBase connector = getInstanceOfSecurityCoverageConnector().get();
6971
assertThat(connector.isRegistered()).isFalse();
7072
}
7173

openaev-api/src/test/java/io/openaev/rest/PlatformSettingsApiTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ class PlatformSettingsApiTest extends IntegrationTest {
4040
"platform_id",
4141
"platform_name",
4242
"platform_base_url",
43-
// OpenCTI
44-
"xtm_opencti_enable",
45-
"xtm_opencti_url",
4643
// XTM Hub (config-driven, always present)
4744
"xtm_hub_enable",
4845
"xtm_hub_url",

0 commit comments

Comments
 (0)