0.5.0
This release moves TRS-Filer to FOCA 0.22 and an image without pip, adds a setting for who may add tool classes, and hardens the Helm chart: MongoDB requires authentication by default, all pods run with restricted security contexts, a NetworkPolicy protects MongoDB and the configuration Job has only the rights it uses. Requests that TRS-Filer refuses now say why. Several changes are breaking for chart installs, clients and custom configs: read the upgrade steps from 0.4.0 before upgrading, in particular for MongoDB's authentication, which needs a Secret and users before a chart install is upgraded. See the documentation for details.
Breaking changes¶
- Helm chart: MongoDB requires authentication by default
(
mongodb.auth.enabled), with credentials from an existing Secret (mongodb.auth.existingSecret, required while enabled; rendering fails without it). Existing databases have no users: create the Secret and the users before upgrading, as described in the upgrade steps, or setmongodb.auth.enabled: false(#240, #244) - Helm chart: a NetworkPolicy lets only the app connect to MongoDB
(
mongodb.networkPolicy.enabled, by defaulttrue); other workloads that connect to MongoDB (e.g., backups) need a policy of their own. All pods run as non-root users with a read-only root file system, MongoDB as user and group 999 from the start (fsGroupkeeps its volume writable, with storage that appliesfsGroup) (#238, #243) - FOCA 0.22 (from 0.19): query parameters that an operation doesn't declare
give
400on all operations (alsoGET /service-info,GET /toolClasses,POST /toolsandPOST /toolClasses); JSON bodies with unpaired surrogates give400; in custom configs,${...}references environment variables ($$is a literal$), and alogsection that names handlers or filters it doesn't configure stops the app; MongoDB clients time out after 5 seconds; logs name the route of a request instead of its path, and rejected requests the locations and codes of their invalid fields instead of the validator's reason (#218, #227, #228; #253, #254) - Image: the image has no pip (and no uv) and installs the locked
dependencies with hash checks; images derived from it that run
pip installmust install with uv instead (#218, #227, #228)
Features¶
- Config:
custom.access_control.tool_classessets who may add tool classes; onlyopen(the default, the behaviour of 0.4.0) is supported yet,controlledandmoderatedstop the app on startup until users can be told apart (#249, #250) - Errors: with the base config, requests that fail the validation of the
API specification keep the validator's reason as
detail(exceptions.validation_reasons: true, withexceptions.validation_details: true) and, where the invalid fields are known, gain the memberstype,codeanderrors; responses have the headerX-Request-ID(#253, #254) - Helm chart:
trs_filer.forwardedAllowIpssets the addresses that forwarded headers are trusted from (by default*, as before) (#239, #242) - Helm chart: security contexts and
/tmpsizes of the app, the configuration Job and MongoDB as values (*.podSecurityContext,*.securityContext,*.tmpSizeLimit; omitted on OpenShift where it assigns them), and an optional NetworkPolicy for the app (trs_filer.networkPolicy) (#238, #243) - Helm chart:
trs_filer.imagePullPolicy(by defaultAlways, as before) (#245, #246)
Security¶
- Helm chart: the configuration Job's ServiceAccount is bound to a Role
with only the rights the Job uses, instead of the ClusterRole
admin(#237, #241) - Image:
.dockerignorekeeps local secret files (e.g.,.env) out of image builds (#219, #220) - Image: no pip in the image, so it no longer ships the outdated copies of packages that pip vendored (#221, #222; #218, #227, #228)
Fixes¶
- API: requests that TRS-Filer itself refuses (e.g.,
limit=0, deleting the last version of a tool, a tool class that tools use, a production version without checksums) get their reason asdetail, instead of the genericThe request is malformed.(#223, #225) - Helm chart: the configuration Job fails if reading or patching the
ConfigMap or listing pods is refused (it reported success), finds the
app's base config through the installed package (not a path that
depended on the image's Python version), and restarts only the app's
pods (label
app: <appName>), not all pods whose names start with<appName>-(#237, #241) - Helm chart: the database name (
mongodb.dbName) is quoted in the app's environment, so that names that YAML reads as numbers or booleans (e.g.,123) work (#264, #268) - Remote files: error messages and logs give the reason without quoting URLs, also those of redirect targets; the log names the requested URL without its user info (#260, #267)
- Logs: the
offsetand descriptor type of requests are logged with line breaks escaped (#261, #267) - API: the reason for unsupported descriptor types lists only the served
types and says that their
PLAIN_forms are accepted but not served yet (#263, #267)
Documentation¶
- Upgrade steps from 0.4.0 (#227, #228; #253, #254; #258, #259)
- API: the supported descriptor types, and why
PLAIN_types are refused on registration (#110, #236) - Helm chart: values, authentication, security contexts, network policies, forwarded headers and installs from a release (#201, #217; #238, #243; #239, #242; #240, #244)
- Access control, errors and logs: requests that reach the app's Service
directly with the chart's defaults, the members of
400responses and the headerX-Request-ID, and how failed requests are logged (#262, #268) - Citation: the Zenodo DOI and badge (#136, #214)
Maintenance¶
- CI: lint and test the Helm chart, and install it in a kind cluster (#224, #226; #245, #246)
- CI: run the checks on the locked dependencies, hash-check the build requirements of the image job, verify the release tag before running its scripts, and label Dependabot's pull requests (#211, #215; #212, #216; #234, #235; #251, #252)
- Tests: removed unused test data and ignore entries (#232, #233)
- Dependency updates (#192; #193; #230; #231; #247)