Repository navigation
Security
- Multi-tenancy: an OR in the request filter could read other tenants' rows. The tenant condition was ANDed onto the request filter without grouping it first, and RSQL gives
;(AND) higher precedence than,(OR). With a filter such asauid==1,auid==2, only the last part was limited to the user's tenant. This affected read, find one, count, exists, update and delete. The request filter is now wrapped in parentheses before the tenant filter is added, and filters with unbalanced parentheses or quotes are rejected with400. If you use multi-tenancy, please upgrade. (#983)
Highlights
- JWT roles: roles can now come from a claim in the access token, set with
db2rest.auth.jwt.roles-namespace(a string or an array of strings). Acceptedtypheader values can be configured withdb2rest.auth.jwt.token-types, which defaults toat+jwtas before. Thanks @janblok. (#951) INCLUDED_TABLES: load only the tables you want to expose, using comma separated, case-insensitive patterns such asfilm*,sales.order_*. Excluded tables have no metadata loaded, which also speeds up startup on large databases. (#987, closes #421)
Fixes
- PostgreSQL: filters on
numeric/decimalcolumns no longer fail withoperator does not exist: numeric > character varying. Thanks @jayhemnani9910. (#977) - Multi-tenancy: the table name in the URL is now matched case-insensitively against role data filters. Before, a request to
/Usersfor a filter configured onusersfell back to null-tenant rows on reads and wrote a null tenant column on inserts. (#985, #974) - JWT auth: a request without an
Authorizationheader returned500. It now returns401. (#981, fixes #980) - PostgreSQL: listing
pg_catalogorinformation_schemainINCLUDED_SCHEMASnow loads their tables. (#979, fixes #910) - Oracle: databases with non-Unicode character sets such as
TH8TISASCIIno longer fail at startup withORA-17056. (#979, fixes #970)
Behavior changes
- Role check failures return
403instead of401. A user who is authenticated but doesn't have a role allowed for the resource now gets403withtype: https://db2rest/forbidden. Failed authentication is still401. This applies to all auth providers. (#981, closes #767) - Multi-tenancy: filters with unbalanced parentheses or quotes are rejected with
400when a tenant filter applies to the table. (#983)
Known issues
- Multi-tenancy: writes by users without a tenant role still set the tenant column to null, and users with several tenant roles on one table see no rows. Both are tracked in #984.
- The path-based primary key route can still catch requests meant for some reserved paths, such as
count,existsandone. Tracked in #961.
Docs
- Join on JSON column values (PostgreSQL), with new integration tests in #986. Closes #629.
- Database TLS with a private CA. Closes #187.
Internal
- Testcontainers 1.21.4 for Docker Engine 29 on CI runners. (#978)
- Releases are built with the Maven wrapper, and an existing tag can be published again from the workflow. (#976)
Upgrading
- Maven:
io.9tiger:*:1.6.10 - Docker:
docker pull kdhrubo/db2rest:v1.6.10orkdhrubo/db2rest:latest
Full changelog: 1.6.9...1.6.10