Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e59dc9c
form flow for building blocks
marijnritense Mar 31, 2026
001e1e1
feedback
marijnritense Mar 31, 2026
feab67b
feedback
marijnritense Mar 31, 2026
1050e68
PoC mongo for document queries
marijnritense Apr 3, 2026
2e8ef50
indexes
marijnritense Apr 3, 2026
2722d36
opensearch poc (wip)
marijnritense Apr 7, 2026
0262312
more poc
marijnritense Apr 23, 2026
38ff807
bumped up limit to see proper counts and pagination
marijnritense Apr 23, 2026
00d0087
more poc
marijnritense Apr 24, 2026
3b39d66
more poc
marijnritense Apr 24, 2026
5b5184a
Merge branch 'next-minor' into poc/opensearch-for-document-queries
marijnritense Jun 29, 2026
78c7f00
merge issue fixed
marijnritense Jun 29, 2026
4b88594
added global search to the case list
marijnritense Jun 29, 2026
f648746
added toggle for search engine
marijnritense Jun 30, 2026
66d362f
removed mongodb module
marijnritense Jun 30, 2026
71a19d4
fixed tests
marijnritense Jun 30, 2026
b2d654b
search improvements for both opensearch and the current one. Includes…
marijnritense Jul 2, 2026
2ed5e5a
added fallback for when opensearch is unavailable
marijnritense Jul 3, 2026
c88fae7
changed opensearch to be disabled by default
marijnritense Jul 6, 2026
68aa153
Opensearch improvements (#774)
ivo-ritense Jul 6, 2026
39e830f
Merge branch 'next-minor' into poc/opensearch-for-document-queries
marijnritense Jul 6, 2026
9000142
- open search admin page
marijnritense Jul 7, 2026
c79ff9c
made search field always expanded
marijnritense Jul 9, 2026
d8a7c52
query fixes to respect access control
marijnritense Jul 9, 2026
b166d87
Merge branch 'feature/gh794-global-search-and-opensearch' into poc/op…
marijnritense Jul 10, 2026
d3961b8
resilience + UI changes
marijnritense Jul 10, 2026
bb98e31
added overview for past reindex runs
marijnritense Jul 13, 2026
6ce480f
made the expanded rows consistent with carbon design
marijnritense Jul 13, 2026
309390d
many reindexing page improvements
marijnritense Jul 13, 2026
aa86120
performance improvements for reindexing (caching, storing final count…
marijnritense Jul 13, 2026
e973d8f
fixed corner case where an empty table would not update when starting…
marijnritense Jul 13, 2026
a6ff1f1
Merge branch 'next-minor' into poc/opensearch-for-document-queries
marijnritense Jul 14, 2026
dee1946
PR feedback
marijnritense Jul 16, 2026
3157a20
Merge branch 'refs/heads/next-minor' into poc/opensearch-for-document…
marijnritense Jul 16, 2026
fa6659a
PR feedback
marijnritense Jul 16, 2026
d30f2ed
pr feedback
marijnritense Jul 16, 2026
f2d6632
pr feedback
marijnritense Jul 16, 2026
5c2e173
changed the changedOn update to not rely on the CurrentTimeStamp anno…
marijnritense Jul 16, 2026
f50634a
added opensearch configurations to the other apps + moved dependency …
marijnritense Jul 17, 2026
fab0808
fixed bug where the searches would be case sensitive
marijnritense Jul 17, 2026
14901ab
security for opensearch
marijnritense Jul 17, 2026
bce4230
added progress bar for pruning
marijnritense Jul 17, 2026
2fd68d5
documentation
marijnritense Jul 17, 2026
ed25f9c
fixed potential risk with sql injection
marijnritense Jul 17, 2026
6dcd4db
improved when the opensearch beans are available
marijnritense Jul 17, 2026
d7cbb1e
fixed incorrect link
marijnritense Jul 17, 2026
a125a18
fixed corner case allowing users to search when no search fields were…
marijnritense Jul 17, 2026
7ef5690
changed opensearch reindex runs to be split into two sections
marijnritense Jul 20, 2026
aa36520
Adjust styles
sofiaIvarsRitense Jul 20, 2026
c04eb42
Remove extra margin bottom
sofiaIvarsRitense Jul 20, 2026
1511131
pr feedback, extra tests
marijnritense Jul 20, 2026
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
3 changes: 3 additions & 0 deletions backend/apps/dev/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-webflux"
implementation "org.springframework.boot:spring-boot-starter-security"

// OpenSearch client for InsecureSslOpenSearchClientConfig
implementation "org.opensearch.client:spring-data-opensearch-starter:${springDataOpenSearchVersion}"
Comment thread
ivo-ritense marked this conversation as resolved.

// Spring cloud stream RabbitMQ
implementation "org.springframework.cloud:spring-cloud-starter-stream-rabbit:${springCloudStreamVersion}"
implementation "com.rabbitmq:amqp-client:$amqpCLientVersion"
Expand Down
19 changes: 19 additions & 0 deletions backend/apps/dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,24 @@ services:
volumes:
- gzac-database-data-mysql:/var/lib/mysql # persist data even if container shuts down

gzac-opensearch:
container_name: gzac-docker-compose-gzac-opensearch
image: opensearchproject/opensearch:2.19.2
ports:
- "9200:9200"
environment:
- discovery.type=single-node
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=2cr8zkOoEXQJ3xUk!Aa1
- OPENSEARCH_JAVA_OPTS=-Xms256m -Xmx256m
volumes:
- gzac-opensearch-data:/usr/share/opensearch/data
healthcheck:
test: [ "CMD-SHELL", "curl -sf -u admin:2cr8zkOoEXQJ3xUk!Aa1 https://localhost:9200/_cluster/health -k || exit 1" ]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s

gzac-rabbitmq:
image: rabbitmq:4.1.0-management
container_name: gzac-docker-compose-gzac-rabbitmq
Expand Down Expand Up @@ -733,3 +751,4 @@ services:
volumes:
gzac-database-data:
gzac-database-data-mysql:
gzac-opensearch-data:
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* Copyright 2015-2026 Ritense BV, the Netherlands.
*
* Licensed under EUPL, Version 1.2 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
*
* 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 com.ritense.gzac.opensearch

import org.apache.http.auth.AuthScope
import org.apache.http.auth.UsernamePasswordCredentials
import org.apache.http.conn.ssl.NoopHostnameVerifier
import org.apache.http.conn.ssl.TrustAllStrategy
import org.apache.http.impl.client.BasicCredentialsProvider
import org.apache.http.ssl.SSLContextBuilder
import org.opensearch.client.RestClientBuilder
import org.opensearch.spring.boot.autoconfigure.RestClientBuilderCustomizer
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

/**
* Dev-only configuration that disables SSL certificate verification for OpenSearch
* and configures basic authentication.
* Allows connecting to OpenSearch with self-signed certificates in local development.
*
* DO NOT use this configuration in production.
*/
@Configuration
class InsecureSslOpenSearchClientConfig {
Comment thread
ivo-ritense marked this conversation as resolved.

@Value("\${opensearch.username:}")
private lateinit var username: String

@Value("\${opensearch.password:}")
private lateinit var password: String

@Bean
fun insecureSslRestClientBuilderCustomizer(): RestClientBuilderCustomizer {
return object : RestClientBuilderCustomizer {
override fun customize(builder: RestClientBuilder) {
builder.setHttpClientConfigCallback { httpClientBuilder ->
val sslContext = SSLContextBuilder.create()
.loadTrustMaterial(TrustAllStrategy.INSTANCE)
.build()

httpClientBuilder
.setSSLContext(sslContext)
.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)

if (username.isNotBlank() && password.isNotBlank()) {
val credentialsProvider = BasicCredentialsProvider()
credentialsProvider.setCredentials(
AuthScope.ANY,
UsernamePasswordCredentials(username, password)
)
httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider)
}

httpClientBuilder
}
}
}
}
}
7 changes: 7 additions & 0 deletions backend/apps/dev/src/main/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,14 @@ mailing:
whitelistedDomains:
sendRedirectedMailsTo:

opensearch:
uris: https://localhost:9200
username: admin
password: 2cr8zkOoEXQJ3xUk!Aa1

valtimo:
opensearch:
enabled: true
app:
scheme: http
hostname: ${VALTIMO_APP_HOSTNAME}
Expand Down
1 change: 1 addition & 0 deletions backend/apps/dev/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<logger name="springfox" level="WARN"/>
<logger name="sun.rmi" level="WARN"/>
<logger name="sun.rmi.transport" level="WARN"/>
<logger name="org.opensearch.client.RestClient" level="WARN"/>

<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ server:
mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
min-response-size: 1024

opensearch:
uris: ${OPENSEARCH_URIS:}
username: ${OPENSEARCH_USERNAME:}
password: ${OPENSEARCH_PASSWORD:}

mailing:
onlyAllowWhitelistedRecipients: true
redirectAllMails: false
Expand All @@ -145,6 +150,8 @@ mailing:
sendRedirectedMailsTo:

valtimo:
opensearch:
enabled: ${VALTIMO_OPENSEARCH_ENABLED:false}
app:
scheme: http
hostname: ${VALTIMO_APP_HOSTNAME}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Copyright 2015-2026 Ritense BV, the Netherlands.
~
~ Licensed under EUPL, Version 1.2 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
~
~ 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.
-->

<configuration scan="true">
<include resource="config/logging/logback/valtimo-defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
Expand Down Expand Up @@ -44,6 +60,7 @@
<logger name="okhttp3" level="WARN"/>
<logger name="org.hibernate.engine.jdbc.spi" level="INFO"/>
<logger name="com.vladmihalcea.hibernate" level="WARN"/>
<logger name="org.opensearch.client.RestClient" level="WARN"/>

<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
Expand Down
7 changes: 7 additions & 0 deletions backend/apps/gzac/src/main/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ server:
mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
min-response-size: 1024

opensearch:
uris: ${OPENSEARCH_URIS:}
username: ${OPENSEARCH_USERNAME:}
password: ${OPENSEARCH_PASSWORD:}

mailing:
onlyAllowWhitelistedRecipients: true
redirectAllMails: false
Expand All @@ -145,6 +150,8 @@ mailing:
sendRedirectedMailsTo:

valtimo:
opensearch:
enabled: ${VALTIMO_OPENSEARCH_ENABLED:false}
app:
scheme: http
hostname: ${VALTIMO_APP_HOSTNAME}
Expand Down
17 changes: 17 additions & 0 deletions backend/apps/gzac/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Copyright 2015-2026 Ritense BV, the Netherlands.
~
~ Licensed under EUPL, Version 1.2 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
~
~ 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.
-->

<configuration scan="true">
<include resource="config/logging/logback/valtimo-defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
Expand Down Expand Up @@ -44,6 +60,7 @@
<logger name="okhttp3" level="WARN"/>
<logger name="org.hibernate.engine.jdbc.spi" level="INFO"/>
<logger name="com.vladmihalcea.hibernate" level="WARN"/>
<logger name="org.opensearch.client.RestClient" level="WARN"/>

<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ logging:
management:
endpoint:
health:
probes:
enabled: true
group:
# readiness (and a dedicated startup group) only report UP once the bootstrap
# health indicator is UP, i.e. after migrations + autodeployments have finished.
Expand Down Expand Up @@ -137,6 +139,11 @@ server:
mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
min-response-size: 1024

opensearch:
uris: ${OPENSEARCH_URIS:}
username: ${OPENSEARCH_USERNAME:}
password: ${OPENSEARCH_PASSWORD:}

mailing:
onlyAllowWhitelistedRecipients: true
redirectAllMails: false
Expand All @@ -145,6 +152,8 @@ mailing:
sendRedirectedMailsTo:

valtimo:
opensearch:
enabled: ${VALTIMO_OPENSEARCH_ENABLED:false}
app:
scheme: http
hostname: ${VALTIMO_APP_HOSTNAME}
Expand Down
17 changes: 17 additions & 0 deletions backend/apps/valtimo/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Copyright 2015-2026 Ritense BV, the Netherlands.
~
~ Licensed under EUPL, Version 1.2 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
~
~ 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.
-->

<configuration scan="true">
<include resource="config/logging/logback/valtimo-defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
Expand Down Expand Up @@ -44,6 +60,7 @@
<logger name="okhttp3" level="WARN"/>
<logger name="org.hibernate.engine.jdbc.spi" level="INFO"/>
<logger name="com.vladmihalcea.hibernate" level="WARN"/>
<logger name="org.opensearch.client.RestClient" level="WARN"/>

<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
Expand Down
74 changes: 74 additions & 0 deletions backend/case-opensearch/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* Copyright 2015-2024 Ritense BV, the Netherlands.
*
* Licensed under EUPL, Version 1.2 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
*
* 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.
*/

dockerCompose {
projectName = "case-opensearch"
integrationTestingPostgresql {
isRequiredBy(project.tasks.integrationTestingPostgresql)
useComposeFiles.addAll(
"../docker-resources/docker-compose-base-test-postgresql.yml",
"docker-compose-override-postgresql.yml"
)
}
}

dependencies {
implementation project(":backend:admin-settings")
implementation project(":backend:authorization")
implementation project(":backend:case")
implementation project(":backend:inbox")
implementation project(":backend:outbox")

// ShedLock for cross-instance coordination of the re-index job. The LockProvider bean itself
// is supplied at runtime by core's SchedulerAutoConfiguration; here we only need the API.
implementation "net.javacrumbs.shedlock:shedlock-spring:${shedlockVersion}"

implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-security"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin"
implementation "io.github.oshai:kotlin-logging:${kotlinLoggingVersion}"

// OpenSearch via spring-data-opensearch (Apache 2.0 licensed)
implementation "org.opensearch.client:spring-data-opensearch-starter:${springDataOpenSearchVersion}"

annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor"

testImplementation project(':backend:test-utils-common')
testImplementation project(':backend:core')
testImplementation(project(':backend:audit')) {
exclude(group: "com.ritense.valtimo", module: "case")
}
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation "org.mockito.kotlin:mockito-kotlin:${mockitoKotlinVersion}"
testImplementation "org.postgresql:postgresql"
testImplementation "org.springframework.security:spring-security-test"

jar {
enabled = true
manifest {
attributes("Implementation-Title": "Ritense Case OpenSearch module")
attributes("Implementation-Version": projectVersion)
}
}
}
Comment thread
marijnritense marked this conversation as resolved.

tasks.named("integrationTestingPostgresql") {
systemProperty("liquibase.duplicateFileMode", "WARN")
}

apply from: "gradle/publishing.gradle"
20 changes: 20 additions & 0 deletions backend/case-opensearch/docker-compose-override-postgresql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
services:
db:
ports:
- "3365:5432"
environment:
- POSTGRES_DB=case-opensearch-test
opensearch:
image: opensearchproject/opensearch:2.19.2
environment:
- discovery.type=single-node
- DISABLE_SECURITY_PLUGIN=true
- DISABLE_INSTALL_DEMO_CONFIG=true
ports:
- "39200:9200"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
interval: 5s
timeout: 10s
retries: 40
start_period: 15s
Loading
Loading