Skip to content

1.6.10

Latest

Choose a tag to compare

@grabdoc grabdoc released this 23 Nov 16:47
· 8 commits to 169ccd1a92b627f71577028cc377457b6d2a266e since this release

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 as auid==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 with 400. 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). Accepted typ header values can be configured with db2rest.auth.jwt.token-types, which defaults to at+jwt as before. Thanks @janblok. (#951)
  • INCLUDED_TABLES: load only the tables you want to expose, using comma separated, case-insensitive patterns such as film*,sales.order_*. Excluded tables have no metadata loaded, which also speeds up startup on large databases. (#987, closes #421)

Fixes

  • PostgreSQL: filters on numeric/decimal columns no longer fail with operator 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 /Users for a filter configured on users fell back to null-tenant rows on reads and wrote a null tenant column on inserts. (#985, #974)
  • JWT auth: a request without an Authorization header returned 500. It now returns 401. (#981, fixes #980)
  • PostgreSQL: listing pg_catalog or information_schema in INCLUDED_SCHEMAS now loads their tables. (#979, fixes #910)
  • Oracle: databases with non-Unicode character sets such as TH8TISASCII no longer fail at startup with ORA-17056. (#979, fixes #970)

Behavior changes

  • Role check failures return 403 instead of 401. A user who is authenticated but doesn't have a role allowed for the resource now gets 403 with type: https://db2rest/forbidden. Failed authentication is still 401. This applies to all auth providers. (#981, closes #767)
  • Multi-tenancy: filters with unbalanced parentheses or quotes are rejected with 400 when 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, exists and one. Tracked in #961.

Docs

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.10 or kdhrubo/db2rest:latest

Full changelog: 1.6.9...1.6.10