Skip to content

Commit fad8226

Browse files
committed
TIKA-4809: Document enableUnsecureFeatures removal and /meta's silent changes
1 parent df7f144 commit fad8226

2 files changed

Lines changed: 46 additions & 3 deletions

File tree

docs/modules/ROOT/pages/migration-to-4x/migrating-tika-server-4x.adoc

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,31 @@ for error text should check `tk:exception:container-exception` (full-object
135135
endpoints) or the `422` body (`/meta/\{field}`, populated only when
136136
`returnStackTrace=true`).
137137
138+
Two changes to the returned metadata come with this, neither of which produces an
139+
error:
140+
141+
* **`/meta` no longer returns a `language` field.** Language detection previously ran
142+
inline on this endpoint via a dedicated content handler that buffered text solely to
143+
detect the language, which meant holding the document text twice to populate one
144+
field. That handler was removed. `/meta` deliberately parses with the `ignore`
145+
content handler, so there is no text for a language detector to work from.
146+
+
147+
**Migration:** configure a language-detection metadata filter
148+
(`charsoup-metadata-filter`, `optimaize`, or `opennlp`) and use `/rmeta` or
149+
`/tika/json`, which capture content. The detected value arrives as
150+
`tk:detected-language`, with `tk:detected-language-confidence`. Note that these
151+
filters read `tk:content`, so they are no-ops on `/meta` and on any endpoint
152+
configured with the `ignore` handler.
153+
154+
* **`/meta` now sets `tk:exception:embedded-depth-limit-reached` on any document
155+
with embedded content.** `/meta` suppresses embedded parsing by setting an embedded
156+
depth limit of `0`, and reaching a limit is recorded. The previous implementation
157+
suppressed embedded documents by a different mechanism that recorded nothing. The
158+
flag is expected on this endpoint and does not indicate a truncated result.
159+
+
160+
**Migration:** clients that alert on the presence of any `tk:exception:*` key should
161+
exclude this one for `/meta`.
162+
138163
=== Accept Header Routing Removed
139164
140165
The `/tika` endpoint no longer routes based on `Accept` headers. Use explicit paths instead:
@@ -157,7 +182,24 @@ The following `TikaServerConfig` options have been removed:
157182
158183
=== `/pipes` and `/async` Require `allowPipes`; Per-Request Config Requires `allowPerRequestConfig`
159184
160-
Previously these endpoints (and per-request parser configuration) were enabled simply by listing endpoints under `server.endpoints`. The capabilities are now split into two default-`false` flags in the `server` section:
185+
This replaces the `enableUnsecureFeatures` flag that alpha-1 briefly used, and before
186+
that, enabling these capabilities simply by listing endpoints under `server.endpoints`.
187+
`enableUnsecureFeatures` no longer exists: a config that still carries it fails to start
188+
with an "Unrecognized field" error naming the key, rather than silently ignoring it.
189+
The single flag has been split into two, so that granting batch/fetcher access and
190+
granting per-request parser configuration are separate decisions:
191+
192+
|===
193+
|Was |Now
194+
195+
|`enableUnsecureFeatures: true` (to use `/pipes` or `/async`)
196+
|`allowPipes: true`
197+
198+
|`enableUnsecureFeatures: true` (to send per-request config)
199+
|`allowPerRequestConfig: true`
200+
|===
201+
202+
The capabilities are two default-`false` flags in the `server` section:
161203
162204
* `allowPipes` gates the `/pipes` and `/async` endpoints, which drive process-isolated batch parsing through your fetchers and emitters. Selecting either without `allowPipes` causes the server to refuse to start with a clear error.
163205
* `allowPerRequestConfig` gates per-request parser configuration: the `/config` family of endpoints and the multipart `config` part. When off, such requests are rejected with 403.

docs/modules/ROOT/pages/security.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ and `allowComponentManagement` — the latter lets clients add, modify, and dele
5656
and read back stored configs, which can contain secrets — are off by default. Run it only behind
5757
network controls and, ideally, mutual TLS. See xref:using-tika/grpc/index.adoc[Tika gRPC].
5858

59-
For the upgrade from the former `enableUnsecureFeatures` flag, see
60-
xref:migration-to-4x/migrating-tika-server-4x.adoc[Migrating tika-server to 4.x].
59+
For the upgrade from the former `enableUnsecureFeatures` flag, which is now split into
60+
`allowPipes` and `allowPerRequestConfig`, see
61+
xref:migration-to-4x/migrating-tika-server-4x.adoc#_pipes_and_async_require_allowpipes_per_request_config_requires_allowperrequestconfig[Migrating tika-server to 4.x].
6162

6263
== Known Vulnerabilities
6364

0 commit comments

Comments
 (0)