Commit Graph

129 Commits

Author SHA1 Message Date
renovate[bot] a6fc4004bd
fix(deps): update dependency org.postgresql:postgresql to v42.7.12 [security] (#5832)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [org.postgresql:postgresql](https://jdbc.postgresql.org)
([source](https://redirect.github.com/pgjdbc/pgjdbc)) | `42.7.11` →
`42.7.12` |
![age](https://developer.mend.io/api/mc/badges/age/maven/org.postgresql:postgresql/42.7.12?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.postgresql:postgresql/42.7.11/42.7.12?slim=true)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/2069) for more information.

---

### PostgreSQL JDBC Driver: Silent channel-binding authentication
downgrade via unsupported certificate algorithms
[CVE-2026-54291](https://nvd.nist.gov/vuln/detail/CVE-2026-54291) /
[GHSA-j92g-9f8w-j867](https://redirect.github.com/advisories/GHSA-j92g-9f8w-j867)

<details>
<summary>More information</summary>

#### Details
##### Impact

`channelBinding=require` connections can be silently downgraded from
`SCRAM-SHA-256-PLUS` (with channel binding) to plain `SCRAM-SHA-256`
(without it), losing the man-in-the-middle protection the setting is
meant to guarantee. An attacker who can intercept the TLS connection
triggers the downgrade with a certificate whose signature algorithm has
no `tls-server-end-point` channel-binding hash. Examples are `Ed25519`,
`Ed448`, and post-quantum algorithms.

Two issues combine in releases 42.7.4 through 42.7.11:

1. The bundled `com.ongres.scram:scram-client` (3.1 or 3.2) returns an
empty byte array instead of failing when it cannot derive the binding
hash for such a certificate. This is the library issue tracked as
[GHSA-p9jg-fcr6-3mhf](https://redirect.github.com/ongres/scram/security/advisories/GHSA-p9jg-fcr6-3mhf).
2. pgJDBC does not enforce `channelBinding=require` where it matters.
`ScramAuthenticator` checks only that the server *advertised* a `-PLUS`
mechanism; it neither rejects the empty binding nor checks that the
*negotiated* mechanism uses channel binding. The connection therefore
downgrades silently, and would do so even against a fixed
`scram-client`, because the missing enforcement is in pgJDBC's own code.

Only connections that set `channelBinding=require` are affected. Under
the default `prefer` policy, and under `allow` or `disable`, falling
back to plain SCRAM is the documented behaviour. Releases before 42.7.4
are unaffected, because they do not support channel binding.

##### Patches

Fixed in pgJDBC 42.7.12. pgJDBC now enforces channel binding in its own
code, independently of the `scram-client` version:

- Under `channelBinding=require`, it fails the connection when no
channel-binding data can be extracted from the server certificate,
instead of passing an empty value to the SCRAM client. The error names
the certificate signature algorithm.
- After negotiation, it requires the selected mechanism to use channel
binding (a `-PLUS` mechanism) whenever `channelBinding=require` is set,
regardless of how negotiation resolved.

Upgrade to 42.7.12 or later.

##### Workarounds

No pgJDBC setting restores channel-binding enforcement on an affected
release; upgrading is the fix.

If you cannot upgrade immediately, verify the server certificate at the
TLS layer so that a man-in-the-middle cannot present a substitute
certificate. Set `sslmode=verify-full` with a truststore that contains
only your server's CA. This defence is independent of channel binding
and blocks the same attacker. Connections that rely on
`channelBinding=require` in place of certificate verification have no
equivalent workaround and should upgrade.

##### References

-
[GHSA-p9jg-fcr6-3mhf](https://redirect.github.com/ongres/scram/security/advisories/GHSA-p9jg-fcr6-3mhf)
— the related `com.ongres.scram:scram-client` issue (root cause of the
empty channel-binding value).
- `scram-client` 3.3 release (library fix):
https://github.com/ongres/scram/releases/tag/3.3
- pgJDBC fix in 42.7.12:
[commit](77df98e4e6)

#### Severity
- CVSS Score: 8.2 / 10 (High)
- Vector String:
`CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:L/SA:N`

#### References
-
[https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-j92g-9f8w-j867](https://redirect.github.com/pgjdbc/pgjdbc/security/advisories/GHSA-j92g-9f8w-j867)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-54291](https://nvd.nist.gov/vuln/detail/CVE-2026-54291)
-
[77df98e4e6)
-
[https://github.com/ongres/scram/releases/tag/3.3](https://redirect.github.com/ongres/scram/releases/tag/3.3)
-
[https://github.com/advisories/GHSA-j92g-9f8w-j867](https://redirect.github.com/advisories/GHSA-j92g-9f8w-j867)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-j92g-9f8w-j867)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>pgjdbc/pgjdbc (org.postgresql:postgresql)</summary>

###
[`v42.7.12`](https://redirect.github.com/pgjdbc/pgjdbc/blob/HEAD/CHANGELOG.md#42712-2026-06-29)

##### Security

- fix: Enforce SCRAM channel-binding policy and prevent silent
downgrade.
Under `channelBinding=require`, the driver silently downgraded from
`SCRAM-SHA-256-PLUS` (with channel binding) to plain `SCRAM-SHA-256`
(without it) when the server presented a certificate whose signature
algorithm has no `tls-server-end-point` channel-binding hash (e.g.
[`Ed25519`](https://redirect.github.com/pgjdbc/pgjdbc/commit/Ed25519),
Ed448, or post-quantum algorithms). An attacker who can intercept the
TLS connection could exploit this to strip channel-binding protection.
The fix enforces channel binding in the driver's own code: it now fails
the connection when no binding data can be extracted, and verifies the
negotiated mechanism uses channel binding (`-PLUS`) when `require` is
set.
Only connections that set `channelBinding=require` are affected. The
default `prefer` policy and releases before 42.7.4 (which introduced
channel-binding support) are unaffected.
See the [Security
Advisory](https://redirect.github.com/pgjdbc/pgjdbc/security/advisories/GHSA-j92g-9f8w-j867)
for more detail.
The following
[CVE-2026-54291](https://nvd.nist.gov/vuln/detail/CVE-2026-54291) has
been issued.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/langchain4j/langchain4j).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNzUuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI3NS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-23 17:39:56 +02:00
github-actions[bot] a39f132b91 Update versions to 1.19.0-SNAPSHOT and 1.19.0-beta29-SNAPSHOT 2026-07-17 13:42:56 +00:00
github-actions[bot] 66ad5ee6d5 Release versions 1.18.0 and 1.18.0-beta28 2026-07-17 12:34:45 +00:00
Subhash Polisetti e59754e998
fix: pass builder skipCreateVectorExtension to PgVectorEmbeddingStore (#5788)
## Issue 
Closes #5784


## Change

`PgVectorEmbeddingStore.builder().skipCreateVectorExtension(true)` had
no effect. The
`PgVectorEmbeddingStoreBuilder` constructor routed through an older
constructor that passes
`skipCreateVectorExtension(null)`, so the value set on the builder never
reached the store and defaulted to `false`.
The store kept running `CREATE EXTENSION IF NOT EXISTS vector` on every
connection. The `datasourceBuilder()` path
was not affected.

Fix: build the store through `DatasourceBuilder` directly and pass
`skipCreateVectorExtension` with the other
settings. No API change.

## Tests

Added `PgVectorEmbeddingStoreBuilderTest` (offline):
`skipCreateVectorExtension(true)` on the builder now reaches
the store (fails on current `main`), and stays `false` when unset. Full
module `verify` is green (unit +
Testcontainers integration tests).

## General checklist
- [x] There are no breaking changes (API, behaviour)
- [x] I have added unit and/or integration tests for my change
- [x] The tests cover both positive and negative cases
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [x] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2026-07-17 10:05:35 +02:00
agent b3a70729db mask secrets in toString() 2026-07-06 10:18:11 +02:00
github-actions[bot] 7d7c3349d7 Update versions to 1.18.0-SNAPSHOT and 1.18.0-beta28-SNAPSHOT 2026-06-26 14:49:40 +00:00
github-actions[bot] 207407aec9 Release versions 1.17.0 and 1.17.0-beta27 2026-06-26 13:13:06 +00:00
Eunbin Son 0c38bf786e
fix: match ContainsString as a literal substring in PgVector filter (#5595)
## Issue
Closes #5594

## Change

`PgVectorFilterMapper.mapContains()` mapped the `ContainsString` filter
to the PostgreSQL `~` operator, which is POSIX regular-expression
matching. The core `ContainsString` contract is literal substring
containment (`str.contains`), so values with regex metacharacters were
misinterpreted: `"a.b"` also matched `axb`, `"C++"` matched `CC` but not
`C++`, and an unbalanced `"["` raised `invalid regular expression` at
query time.

This replaces `~` with the native literal-substring function
`position(value in column) > 0`. It matches the core contract and the
sibling MongoDB (`Pattern.quote`) and Milvus (`LIKE`) mappers. The
existing single-quote escaping in `formatValue` still covers SQL-literal
safety, so no metacharacter escaping table is needed.

Added three unit tests in `PgVectorFilterMapperTest` (JSON and column
mappers, plus single-quote escaping). Each fails on the old `~` mapping
and passes after the fix.

## General checklist
- [ ] There are no breaking changes (API, behaviour)
<!-- API unchanged. Behaviour changes only for values containing regex
metacharacters — that misinterpretation is exactly the bug being fixed;
correct literal-substring usage is unaffected. -->
- [X] I have added unit and/or integration tests for my change
- [ ] The tests cover both positive and negative cases
<!-- This corrects the generated SQL for a filter mapping, so the tests
assert the correct literal-substring output; there is no reject/negative
path to cover. -->
- [X] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
<!-- PgVectorFilterMapperTest: 13 tests green (JDK 17). *IT require a
live PostgreSQL/Testcontainers and were not run locally. -->
- [ ] I have manually run all the unit and integration tests in the core
and main modules, and they are all green
- [ ] I have added/updated the documentation
- [ ] I have added an example in the examples repo (only for "big"
features)
- [ ] I have added/updated Spring Boot starter(s) (if applicable)

<!-- 신규 maven 모듈/신규 embedding store 체크리스트: 해당 없음(기존 모듈 버그픽스). -->

## Checklist for changing existing embedding store integration
- [ ] I have manually verified that the `PgVectorEmbeddingStore` works
correctly with the data persisted using the latest released version of
LangChain4j
<!-- This changes only the WHERE-clause generation for the
ContainsString filter; stored data format is unchanged. -->

---

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 10:38:07 +02:00
Dmytro Liubarskyi ce96291dfb Fix SQL injection via metadata filters in langchain4j-mariadb and langchain4j-pgvector 2026-06-17 10:53:27 +02:00
github-actions[bot] 01de41d641 Update versions to 1.17.0-SNAPSHOT and 1.17.0-beta27-SNAPSHOT 2026-06-06 06:46:38 +00:00
github-actions[bot] cd836845dd Release versions 1.16.0 and 1.16.0-beta26 2026-06-05 15:46:56 +00:00
github-actions[bot] 6185599e37 Update versions to 1.16.0-SNAPSHOT and 1.16.0-beta26-SNAPSHOT 2026-05-15 16:21:14 +00:00
github-actions[bot] d0e54aa006 Release versions 1.15.0 and 1.15.0-beta25 2026-05-15 15:55:12 +00:00
renovate[bot] 5dd5eb2182
Update dependency org.postgresql:postgresql to v42.7.11 [SECURITY] (#5118)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [org.postgresql:postgresql](https://jdbc.postgresql.org)
([source](https://redirect.github.com/pgjdbc/pgjdbc)) | `42.7.7` →
`42.7.11` |
![age](https://developer.mend.io/api/mc/badges/age/maven/org.postgresql:postgresql/42.7.11?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.postgresql:postgresql/42.7.7/42.7.11?slim=true)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/2069) for more information.

---

### pgjdbc: Unbounded PBKDF2 iterations in SCRAM authentication allows
CPU exhaustion DoS
[CVE-2026-42198](https://nvd.nist.gov/vuln/detail/CVE-2026-42198) /
[GHSA-98qh-xjc8-98pq](https://redirect.github.com/advisories/GHSA-98qh-xjc8-98pq)

<details>
<summary>More information</summary>

#### Details
##### Summary
pgjdbc is vulnerable to a client-side denial of service during
SCRAM-SHA-256 authentication.

##### Impact
A malicious server can instruct the driver to perform SCRAM
authentication with a very large iteration count.
With a large enough value, the client spends an unbounded amount of CPU
time inside PBKDF2 before authentication can fail.
A single attempt ties up a CPU core. Repeated or concurrent attempts
exhaust client CPU and can wedge connection pools.

In affected versions, `loginTimeout` did not fully mitigate this
problem. When `loginTimeout` expired, the caller could stop waiting, but
the worker thread performing the connection attempt could continue
running and burning CPU inside the SCRAM PBKDF2 computation.

This issue affects availability. It does **not** provide authentication
bypass, privilege escalation, or direct password disclosure.

A user is vulnerable when **all** of the following are true:

1. The connection uses **SCRAM-SHA-256** authentication.
2. The client reaches a **malicious, compromised, or attacker-controlled
PostgreSQL endpoint**.
3. That endpoint sends a very large SCRAM PBKDF2 iteration count in the
`server-first-message`.

In practice, that can happen in these situations:

- the application lets end users or tenants supply their own database
connection details (as in many BI, reporting, analytics, ETL, and
low-code platforms), so a user can point the shared client host at a
server they control
- the application accepts connection strings, hostnames, or JDBC URLs
from user input, configuration uploaded by users, or other untrusted
sources
- the application is configured to connect to a PostgreSQL server that
is itself malicious or later becomes compromised
- the application connects through an untrusted proxy, relay, tunnel,
bastion, or connection-pooling service that can act as the PostgreSQL
server
- an attacker can redirect the client to a fake PostgreSQL endpoint by
manipulating DNS, service discovery, Kubernetes service resolution,
`/etc/hosts`, environment variables, or similar indirection
- an active network attacker on the path can impersonate the server
because the connection does not strongly verify server identity (for
example, `sslmode` lower than `verify-full`, or trusting a CA that signs
hosts outside the operator's control)

The issue is **more damaging** when the application uses connection
retries, many parallel connection attempts, or `loginTimeout` and
assumes the timeout fully stops the work.

##### Patches
The patch introduces a new connection property, `scramMaxIterations`,
with a default of 100K. The client now rejects SCRAM server messages
that advertise more PBKDF2 iterations than the configured cap before
starting the PBKDF2 computation begins.

##### Workarounds

Until a patched version of pgjdbc is deployed, the following measures
reduce exposure:

1. **Only connect to trusted PostgreSQL servers whose identity is
verified.**
Connect only to trusted PostgreSQL servers, and verify server identity
with TLS using sslmode=verify-full and a trusted CA.
TLS without certificate and hostname verification is not sufficient as
an active network attacker can still impersonate the server.

2. **Do not rely on `loginTimeout` as a complete mitigation on unpatched
versions.**
On affected versions, `loginTimeout` can stop the waiting caller while
the worker thread continues spending CPU.

3. **Avoid SCRAM on untrusted or interceptable connection paths.**  
For those paths, use an authentication method that does not let the
server choose a SCRAM PBKDF2 iteration count.

4. **Reduce blast radius operationally.**  
Limit parallel connection attempts, add retry backoff, isolate
connection establishment in a separate worker or process when possible,
and apply CPU or container limits where appropriate.

5. **On trusted servers you control, keep SCRAM iteration counts at
ordinary values.**
This does not defend against an attacker-controlled server, but it
avoids unnecessary client cost when talking to legitimate servers.

#### Severity
- CVSS Score: 7.5 / 10 (High)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

#### References
-
[https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-98qh-xjc8-98pq](https://redirect.github.com/pgjdbc/pgjdbc/security/advisories/GHSA-98qh-xjc8-98pq)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-42198](https://nvd.nist.gov/vuln/detail/CVE-2026-42198)
-
[https://github.com/pgjdbc/pgjdbc/releases/tag/REL42.7.11](https://redirect.github.com/pgjdbc/pgjdbc/releases/tag/REL42.7.11)
-
[https://github.com/advisories/GHSA-98qh-xjc8-98pq](https://redirect.github.com/advisories/GHSA-98qh-xjc8-98pq)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-98qh-xjc8-98pq)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>pgjdbc/pgjdbc (org.postgresql:postgresql)</summary>

###
[`v42.7.11`](https://redirect.github.com/pgjdbc/pgjdbc/blob/HEAD/CHANGELOG.md#42711-2026-04-28)

##### Security

- fix: Limit SCRAM PBKDF2 iterations accepted from the server.
pgjdbc was vulnerable to a client-side denial of service in
SCRAM-SHA-256 authentication, where a malicious or compromised
PostgreSQL server could specify an extremely large PBKDF2 iteration
count, causing the client to consume unbounded CPU and potentially
exhaust connection pools. The fix introduces a new scramMaxIterations
connection property (defaulting to 100,000) to cap iteration counts
before computation begins.
See the [Security
Advisory](https://redirect.github.com/pgjdbc/pgjdbc/security/advisories/GHSA-98qh-xjc8-98pq)
for more detail.
The following
[CVE-2026-42198](https://nvd.nist.gov/vuln/detail/CVE-2026-42198) has
been issued.

##### Added

- feat: implement require\_auth connection property, aligning with libpq
behavior [PR
#&#8203;3895](https://redirect.github.com/pgjdbc/pgjdbc/pull/3895)

##### Changed

- chore: replace Appveyor CI with ikalnytskyi/action-setup-postgres [PR
#&#8203;3966](https://redirect.github.com/pgjdbc/pgjdbc/pull/3966)
- chore: upgrade Gradle to v9 [PR
#&#8203;3978](https://redirect.github.com/pgjdbc/pgjdbc/pull/3978)

##### Fixed

- fix: ensure extended protocol messages end with Sync message [PR
#&#8203;3728](https://redirect.github.com/pgjdbc/pgjdbc/pull/3728)
- fix: enable cursor-based fetching in extended protocol when
transaction started via SQL command [PR
#&#8203;3996](https://redirect.github.com/pgjdbc/pgjdbc/pull/3996)
- fix: retry with SSL on IOException when sslMode=ALLOW [PR
#&#8203;3973](https://redirect.github.com/pgjdbc/pgjdbc/pull/3973)
- fix: make sure the driver honours connectTimeout when retrying the
connection [PR
#&#8203;3968](https://redirect.github.com/pgjdbc/pgjdbc/pull/3968)
- fix: allow fallback to non-SSL connection when sslMode=prefer and
sslResponseTimeout kicks in [PR
#&#8203;3968](https://redirect.github.com/pgjdbc/pgjdbc/pull/3968)
- fix: catch SecurityException from setContextClassLoader on
ForkJoinPool workers [PR
#&#8203;3962](https://redirect.github.com/pgjdbc/pgjdbc/pull/3962)
- fix: use compareTo for LogSequenceNumber comparison to handle unsigned
values correctly [PR
#&#8203;3961](https://redirect.github.com/pgjdbc/pgjdbc/pull/3961)
- fix: release COPY lock on IOException to prevent connection hang [PR
#&#8203;3957](https://redirect.github.com/pgjdbc/pgjdbc/pull/3957)
- fix: return jsonb as PGObject instead of String [PR
#&#8203;3956](https://redirect.github.com/pgjdbc/pgjdbc/pull/3956)
- fix: align SSL key file permission check with libpq [PR
#&#8203;3952](https://redirect.github.com/pgjdbc/pgjdbc/pull/3952)
- fix: guard connection closed flag with a reentrant lock to protect
against concurrent close [PR
#&#8203;3905](https://redirect.github.com/pgjdbc/pgjdbc/pull/3905)

###
[`v42.7.10`](https://redirect.github.com/pgjdbc/pgjdbc/blob/HEAD/CHANGELOG.md#42710-2026-02-11)

##### Changed

- chore: Migrate to Shadow 9 [PR
3931](https://redirect.github.com/pgjdbc/pgjdbc/pull/3931)
- style: fix empty line before javadoc for checkstyle compliance [PR
#&#8203;3925](https://redirect.github.com/pgjdbc/pgjdbc/pull/3925)
- style: fix lambda argument indentation for checkstyle compliance [PR
#&#8203;3922](https://redirect.github.com/pgjdbc/pgjdbc/pull/3922)
- test: add autosave=always|never|conservative and
cleanupSavepoints=true|false to the randomized CI jobs [PR
#&#8203;3917](https://redirect.github.com/pgjdbc/pgjdbc/pull/3917)

##### Fixed

- fix: non-standard strings failing test for version 19 [PR
#&#8203;3934](https://redirect.github.com/pgjdbc/pgjdbc/pull/3934)
- fix: small issues in ConnectionFactoryImpl [PR
#&#8203;3929](https://redirect.github.com/pgjdbc/pgjdbc/pull/3929)
- fix: process pending responses before fastpath to avoid protocol
errors [PR # 3913](https://redirect.github.com/pgjdbc/pgjdbc/pull/3913)
- doc: use.md, fix typos [PR
#&#8203;3911](https://redirect.github.com/pgjdbc/pgjdbc/pull/3911)
- doc: datasource.md, fix minor formatting issue [PR
#&#8203;3912](https://redirect.github.com/pgjdbc/pgjdbc/pull/3912)
- doc: add the new PGP signing key to the official documentation [PR
#&#8203;3912](https://redirect.github.com/pgjdbc/pgjdbc/pull/3813)

##### Reverted

- Revert "fix: make all Calendar instances proleptic Gregorian
([#&#8203;3837](https://redirect.github.com/pgjdbc/pgjdbc/issues/3837))
([#&#8203;3887](https://redirect.github.com/pgjdbc/pgjdbc/issues/3887))"
[PR #&#8203;3932](https://redirect.github.com/pgjdbc/pgjdbc/pull/3932)

###
[`v42.7.9`](https://redirect.github.com/pgjdbc/pgjdbc/blob/HEAD/CHANGELOG.md#4279-2026-01-14)

##### Added

- feat: query timeout property [PR
#&#8203;3705](https://redirect.github.com/pgjdbc/pgjdbc/pull/3705)
- feat: Add PEMKeyManager to handle PEM based certs and keys [PR
#&#8203;3700](https://redirect.github.com/pgjdbc/pgjdbc/pull/3700)

##### Changed

- perf: optimize PGInterval.getValue() by replacing String.format with
StringBuilder
- doc: update property quoteReturningIdentifiers default value [PR
#&#8203;3847](https://redirect.github.com/pgjdbc/pgjdbc/pull/3847)
- security: Use a static method forName to load all user supplied
classes. Use the Class.forName 3 parameter method and do not initilize
it unless it is a subclass of the expected class

##### Fixed

- fix: incorrect pg\_stat\_replication.reply\_time calculation [PR
#&#8203;3906](https://redirect.github.com/pgjdbc/pgjdbc/pull/3906)
- fix: close temporary lob descriptors that are used internally in
PreparedStatement#setBlob
- fix: PGXAConnection.prepare(Xid) should return XA\_RDONLY if the
connection is read only [PR
#&#8203;3897](https://redirect.github.com/pgjdbc/pgjdbc/pull/3897)
- fix: make all Calendar instances proleptic Gregorian [PR
#&#8203;3837](https://redirect.github.com/pgjdbc/pgjdbc/pull/3887)
- fix: Simplify concurrency guards on QueryExecutorBase#transaction and
QueryExecutorBase#standardConformingStrings [PR
#&#8203;3897](https://redirect.github.com/pgjdbc/pgjdbc/pull/3849)
- fix: avoid memory leaks in Java <= 21 caused by
Thread.inheritedAccessControlContext [PR
#&#8203;3886](https://redirect.github.com/pgjdbc/pgjdbc/pull/3886)
- fix: Issue
[#&#8203;3784](https://redirect.github.com/pgjdbc/pgjdbc/issues/3784)
pgjdbc can't decode numeric arrays containing special numbers like NaN
[PR #&#8203;3838](https://redirect.github.com/pgjdbc/pgjdbc/pull/3838)
- fix: use ssl\_is\_used() to check for ssl connection [PR
#&#8203;3867](https://redirect.github.com/pgjdbc/pgjdbc/pull/3867)
- fix: the classloader is nullable [PR
#&#8203;3907](https://redirect.github.com/pgjdbc/pgjdbc/pull/3907)

###
[`v42.7.8`](https://redirect.github.com/pgjdbc/pgjdbc/blob/HEAD/CHANGELOG.md#4278-2025-09-18)

##### Added

- feat: Add configurable boolean-to-numeric conversion for ResultSet
getters [PR
#&#8203;3796](https://redirect.github.com/pgjdbc/pgjdbc/pull/3796)

##### Changed

- perf: remove QUERY\_ONESHOT flag when calling getMetaData [PR
#&#8203;3783](https://redirect.github.com/pgjdbc/pgjdbc/pull/3783)
- perf: use `BufferedInputStream` with `FileInputStream` [PR
#&#8203;3750](https://redirect.github.com/pgjdbc/pgjdbc/pull/3750)
- perf: enable server-prepared statements for DatabaseMetaData

##### Fixed

- fix: avoid NullPointerException when cancelling a query if cancel key
is not known yet
- fix: Change "PST" timezone in TimestampTest to "Pacific Standard Time"
[PR #&#8203;3774](https://redirect.github.com/pgjdbc/pgjdbc/pull/3774)
- fix: traverse the current dimension to get the correct pos in
PgArray#calcRemainingDataLength [PR
#&#8203;3746](https://redirect.github.com/pgjdbc/pgjdbc/pull/3746)
- fix: make sure getImportedExportedKeys returns columns in consistent
order
- fix: Add "SELF\_REFERENCING\_COL\_NAME" field to getTables'
ResultSetMetaData to fix NullPointerException [PR
#&#8203;3660](https://redirect.github.com/pgjdbc/pgjdbc/pull/3660)
- fix: unable to open replication connection to servers < 12
- fix: avoid closing statement caused by driver's internal
ResultSet#close()
- fix: return empty metadata for empty catalog names as it was before
- fix: Incorrect class comparison in PGXmlFactoryFactory validation

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - ""
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/langchain4j/langchain4j).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNTkuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE1OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-07 10:46:01 +02:00
github-actions[bot] 628ac34c01 Update versions to 1.15.0-SNAPSHOT and 1.15.0-beta25-SNAPSHOT 2026-04-30 18:43:12 +00:00
github-actions[bot] 4917afa297 Release versions 1.14.0 and 1.14.0-beta24 2026-04-30 18:10:30 +00:00
zxuhan7 7cf4b114d0
PgVector: parenthesize isNotIn/isNotEqualTo to fix AND/OR precedence (#2513) (#5004)
## Summary
- Wrap the `is null or ...` clauses produced by `mapNotIn` and
`mapNotEqual` in parentheses. Without them,
`someFilter.and(metadataKey("id").isNotIn(...))` rendered as `something
AND id is null OR id not in (...)`, which SQL parses as `(something AND
id is null) OR (id not in (...))` — silently matching rows that should
be filtered out.
- Matches the parenthesization already used in `MariaDbFilterMapper`.

Closes #2513.

## Test plan
- [x] New `PgVectorFilterMapperTest` asserts the parens for both
`JSONFilterMapper` and `ColumnFilterMapper`, and that AND-combined
queries keep correct precedence
- [x] `mvn -pl langchain4j-pgvector test` passes (10/10 unit tests)
2026-04-24 10:36:17 +02:00
github-actions[bot] 4798a89d66 Update versions to 1.14.0-SNAPSHOT and 1.14.0-beta24-SNAPSHOT 2026-04-09 14:41:27 +00:00
github-actions[bot] 759cd9a236 Release versions 1.13.0 and 1.13.0-beta23 2026-04-09 13:07:30 +00:00
Dmytro Liubarskyi e10abf04d0
Update versions to 1.13.0-SNAPSHOT and 1.13.0-beta23-SNAPSHOT (#4710)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-13 11:39:50 +01:00
Dmytro Liubarskyi c92ea033e4
Update versions to 1.13.0-SNAPSHOT and 1.13.0-beta22-SNAPSHOT (#4666)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-05 17:18:22 +01:00
Dmytro Liubarskyi 5e9dea8666 cleanup 2026-02-24 12:38:29 +01:00
Maylo 22739a3f22
fix(PgVector): Clean-up schema name from table name before creating the indices (#4592)
## Issue
Closes #4591

## Change
Add a clean-up step on the table name and use the cleaned name to create
the indices


## General checklist
- [X] There are no breaking changes (API, behaviour)
- [ ] I have added unit and/or integration tests for my change
- [ ] The tests cover both positive and negative cases
- [X] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)


## Checklist for adding new maven module
- [ ] I have added my new module in the root `pom.xml` and
`langchain4j-bom/pom.xml`


## Checklist for adding new embedding store integration
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreRemovalIT` that
extends from `EmbeddingStoreWithRemovalIT`

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j

Co-authored-by: Andreas Avgousti <a.avgousti@albourne.com>
2026-02-18 09:32:48 +01:00
Óscar del Pozo 506a3914e4
feat: Make customizable the creation of the vector extension for PGVe… (#4576)
## Issue
<!-- Please specify the ID of the issue this PR is addressing. For
example: "Closes #1234" or "Fixes #1234" -->
Closes #4575

## Change
<!-- Please describe the changes you made. -->
Added flag skipCreateVectorExtension to the PgVectorEmbeddingStore. Its
default value does not change the current behaviour,
When set to true, the CREATE EXTENSION statement is not executed when a
new connection is created.

## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [X] There are no breaking changes (API, behaviour)
- [ ] I have added unit and/or integration tests for my change
- [ ] The tests cover both positive and negative cases
- [X] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [X] I have manually verified that the `PgVectorEmbeddingStore` works
correctly with the data persisted using the latest released version of
LangChain4j
2026-02-12 15:41:07 +01:00
Dmytro Liubarskyi 336b2accce
Update versions to 1.12.0-SNAPSHOT and 1.12.0-beta20-SNAPSHOT (#4537)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-04 14:27:44 +01:00
Yongjun Hong 313452c498
feat: PgVectorEmbeddingStore supports hybrid search (#4288)
<!--
Thank you so much for your contribution!

Please fill in all the sections below.
Please open the PR as a draft initially. Once it is reviewed and
approved, we will ask you to add documentation and examples.
Please note that PRs with breaking changes or without tests will be
rejected.

Please note that PRs will be reviewed based on the priority of the
issues they address.
We ask for your patience. We are doing our best to review your PR as
quickly as possible.
Please refrain from pinging and asking when it will be reviewed. Thank
you for understanding!
-->

## Issue
<!-- Please specify the ID of the issue this PR is addressing. For
example: "Closes #1234" or "Fixes #1234" -->
Closes #1599 

## Change
<!-- Please describe the changes you made. -->


## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] There are no breaking changes (API, behaviour)
- [x] I have added unit and/or integration tests for my change
- [x] The tests cover both positive and negative cases
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [x] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)


## Checklist for adding new maven module
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added my new module in the root `pom.xml` and
`langchain4j-bom/pom.xml`


## Checklist for adding new embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreRemovalIT` that
extends from `EmbeddingStoreWithRemovalIT`

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Dmytro Liubarskyi <ljubarskij@gmail.com>
2026-02-03 14:33:21 +01:00
Vladimir Orany 9e76b3efe0
Avoid unnecessary connection creation for PGVector store (#4422)
## Change
The body of `initTable` method of `PgVectorEmbeddingStore` requires
connection even no database operation is going to happen. This change
wrap the call to the method to the condition that checks that some DB
operation will happen.


## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] There are no breaking changes (API, behaviour)
- [x] I have added unit and/or integration tests for my change
- [x] The tests cover both positive and negative cases (via current IT)
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [x] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)


## Checklist for adding new maven module
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added my new module in the root `pom.xml` and
`langchain4j-bom/pom.xml`


## Checklist for adding new embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreRemovalIT` that
extends from `EmbeddingStoreWithRemovalIT`

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2026-01-14 11:55:48 +01:00
Óscar del Pozo 9f3f04e6aa
#4413 - PGVector does not escape values in an IN (notIn) filter (#4414)
<!--
Thank you so much for your contribution!

Please fill in all the sections below.
Please open the PR as a draft initially. Once it is reviewed and
approved, we will ask you to add documentation and examples.
Please note that PRs with breaking changes or without tests will be
rejected.

Please note that PRs will be reviewed based on the priority of the
issues they address.
We ask for your patience. We are doing our best to review your PR as
quickly as possible.
Please refrain from pinging and asking when it will be reviewed. Thank
you for understanding!
-->

## Issue
<!-- Please specify the ID of the issue this PR is addressing. For
example: "Closes #1234" or "Fixes #1234" -->
Fixes #4413

## Change
<!-- Please describe the changes you made. -->
Changed the method
`dev.langchain4j.store.embedding.pgvector.PgVectorFilterMapper#formatValuesAsString`.
Instead of formatting always the value as '<value>', now, for String
values, we call to the method `formatValue` that is already used in the
other filters that does not use collections.

It is important that for values that are not String, we return a text
value ('<value>') instead of the `value.toString()` that returns the
`formatValue` method because otherwise, IN filters with integer (for
instance) will fail with a required CAST between text and integer. With
the changes of this PR, I just keep the current behaviour of the filter.

## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [X] There are no breaking changes (API, behaviour)
- [X] I have added unit and/or integration tests for my change
- [X] The tests cover both positive and negative cases (existing tests
already cover negative cases)
- [X] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)


## Checklist for adding new maven module
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added my new module in the root `pom.xml` and
`langchain4j-bom/pom.xml`


## Checklist for adding new embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreRemovalIT` that
extends from `EmbeddingStoreWithRemovalIT`

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2026-01-13 10:35:48 +01:00
Dmytro Liubarskyi 778be1b360
Update versions to 1.11.0-SNAPSHOT and 1.11.0-beta19-SNAPSHOT (#4285)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-24 15:38:05 +01:00
Dmytro Liubarskyi 25d3b3ec87 cleaned up test dependencies 2025-12-10 10:18:30 +01:00
Dmytro Liubarskyi ca6097e35d
Update versions to 1.10.0-SNAPSHOT and 1.10.0-beta18-SNAPSHOT (#4152)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-28 12:21:30 +01:00
Dmytro Liubarskyi bc0801a4df
Update versions to 1.10.0-SNAPSHOT and 1.10.0-beta17-SNAPSHOT (#4140)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-26 17:38:36 +01:00
Dmytro Liubarskyi a473835133
Update versions to 1.9.0-SNAPSHOT and 1.9.0-beta16-SNAPSHOT (#3951)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-24 16:51:33 +02:00
Dmytro Liubarskyi 34632c06a2 nex dev iteration 2025-10-02 17:17:35 +02:00
Dmytro Liubarskyi 7add1a1b4e next dev iteration 2025-09-26 16:54:16 +02:00
Dmytro Liubarskyi afee79638b next dev iteration 2025-09-16 15:23:21 +02:00
Kushal Dixit 7cc5691b1a
Remove Lombok annotations from remaining code and replace with standard java checks and implementations. (#3685)
<!--
Thank you so much for your contribution!

Please fill in all the sections below.
Please open the PR as a draft initially. Once it is reviewed and
approved, we will ask you to add documentation and examples.
Please note that PRs with breaking changes or without tests will be
rejected.

Please note that PRs will be reviewed based on the priority of the
issues they address.
We ask for your patience. We are doing our best to review your PR as
quickly as possible.
Please refrain from pinging and asking when it will be reviewed. Thank
you for understanding!
-->

## Issue
<!-- Please specify the ID of the issue this PR is addressing. For
example: "Closes #1234" or "Fixes #1234" -->
Fixes #1636 (Probably fully as I removed Lombok from wherever it was
remaining).

## Change
<!-- Please describe the changes you made. -->
- Removed Lombok annotations and replaced with standard Java checks for
ex. `Objects.requireNonNull` or equivalent implementation.
- Removed dependency from pom.xml as well, as there is no Lombok
annotation remaining in code.

## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] There are no breaking changes
- [ ] I have added unit and/or integration tests for my change
- [ ] The tests cover both positive and negative cases
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [x] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)


## Checklist for adding new maven module
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added my new module in the root `pom.xml` and
`langchain4j-bom/pom.xml`


## Checklist for adding new embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreRemovalIT` that
extends from `EmbeddingStoreWithRemovalIT`

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2025-09-16 09:40:54 +02:00
Dmytro Liubarskyi 7cc34306db next dev iteration 2025-08-29 08:35:38 +02:00
Dmytro Liubarskyi 5b1b2e76d2 next dev iteration 2025-08-07 16:24:25 +02:00
Dmytro Liubarskyi 0a01b49951 next dev iteration 2025-07-29 17:50:28 +02:00
Dmytro Liubarskyi 39a504a83e Updated to the next development version 2025-06-18 19:36:52 +02:00
Julien Dubois 828b27f1cb
Merge commit from fork
* Fix SQL injection vulnerability with PGVector, MariaDB and Milvus

- Add a test case for each database
- Fix the SQL injection vulnerability
- This is the same issue for all 3 databases, only Milvus has a different escape character
- I ran the full test suite for all 3 databases to test there is no regression
- This should fix the security warning at https://github.com/langchain4j/langchain4j/security/advisories/GHSA-hvxq-w43p-3ccr

* updated tests

* Fix Milvus test

---------

Co-authored-by: Dmytro Liubarskyi <ljubarskij@gmail.com>
2025-06-17 18:26:15 +02:00
renovate[bot] 7745aa0e14
Update dependency org.postgresql:postgresql to v42.7.7 [SECURITY] (#3201)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.postgresql:postgresql](https://jdbc.postgresql.org)
([source](https://redirect.github.com/pgjdbc/pgjdbc)) | `42.7.4` ->
`42.7.7` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.postgresql:postgresql/42.7.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.postgresql:postgresql/42.7.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.postgresql:postgresql/42.7.4/42.7.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.postgresql:postgresql/42.7.4/42.7.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

### GitHub Vulnerability Alerts

####
[CVE-2025-49146](https://redirect.github.com/pgjdbc/pgjdbc/security/advisories/GHSA-hq9p-pm7w-8p54)

### Impact
When the PostgreSQL JDBC driver is configured with channel binding set
to `required` (default value is `prefer`), the driver would incorrectly
allow connections to proceed with authentication methods that do not
support channel binding (such as password, MD5, GSS, or SSPI
authentication). This could allow a man-in-the-middle attacker to
intercept connections that users believed were protected by channel
binding requirements.

### Patches
TBD

### Workarounds

Configure `sslMode=verify-full` to prevent MITM attacks.

### References

*
https://www.postgresql.org/docs/current/sasl-authentication.html#SASL-SCRAM-SHA-256
* https://datatracker.ietf.org/doc/html/rfc7677
* https://datatracker.ietf.org/doc/html/rfc5802

---

### Release Notes

<details>
<summary>pgjdbc/pgjdbc (org.postgresql:postgresql)</summary>

###
[`v42.7.7`](https://redirect.github.com/pgjdbc/pgjdbc/blob/HEAD/CHANGELOG.md#4277-2025-06-10)

##### Security

- security: **Client Allows Fallback to Insecure Authentication Despite
channelBinding=require configuration.**
Fix `channel binding required` handling to reject non-SASL
authentication
Previously, when channel binding was set to "require", the driver would
silently ignore this
requirement for non-SASL authentication methods. This could lead to a
false sense of security
when channel binding was explicitly requested but not actually enforced.
The fix ensures that when
channel binding is set to "require", the driver will reject connections
that use
non-SASL authentication methods or when SASL authentication has not
completed properly.
See the [Security
Advisory](https://redirect.github.com/pgjdbc/pgjdbc/security/advisories/GHSA-hq9p-pm7w-8p54)
for more detail. Reported by [George
MacKerron](https://redirect.github.com/jawj)
The following
[CVE-2025-49146](https://nvd.nist.gov/vuln/detail/CVE-2025-49146) has
been issued

##### Added

- test: Added ChannelBindingRequiredTest to verify proper behavior of
channel binding settings

###
[`v42.7.6`](https://redirect.github.com/pgjdbc/pgjdbc/blob/HEAD/CHANGELOG.md#4276)

##### Features

- fix: Enhanced DatabaseMetadata.getIndexInfo() method, added index
comment as REMARKS property [PR
#&#8203;3513](https://redirect.github.com/pgjdbc/pgjdbc/pull/3513)

##### Performance Improvements

- performance: Improve ResultSetMetadata.fetchFieldMetaData by using IN
row values instead of UNION ALL for improved query performance (later
reverted) [PR
#&#8203;3510](https://redirect.github.com/pgjdbc/pgjdbc/pull/3510)
- feat:Use a single simple query for all startup parameters, so
groupStartupParameters is no longer needed [PR
#&#8203;3613](https://redirect.github.com/pgjdbc/pgjdbc/pull/3613)
-

###
[`v42.7.5`](https://redirect.github.com/pgjdbc/pgjdbc/blob/HEAD/CHANGELOG.md#4275-2025-01-14-080000--0400)

##### Added

- ci: Test with Java 23 [PR
#&#8203;3381](https://redirect.github.com/pgjdbc/pgjdbc/pull/3381)

##### Fixed

- regression: revert change in
[`fc60537`](https://redirect.github.com/pgjdbc/pgjdbc/commit/fc60537)
[PR #&#8203;3476](https://redirect.github.com/pgjdbc/pgjdbc/pull/3476)
- fix: PgDatabaseMetaData implementation of catalog as param and return
value [PR
#&#8203;3390](https://redirect.github.com/pgjdbc/pgjdbc/pull/3390)
- fix: Support default GSS credentials in the Java Postgres client [PR
#&#8203;3451](https://redirect.github.com/pgjdbc/pgjdbc/pull/3451)
- fix: return only the transactions accessible by the current_user in
XAResource.recover [PR
#&#8203;3450](https://redirect.github.com/pgjdbc/pgjdbc/pull/3450)
- feat: don't force send extra_float_digits for PostgreSQL >= 12 fix
[Issue
#&#8203;3432](https://redirect.github.com/pgjdbc/pgjdbc/issues/3432) [PR
#&#8203;3446](https://redirect.github.com/pgjdbc/pgjdbc/pull/3446)
- fix: exclude "include columns" from the list of primary keys [PR
#&#8203;3434](https://redirect.github.com/pgjdbc/pgjdbc/pull/3434)
- perf: Enhance the meta query performance by specifying the oid. [PR
#&#8203;3427](https://redirect.github.com/pgjdbc/pgjdbc/pull/3427)
- feat: support getObject(int, byte\[].class) for bytea [PR
#&#8203;3274](https://redirect.github.com/pgjdbc/pgjdbc/pull/3274)
- docs: document infinity and some minor edits [PR
#&#8203;3407](https://redirect.github.com/pgjdbc/pgjdbc/pull/3407)
- fix: Added way to check for major server version, fixed check for RULE
[PR #&#8203;3402](https://redirect.github.com/pgjdbc/pgjdbc/pull/3402)
- docs: fixed remaining paragraphs [PR
#&#8203;3398](https://redirect.github.com/pgjdbc/pgjdbc/pull/3398)
- docs: fixed paragraphs in javadoc comments [PR
#&#8203;3397](https://redirect.github.com/pgjdbc/pgjdbc/pull/3397)
- fix: Reuse buffers and reduce allocations in GSSInputStream addresses
[Issue
#&#8203;3251](https://redirect.github.com/pgjdbc/pgjdbc/issues/3251) [PR
#&#8203;3255](https://redirect.github.com/pgjdbc/pgjdbc/pull/3255)
- chore: Update Gradle to 8.10.2 [PR
#&#8203;3388](https://redirect.github.com/pgjdbc/pgjdbc/pull/3388)
- fix: getSchemas() [PR
#&#8203;3386](https://redirect.github.com/pgjdbc/pgjdbc/pull/3386)
- fix: Update rpm postgresql-jdbc.spec.tpl with scram-client [PR
#&#8203;3324](https://redirect.github.com/pgjdbc/pgjdbc/pull/3324)
- fix: Clearing thisRow and rowBuffer on close() of ResultSet [Issue
#&#8203;3383](https://redirect.github.com/pgjdbc/pgjdbc/issues/3383) [PR
#&#8203;3384](https://redirect.github.com/pgjdbc/pgjdbc/pull/3384)
- fix: Package was renamed to maven-bundle-plugin [PR
#&#8203;3382](https://redirect.github.com/pgjdbc/pgjdbc/pull/3382)
- fix: As of version 18 the RULE privilege has been removed [PR
#&#8203;3378](https://redirect.github.com/pgjdbc/pgjdbc/pull/3378)
- fix: use buffered inputstream to create GSSInputStream [PR
#&#8203;3373](https://redirect.github.com/pgjdbc/pgjdbc/pull/3373)
- test: get rid of 8.4, 9.0 pg versions and use >= jdk version 17 [PR
#&#8203;3372](https://redirect.github.com/pgjdbc/pgjdbc/pull/3372)
- Changed docker-compose version and renamed script file in instructions
to match the real file name [PR
#&#8203;3363](https://redirect.github.com/pgjdbc/pgjdbc/pull/3363)
- test:Do not assume "test" database in
DatabaseMetaDataTransactionIsolationTest [PR
#&#8203;3364](https://redirect.github.com/pgjdbc/pgjdbc/pull/3364)
- try to categorize dependencies [PR
#&#8203;3362](https://redirect.github.com/pgjdbc/pgjdbc/pull/3362)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no
schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/langchain4j/langchain4j).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC40OC41IiwidXBkYXRlZEluVmVyIjoiNDAuNDguNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Titov, Alexey <a@koeg.de>
Co-authored-by: Alexey Titov <33568148+Heezer@users.noreply.github.com>
2025-06-17 14:09:44 +02:00
Dmytro Liubarskyi 3fb258b009 - Updated to the next dev version
- Release to Maven central portal instead of s01
2025-05-20 15:55:12 +02:00
Dmytro Liubarskyi a5313ffc0e
Added maven-flatten-plugin, cleaned up POMs (#2964)
## Change
- Added `maven-flatten-plugin` to `langchain4j-parent` and
`langchain4j-bom`
- Removed integration-specific dependencies from `langchain4j-parent`'s
`dependencyManagement` section and moved them to the modules where these
dependencies are used
- Explicitly added missing implicit dependencies
- Removed redundant `<maven.compiler.release>` for cassandra, infinispan
and opensearch modules
- Removed redundant license declarations and outdated properties


## General checklist
- [ ] There are no breaking changes
- [ ] I have added unit and/or integration tests for my change
- [ ] The tests cover both positive and negative cases
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [x] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2025-05-08 17:55:51 +02:00
Dmytro Liubarskyi 3ab9218386 Updated version to 1.0.0-beta4-SNAPSHOT 2025-04-14 11:19:37 +02:00
Dmytro Liubarskyi 6ed38d4362
Release 1.0.0-beta3 (#2853) 2025-04-11 15:32:05 +02:00
Mario Fusco a6927bae6e
Delombok (#2751)
Delombok (almost) all.
2025-03-21 17:22:13 +01:00
Konstantin Pavlov f87fe40406
refactor-poms (#2723)
## Issue

Cleanup repeating dependencies in pom.xml. Better test assertions and
apidocs/javadoc generation.

## Change

Refactor project structure and remove unused test dependencies. 

- Repeating test dependencies like `tinylog`, `awaitility` and others
were removed from various modules and consolidated in the parent module.
This reduction in clutter helps to streamline the testing process.
- A separate `kotlin` profile was created to manage Kotlin-related
configurations and dependencies.

- Upgraded versions of dependencies like `ai-mocks` and `wiremock` were
implemented. Moved to wiremock-standalone (shaded jar) to avoid
potential version conflicts with runtime classes.

- The test changes in `ChatRequestExtensionsTest.kt` partially migrated
from AssertJ to Kotest assertions.

- Updated Dokka plugin configuration

## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] There are no breaking changes
- [ ] I have added unit and/or integration tests for my change
- [ ] The tests cover both positive and negative cases
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)


## Checklist for adding new maven module
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added my new module in the root `pom.xml` and
`langchain4j-bom/pom.xml`


## Checklist for adding new embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreRemovalIT` that
extends from `EmbeddingStoreWithRemovalIT`

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2025-03-21 09:07:33 +01:00
Dmytro Liubarskyi d86c4b999d
Remove deprecated APIs (#2726)
## Change
Removed:
- `ChatMessage.text()`
- `Document.metadata(String)` -> Replaced by:
`Document.metadata().get{Type}(String)`
- `TextSegment.metadata(String)` -> Replaced by:
`TextSegment.metadata().get{Type}(String)`
- `Metadata.get(String)` -> Replaced by: `Metadata.get{Type}(String)`
- `Metadata.add(String, Object)` -> Replaced by: `Metadata.put(String,
{Type})`
- `Metadata.add(String, String)` -> Replaced by: `Metadata.put(String,
{Type})`
- `Metadata.asMap()` -> Replaced by: `Metadata.toMap()`
- `Metadata.from(String, Object)` -> Replaced by: `Metadata.from(String,
String)`
- `Metadata.metadata(String, Object)` -> Replaced by:
`Metadata.metadata(String, String)`
- `RetrievalAugmentor.augment(UserMessage, Metadata)` -> Replaced by:
`RetrievalAugmentor.augment(AugmentationRequest)`
- `ContentInjector.inject(List, UserMessage)` -> Replaced by:
`ContentInjector.inject(List, ChatMessage)`
- `Retriever` -> Replaced by: `ContentRetriever`
- `EmbeddingStoreRetriever` -> Replaced by:
`EmbeddingStoreContentRetriever`
- `Utils.isCollectionEmpty(Collection)` -> Replaced by:
`Utils.isNullOrEmpty(Collection)`
- `JsonObjectSchema.Builder.properties()` -> Replaced by:
`JsonObjectSchema.Builder.addProperties()`

## General checklist
- [ ] There are no breaking changes
- [ ] I have added unit and/or integration tests for my change
- [ ] The tests cover both positive and negative cases
- [ ] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
- [x] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2025-03-20 19:15:31 +01:00