diff --git a/docs/installation.md b/docs/installation.md index a00034ad3..f4ea62bf9 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -49,6 +49,11 @@ The files are also included in the JAR file. If you do not want migrations to be performed automatically on startup, then you can set `runMigrationsEnabled` to `false` in the data store configuration. + +You can also disable query history recording to the database by setting +`queryHistoryEnabled` to `false`. This can be useful in scenarios where you +want to reduce database load or don't need query history tracking. + For example: ```yaml @@ -59,6 +64,7 @@ dataStore: driver: org.postgresql.Driver queryHistoryHoursRetention: 24 runMigrationsEnabled: false + queryHistoryEnabled: true # Set to false to disable query history recording ``` `Flyway` uses a transactional lock in databases that support it such as diff --git a/gateway-ha/config.yaml b/gateway-ha/config.yaml index c9e0c4a29..fc8039496 100644 --- a/gateway-ha/config.yaml +++ b/gateway-ha/config.yaml @@ -12,6 +12,8 @@ dataStore: password: P0stG&es driver: org.postgresql.Driver queryHistoryHoursRetention: 24 + # Enable or disable query history recording to database (default: true) + queryHistoryEnabled: true clusterStatsConfiguration: monitorType: INFO_API diff --git a/gateway-ha/src/main/java/io/trino/gateway/ha/config/DataStoreConfiguration.java b/gateway-ha/src/main/java/io/trino/gateway/ha/config/DataStoreConfiguration.java index cd04c5335..f71997119 100644 --- a/gateway-ha/src/main/java/io/trino/gateway/ha/config/DataStoreConfiguration.java +++ b/gateway-ha/src/main/java/io/trino/gateway/ha/config/DataStoreConfiguration.java @@ -20,6 +20,7 @@ public class DataStoreConfiguration private String password; private String driver; private Integer queryHistoryHoursRetention = 4; + private boolean queryHistoryEnabled = true; private boolean runMigrationsEnabled = true; public DataStoreConfiguration(String jdbcUrl, String user, String password, String driver, Integer queryHistoryHoursRetention, boolean runMigrationsEnabled) @@ -84,6 +85,16 @@ public void setQueryHistoryHoursRetention(Integer queryHistoryHoursRetention) this.queryHistoryHoursRetention = queryHistoryHoursRetention; } + public boolean isQueryHistoryEnabled() + { + return queryHistoryEnabled; + } + + public void setQueryHistoryEnabled(boolean queryHistoryEnabled) + { + this.queryHistoryEnabled = queryHistoryEnabled; + } + public boolean isRunMigrationsEnabled() { return this.runMigrationsEnabled; diff --git a/gateway-ha/src/main/java/io/trino/gateway/ha/router/BaseRoutingManager.java b/gateway-ha/src/main/java/io/trino/gateway/ha/router/BaseRoutingManager.java index 996ee158c..074cdfa3a 100644 --- a/gateway-ha/src/main/java/io/trino/gateway/ha/router/BaseRoutingManager.java +++ b/gateway-ha/src/main/java/io/trino/gateway/ha/router/BaseRoutingManager.java @@ -176,8 +176,8 @@ public void updateClusterStats(List stats) } } - @VisibleForTesting - void setExternalUrlForQueryId(String queryId, String externalUrl) + @Override + public void setExternalUrlForQueryId(String queryId, String externalUrl) { queryIdExternalUrlCache.put(queryId, externalUrl); } diff --git a/gateway-ha/src/main/java/io/trino/gateway/ha/router/RoutingManager.java b/gateway-ha/src/main/java/io/trino/gateway/ha/router/RoutingManager.java index 2f112f6dd..3b699f931 100644 --- a/gateway-ha/src/main/java/io/trino/gateway/ha/router/RoutingManager.java +++ b/gateway-ha/src/main/java/io/trino/gateway/ha/router/RoutingManager.java @@ -52,6 +52,14 @@ public interface RoutingManager */ void setRoutingGroupForQueryId(String queryId, String routingGroup); + /** + * Associates an external URL with a specific query ID for routing. + * + * @param queryId the unique identifier of the query + * @param externalUrl the external URL to associate with the query + */ + void setExternalUrlForQueryId(String queryId, String externalUrl); + /** * Finds the backend cluster associated with a given query ID. * diff --git a/gateway-ha/src/main/java/io/trino/gateway/proxyserver/ProxyRequestHandler.java b/gateway-ha/src/main/java/io/trino/gateway/proxyserver/ProxyRequestHandler.java index 8da9713ca..2e45bf57b 100644 --- a/gateway-ha/src/main/java/io/trino/gateway/proxyserver/ProxyRequestHandler.java +++ b/gateway-ha/src/main/java/io/trino/gateway/proxyserver/ProxyRequestHandler.java @@ -89,6 +89,7 @@ public class ProxyRequestHandler private final List statementPaths; private final boolean includeClusterInfoInResponse; private final ProxyResponseConfiguration proxyResponseConfiguration; + private final boolean queryHistoryEnabled; @Inject public ProxyRequestHandler( @@ -106,6 +107,7 @@ public ProxyRequestHandler( statementPaths = haGatewayConfiguration.getStatementPaths(); this.includeClusterInfoInResponse = haGatewayConfiguration.isIncludeClusterHostInResponse(); proxyResponseConfiguration = haGatewayConfiguration.getProxyResponseConfiguration(); + this.queryHistoryEnabled = haGatewayConfiguration.getDataStore().isQueryHistoryEnabled(); } @PreDestroy @@ -281,6 +283,7 @@ private ProxyResponse recordBackendForQueryId(Request request, ProxyResponse res queryDetail.setQueryId(results.get("id")); routingManager.setBackendForQueryId(queryDetail.getQueryId(), queryDetail.getBackendUrl()); routingManager.setRoutingGroupForQueryId(queryDetail.getQueryId(), routingDestination.routingGroup()); + routingManager.setExternalUrlForQueryId(queryDetail.getQueryId(), routingDestination.externalUrl()); log.debug("QueryId [%s] mapped with proxy [%s]", queryDetail.getQueryId(), queryDetail.getBackendUrl()); } catch (IOException e) { @@ -292,7 +295,9 @@ private ProxyResponse recordBackendForQueryId(Request request, ProxyResponse res } queryDetail.setRoutingGroup(routingDestination.routingGroup()); queryDetail.setExternalUrl(routingDestination.externalUrl()); - queryHistoryManager.submitQueryDetail(queryDetail); + if (queryHistoryEnabled) { + queryHistoryManager.submitQueryDetail(queryDetail); + } return response; } diff --git a/gateway-ha/src/test/java/io/trino/gateway/ha/config/TestDataStoreConfiguration.java b/gateway-ha/src/test/java/io/trino/gateway/ha/config/TestDataStoreConfiguration.java new file mode 100644 index 000000000..179c65d34 --- /dev/null +++ b/gateway-ha/src/test/java/io/trino/gateway/ha/config/TestDataStoreConfiguration.java @@ -0,0 +1,70 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.trino.gateway.ha.config; + +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class TestDataStoreConfiguration +{ + @Test + void testDefaultValues() + { + DataStoreConfiguration dataStoreConfiguration = new DataStoreConfiguration(); + assertThat(dataStoreConfiguration.getQueryHistoryHoursRetention()).isEqualTo(4); + assertThat(dataStoreConfiguration.isQueryHistoryEnabled()).isTrue(); + assertThat(dataStoreConfiguration.isRunMigrationsEnabled()).isTrue(); + } + + @Test + void testQueryHistoryEnabledSetter() + { + DataStoreConfiguration dataStoreConfiguration = new DataStoreConfiguration(); + assertThat(dataStoreConfiguration.isQueryHistoryEnabled()).isTrue(); + + dataStoreConfiguration.setQueryHistoryEnabled(false); + assertThat(dataStoreConfiguration.isQueryHistoryEnabled()).isFalse(); + + dataStoreConfiguration.setQueryHistoryEnabled(true); + assertThat(dataStoreConfiguration.isQueryHistoryEnabled()).isTrue(); + } + + @Test + void testAllSetters() + { + DataStoreConfiguration dataStoreConfiguration = new DataStoreConfiguration(); + + dataStoreConfiguration.setJdbcUrl("jdbc:postgresql://localhost:5432/test"); + assertThat(dataStoreConfiguration.getJdbcUrl()).isEqualTo("jdbc:postgresql://localhost:5432/test"); + + dataStoreConfiguration.setUser("test_user"); + assertThat(dataStoreConfiguration.getUser()).isEqualTo("test_user"); + + dataStoreConfiguration.setPassword("test_password"); + assertThat(dataStoreConfiguration.getPassword()).isEqualTo("test_password"); + + dataStoreConfiguration.setDriver("org.postgresql.Driver"); + assertThat(dataStoreConfiguration.getDriver()).isEqualTo("org.postgresql.Driver"); + + dataStoreConfiguration.setQueryHistoryHoursRetention(24); + assertThat(dataStoreConfiguration.getQueryHistoryHoursRetention()).isEqualTo(24); + + dataStoreConfiguration.setQueryHistoryEnabled(false); + assertThat(dataStoreConfiguration.isQueryHistoryEnabled()).isFalse(); + + dataStoreConfiguration.setRunMigrationsEnabled(false); + assertThat(dataStoreConfiguration.isRunMigrationsEnabled()).isFalse(); + } +} diff --git a/gateway-ha/src/test/java/io/trino/gateway/ha/config/TestRoutingConfiguration.java b/gateway-ha/src/test/java/io/trino/gateway/ha/config/TestRoutingConfiguration.java new file mode 100644 index 000000000..f7d277068 --- /dev/null +++ b/gateway-ha/src/test/java/io/trino/gateway/ha/config/TestRoutingConfiguration.java @@ -0,0 +1,48 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.trino.gateway.ha.config; + +import io.airlift.units.Duration; +import org.junit.jupiter.api.Test; + +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.assertj.core.api.Assertions.assertThat; + +class TestRoutingConfiguration +{ + @Test + void testDefaultValues() + { + RoutingConfiguration routingConfiguration = new RoutingConfiguration(); + assertThat(routingConfiguration.getAsyncTimeout()).isEqualTo(new Duration(2, MINUTES)); + assertThat(routingConfiguration.isAddXForwardedHeaders()).isTrue(); + assertThat(routingConfiguration.getDefaultRoutingGroup()).isEqualTo("adhoc"); + } + + @Test + void testAllSetters() + { + RoutingConfiguration routingConfiguration = new RoutingConfiguration(); + + Duration customTimeout = new Duration(5, MINUTES); + routingConfiguration.setAsyncTimeout(customTimeout); + assertThat(routingConfiguration.getAsyncTimeout()).isEqualTo(customTimeout); + + routingConfiguration.setAddXForwardedHeaders(false); + assertThat(routingConfiguration.isAddXForwardedHeaders()).isFalse(); + + routingConfiguration.setDefaultRoutingGroup("batch"); + assertThat(routingConfiguration.getDefaultRoutingGroup()).isEqualTo("batch"); + } +} diff --git a/gateway-ha/src/test/java/io/trino/gateway/proxyserver/TestProxyRequestHandlerQueryHistoryDisabled.java b/gateway-ha/src/test/java/io/trino/gateway/proxyserver/TestProxyRequestHandlerQueryHistoryDisabled.java new file mode 100644 index 000000000..36f2be76d --- /dev/null +++ b/gateway-ha/src/test/java/io/trino/gateway/proxyserver/TestProxyRequestHandlerQueryHistoryDisabled.java @@ -0,0 +1,137 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.trino.gateway.proxyserver; + +import io.trino.gateway.ha.HaGatewayLauncher; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.mockwebserver.Dispatcher; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; +import okhttp3.mockwebserver.RecordedRequest; +import org.jdbi.v3.core.Jdbi; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.testcontainers.containers.PostgreSQLContainer; + +import java.io.File; +import java.util.List; +import java.util.Map; + +import static com.google.common.net.HttpHeaders.CONTENT_TYPE; +import static com.google.common.net.MediaType.JSON_UTF_8; +import static io.trino.gateway.ha.HaGatewayTestUtils.buildGatewayConfig; +import static io.trino.gateway.ha.HaGatewayTestUtils.prepareMockBackend; +import static io.trino.gateway.ha.HaGatewayTestUtils.setUpBackend; +import static io.trino.gateway.ha.handler.HttpUtils.V1_STATEMENT_PATH; +import static io.trino.gateway.ha.util.TestcontainersUtils.createPostgreSqlContainer; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS; + +@TestInstance(PER_CLASS) +final class TestProxyRequestHandlerQueryHistoryDisabled +{ + private final OkHttpClient httpClient = new OkHttpClient(); + private final MockWebServer mockTrinoServer = new MockWebServer(); + private final PostgreSQLContainer postgresql = createPostgreSqlContainer(); + + private final int routerPort = 22001 + (int) (Math.random() * 1000); + private final int customBackendPort = 22000 + (int) (Math.random() * 1000); + + private static final MediaType MEDIA_TYPE = MediaType.parse("application/json; charset=utf-8"); + private static final String TEST_QUERY_ID = "20240101_123456_00000_abcde"; + + private final String healthCheckEndpoint = "/v1/info"; + private Jdbi jdbi; + + @BeforeAll + void setup() + throws Exception + { + prepareMockBackend(mockTrinoServer, customBackendPort, "default custom response"); + mockTrinoServer.setDispatcher(new Dispatcher() { + @Override + public MockResponse dispatch(RecordedRequest request) + { + if (request.getPath().equals(healthCheckEndpoint)) { + return new MockResponse().setResponseCode(200) + .setHeader(CONTENT_TYPE, JSON_UTF_8) + .setBody("{\"starting\": false}"); + } + + if (request.getMethod().equals("POST") && request.getPath().equals(V1_STATEMENT_PATH)) { + return new MockResponse().setResponseCode(200) + .setHeader(CONTENT_TYPE, JSON_UTF_8) + .setBody("{\"id\": \"" + TEST_QUERY_ID + "\", \"stats\": {}}"); + } + + return new MockResponse().setResponseCode(404); + } + }); + + postgresql.start(); + + File testConfigFile = buildGatewayConfig(postgresql, routerPort, "test-config-with-query-history-disabled.yml"); + + String[] args = {testConfigFile.getAbsolutePath()}; + HaGatewayLauncher.main(args); + + setUpBackend("custom", "http://localhost:" + customBackendPort, "externalUrl", true, "adhoc", routerPort); + + jdbi = Jdbi.create(postgresql.getJdbcUrl(), postgresql.getUsername(), postgresql.getPassword()); + } + + @AfterAll + void cleanup() + throws Exception + { + mockTrinoServer.shutdown(); + } + + @Test + void testQueryHistoryNotRecordedWhenDisabled() + throws Exception + { + String url = "http://localhost:" + routerPort + V1_STATEMENT_PATH; + String testQuery = "SELECT 1"; + RequestBody requestBody = RequestBody.create(testQuery, MEDIA_TYPE); + + Request postRequest = new Request.Builder() + .url(url) + .addHeader("X-Trino-User", "test-user") + .post(requestBody) + .build(); + + try (Response response = httpClient.newCall(postRequest).execute()) { + assertThat(response.isSuccessful()).isTrue(); + assertThat(response.body()).isNotNull(); + String responseBody = response.body().string(); + assertThat(responseBody).contains(TEST_QUERY_ID); + } + + // Verify that query history was NOT recorded in the database + List> queryHistory = jdbi.withHandle(handle -> + handle.createQuery("SELECT * FROM query_history WHERE query_id = :queryId") + .bind("queryId", TEST_QUERY_ID) + .mapToMap() + .list()); + + assertThat(queryHistory).isEmpty(); + } +} diff --git a/gateway-ha/src/test/java/io/trino/gateway/proxyserver/TestProxyRequestHandlerQueryHistoryEnabled.java b/gateway-ha/src/test/java/io/trino/gateway/proxyserver/TestProxyRequestHandlerQueryHistoryEnabled.java new file mode 100644 index 000000000..526105450 --- /dev/null +++ b/gateway-ha/src/test/java/io/trino/gateway/proxyserver/TestProxyRequestHandlerQueryHistoryEnabled.java @@ -0,0 +1,146 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.trino.gateway.proxyserver; + +import io.trino.gateway.ha.HaGatewayLauncher; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.mockwebserver.Dispatcher; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; +import okhttp3.mockwebserver.RecordedRequest; +import org.jdbi.v3.core.Jdbi; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.testcontainers.containers.PostgreSQLContainer; + +import java.io.File; +import java.util.List; +import java.util.Map; + +import static com.google.common.net.HttpHeaders.CONTENT_TYPE; +import static com.google.common.net.MediaType.JSON_UTF_8; +import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; +import static io.trino.gateway.ha.HaGatewayTestUtils.buildGatewayConfig; +import static io.trino.gateway.ha.HaGatewayTestUtils.prepareMockBackend; +import static io.trino.gateway.ha.HaGatewayTestUtils.setUpBackend; +import static io.trino.gateway.ha.handler.HttpUtils.V1_STATEMENT_PATH; +import static io.trino.gateway.ha.util.TestcontainersUtils.createPostgreSqlContainer; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS; + +@TestInstance(PER_CLASS) +final class TestProxyRequestHandlerQueryHistoryEnabled +{ + private final OkHttpClient httpClient = new OkHttpClient(); + private final MockWebServer mockTrinoServer = new MockWebServer(); + private final PostgreSQLContainer postgresql = createPostgreSqlContainer(); + + private final int routerPort = 23001 + (int) (Math.random() * 1000); + private final int customBackendPort = 23000 + (int) (Math.random() * 1000); + + private static final MediaType MEDIA_TYPE = MediaType.parse("application/json; charset=utf-8"); + private static final String TEST_QUERY_ID = "20240101_123456_00001_xyzab"; + + private final String healthCheckEndpoint = "/v1/info"; + private Jdbi jdbi; + + @BeforeAll + void setup() + throws Exception + { + prepareMockBackend(mockTrinoServer, customBackendPort, "default custom response"); + mockTrinoServer.setDispatcher(new Dispatcher() { + @Override + public MockResponse dispatch(RecordedRequest request) + { + if (request.getPath().equals(healthCheckEndpoint)) { + return new MockResponse().setResponseCode(200) + .setHeader(CONTENT_TYPE, JSON_UTF_8) + .setBody("{\"starting\": false}"); + } + + if (request.getMethod().equals("POST") && request.getPath().equals(V1_STATEMENT_PATH)) { + return new MockResponse().setResponseCode(200) + .setHeader(CONTENT_TYPE, JSON_UTF_8) + .setBody("{\"id\": \"" + TEST_QUERY_ID + "\", \"stats\": {}}"); + } + + return new MockResponse().setResponseCode(404); + } + }); + + postgresql.start(); + + // Use default test config (query history enabled by default) + File testConfigFile = buildGatewayConfig(postgresql, routerPort, "test-config-template.yml"); + + String[] args = {testConfigFile.getAbsolutePath()}; + HaGatewayLauncher.main(args); + + setUpBackend("custom-enabled", "http://localhost:" + customBackendPort, "externalUrl", true, "adhoc", routerPort); + + jdbi = Jdbi.create(postgresql.getJdbcUrl(), postgresql.getUsername(), postgresql.getPassword()); + } + + @AfterAll + void cleanup() + throws Exception + { + mockTrinoServer.shutdown(); + } + + @Test + void testQueryHistoryRecordedWhenEnabled() + throws Exception + { + String url = "http://localhost:" + routerPort + V1_STATEMENT_PATH; + String testQuery = "SELECT 2"; + RequestBody requestBody = RequestBody.create(testQuery, MEDIA_TYPE); + + Request postRequest = new Request.Builder() + .url(url) + .addHeader("X-Trino-User", "test-user-enabled") + .post(requestBody) + .build(); + + try (Response response = httpClient.newCall(postRequest).execute()) { + assertThat(response.isSuccessful()).isTrue(); + assertThat(response.body()).isNotNull(); + String responseBody = response.body().string(); + assertThat(responseBody).contains(TEST_QUERY_ID); + } + + // Wait a bit for async query history submission + sleepUninterruptibly(2, SECONDS); + + // Verify that query history WAS recorded in the database + List> queryHistory = jdbi.withHandle(handle -> + handle.createQuery("SELECT * FROM query_history WHERE query_id = :queryId") + .bind("queryId", TEST_QUERY_ID) + .mapToMap() + .list()); + + assertThat(queryHistory).hasSize(1); + assertThat(queryHistory.get(0).get("query_id")).isEqualTo(TEST_QUERY_ID); + assertThat(queryHistory.get(0).get("user_name")).isEqualTo("test-user-enabled"); + assertThat(queryHistory.get(0).get("query_text")).isEqualTo(testQuery); + } +} diff --git a/gateway-ha/src/test/resources/test-config-template.yml b/gateway-ha/src/test/resources/test-config-template.yml index 03ba6425d..f6a7c6885 100644 --- a/gateway-ha/src/test/resources/test-config-template.yml +++ b/gateway-ha/src/test/resources/test-config-template.yml @@ -8,6 +8,7 @@ dataStore: user: ${ENV:POSTGRESQL_USER} password: ${ENV:POSTGRESQL_PASSWORD} driver: org.postgresql.Driver + queryHistoryEnabled: true clusterStatsConfiguration: monitorType: INFO_API diff --git a/gateway-ha/src/test/resources/test-config-with-query-history-disabled.yml b/gateway-ha/src/test/resources/test-config-with-query-history-disabled.yml new file mode 100644 index 000000000..3cbb7f958 --- /dev/null +++ b/gateway-ha/src/test/resources/test-config-with-query-history-disabled.yml @@ -0,0 +1,29 @@ +serverConfig: + node.environment: test + http-server.http.port: ${ENV:REQUEST_ROUTER_PORT} + +includeClusterHostInResponse: true +dataStore: + jdbcUrl: ${ENV:POSTGRESQL_JDBC_URL} + user: ${ENV:POSTGRESQL_USER} + password: ${ENV:POSTGRESQL_PASSWORD} + driver: org.postgresql.Driver + queryHistoryEnabled: false + +clusterStatsConfiguration: + monitorType: INFO_API + +monitor: + taskDelay: 1s + +extraWhitelistPaths: + - '/v1/custom.*' + - '/custom/logout.*' + +gatewayCookieConfiguration: + enabled: true + cookieSigningSecret: "kjlhbfrewbyuo452cds3dc1234ancdsjh" + +oauth2GatewayCookieConfiguration: + deletePaths: + - "/custom/logout" \ No newline at end of file