Skip to content

Releases

v0.23.0

v0.23.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 25 Nov 22:12
Immutable release. Only release title and notes can be modified.
v0.23.0
c556c5c

FOCA 0.23.0 hardens apps against clients that send large bodies or no tokens, and extends the plugin gateway for WES. Request bodies are limited by default (10 MiB, URL-encoded bodies 500 kB) and checked before requests are authenticated, and on operations with bearer tokens that FOCA validates, the token is checked before the body is read. Subjects are always namespaced by their issuer, also with a single trusted issuer, which changes the users that apps and FOCA store; existing deployments keep bare subjects with namespace: "" or rewrite them with the new command foca namespace-subjects. Plugins of WES gateways get runs in a defined shape, backend lists know WES, FOCA resolves the credentials of backends, and guarded HTTP clients and registry reads can trust private certificate authorities. Apps get helpers for lists paged with page tokens, patches of specifications can remove keys, the permissions API reports invalid fields, the plugin store limits the size of each namespace, and $ in patterns matches at the end only. Several changes need action in apps, deployments or clients: see the migration guide.

Breaking changes

  • Subjects are namespaced by their issuer (<namespace>|<subject>) also if only one issuer is trusted: get_current_subject(), get_on_behalf_of_user(), namespace_subject(), the Principal of gateway plugins, audit events, stored rules and roles (user:<namespace>|<subject>) and owner fields; stored bare users no longer apply, and apps refuse to start while configured rules name bare users. Set namespace: "" for the issuer to keep subjects bare, or rewrite stored rules with foca namespace-subjects (see Subjects are always namespaced by issuer) (#631, #773)
  • Request bodies larger than 10 MiB are rejected with 413 by default (server.max_content_length, before without a limit), and URL-encoded bodies larger than 500 kB too (new setting server.max_form_memory_size); bodies are checked before requests are authenticated. The configuration template no longer sets max_content_length: null (#798, #813)
  • On operations that require bearer tokens validated by FOCA, the token is checked before the body is read: anonymous requests with too large bodies get 401 instead of 413, before_request hooks run after this check, and apps that mock Connexion's security handler instead of foca.security.auth.validate_token must replace validate_token too (#814, #817)
  • null in patches of specifications removes keys (JSON Merge Patch, RFC 7396) instead of setting values to null; files of path keep null values unless merge_null_removes: true is set (#762, #763)
  • The permissions API (/permissions) rejects invalid rules, identifiers and pages as invalid fields (problem type invalid-request, with errors and stable codes); its controllers raise foca.errors.InvalidFieldsProblem instead of BadRequest (#760, #765)
  • The plugin store limits each namespace to max_namespace_size bytes (by default 16 MiB) and raises foca.plugins.StoreFullError beyond it; store backends of their own must accept the new keyword argument max_size of set() and increment(); with a database, sizes are kept in the new collection plugin_store_sizes (#552, #774)
  • Plugins of WES gateways get runs (POST /runs) in one shape, checked after each hook against the new limits plugins.attachments (by default 256 files and 32 MiB per run); apps that pass payloads of another shape build them with foca.plugins.wes.parse_run_request() (#781, #782)
  • A client's backend choice {"type": "allow", ...} of identifiers only, none of which names a backend of the gateway, is refused with 400 (invalid-backends) by run.route(); apps that route only some of their backends pass the others as known (#808, #809)
  • A $ in a pattern of a request body or parameter matches only at the end of the value, as in ECMA 262, so values with a trailing newline are refused with 400 (pattern-mismatch) (#797, #810)

Features

  • Backend lists take WES instances (type: ga4gh-wes, API wes), ServiceEntry has an optional api_path, and BackendList(entries, api=...) refuses entries of another API's type (#789, #791)
  • FOCA resolves the credentials of backends for TES and WES gateways: ClientCredentialsConfig, TokenProvider (client credentials grant, cached per process), get_credentials(), check_backends(), and an optional audience of ServiceEntry (#794, #796)
  • GuardedClient takes a ca_bundle (a file or directory of certificate authorities trusted instead of the public ones); TLS verification can't be turned off (#790, #792)
  • fetch_json() takes a ca_bundle, and registry entries of backend lists a registry_ca_bundle, so that registries behind a private certificate authority can be read (#793, #795)
  • foca.plugins.wes with parse_run_request(), check_run_request() and run_request_form(), and host.start() reads the tags of WES runs from the payload (#781, #782)
  • merge_null_removes of specifications lets merged files of path remove keys with null (#762, #763)
  • foca.utils.pagination pages lists with page tokens (keyset pagination): get_page_size(), PageKey and find_page(), with invalid sizes and tokens as invalid fields (#799, #828)

Security

  • Anonymous clients can no longer make apps parse request bodies of any size: bodies are limited by default and checked before authentication, and bearer tokens validated by FOCA are checked before bodies are read (#798, #813; #814, #817)
  • Patterns ending in $ no longer accept a trailing newline, which let values past request validation that controllers then failed on (#797, #810)
  • The semgrep rules shared with the apps find disabled TLS checks in calls on any object (e.g., session.get(url, verify=False)) and more ways of decoding JWTs without verification or with algorithms from the token's header (#783, #784)

Fixes

  • Choices of unknown backends are refused with 400 instead of ending without a backend, which apps answered as an outage (#808, #809)
  • Page tokens that aren't strings (e.g., from JSON bodies) are refused with 400 instead of failing with 500, and page keys refuse fields that aren't a tuple of strings (#830, #829)

Documentation

  • The migration guide covers every change that apps, deployments and clients may have to act on (#631, #773; #798, #813; #814, #817)
  • Requests to backends discovered in registries go through GuardedClient, which checks the address of each connection, not BackendSession, which is for the identity provider and configured backends (#824, #825)
  • The migration guide also names the stricter checks of backend lists (entries of another API's type, audience without auth: client_credentials) and the limit of bare subjects containing |, and the API reference lists InvalidRuleError (#822, #823)
  • The docs of page tokens say when find_page() raises, how items without sort fields are sorted, why to sort by values that the app sets, and how to accept empty tokens of generated clients (#830, #829)
  • The migration guide says that the endpoints for managing roles and the permissions API still accept bare users, which then apply to nobody (#822, #823)
  • The examples no longer import Flask (#753, #764)
  • The release commands of the contributing guide run in a worktree at the release commit (#756, #757)

Maintenance

  • The release workflow checks that the tag is signed and that the version is not on PyPI or Docker Hub yet, and never moves image tags (#818, #819)
  • The package and the library chart get separate generated release notes (#758, #759)
  • CI cancels pull request runs only for new commits, and Dependabot labels all its pull requests (#761; #775, #776)
  • The deadline tests of the HTTP client are deterministic (#815, #816)
  • Release preparation for 0.23.0: citation metadata and release notes (#822, #823)
  • Dependency updates (#766, #767, #768, #769, #770, #771, #777, #778, #800, #801, #802, #803, #804, #805, #806)

Commits

  • docs: run release commands in a worktree by @uniqueg in #757
  • ci: separate package and chart release notes by @uniqueg in #759
  • ci: cancel PR runs only for new commits by @uniqueg in #761
  • feat(spec): let null remove keys in spec patches by @uniqueg in #763
  • docs: move the examples off Flask imports by @uniqueg in #764
  • feat: report invalid fields in the permissions API by @uniqueg in #765
  • feat(plugins): limit store namespace size by @uniqueg in #774
  • ci: let Dependabot label all its pull requests by @uniqueg in #776
  • feat(auth)!: always namespace subjects by issuer by @uniqueg in #773
  • build(deps): Bump the github-actions group across 3 directories with 7 updates by @dependabot[bot] in #769
  • feat(plugins): define the WES run request by @uniqueg in #782
  • fix: catch disabled TLS checks in session calls by @uniqueg in #784
  • build(deps): Bump the python-dependencies group across 1 directory with 7 updates by @dependabot[bot] in #770
  • build(deps): Bump the ruff group across 2 directories with 1 update by @dependabot[bot] in #767
  • build(deps): Bump the semgrep group across 2 directori...
Read more

v0.22.0

v0.22.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 09 Nov 07:57
Immutable release. Only release title and notes can be modified.
v0.22.0
eb17893

FOCA 0.22.0 prepares apps for FOCA's ASGI release, which moves to Connexion 3 AsyncApp and removes Flask and Flask-Cors. Nothing is removed in 0.22.0: FOCA warns about what the ASGI release removes where it can, and adds replacements that already work on Connexion 2: request and claims accessors (foca.context), framework-neutral errors (foca.errors), a test client (foca.testing) and an ast-grep rule that finds Flask imports. The functions that take a Flask app (get_app_config(), set_app_config(), enable_cors() and foca.factories.celery_app.create_celery_app()) emit a DeprecationWarning, and FOCA logs each deprecation once per process; exception maps with raw Werkzeug classes are logged as deprecated and stop working with the ASGI release. Some defaults change, which clients, tests and log checks may notice: the detail of responses to invalid requests and the INFO logs no longer quote values of clients, and routes that are not operations of the specifications are treated differently (see Breaking changes). Move your app now: see Preparing for the ASGI release and the migration guide. When work on the ASGI release starts, a 0.22.x branch is cut from the latest 0.22 release, for dependency and security fixes while apps migrate.

Breaking changes

  • Deprecated, removed in the ASGI release: get_app_config(), set_app_config(), enable_cors() and foca.factories.celery_app.create_celery_app() emit a DeprecationWarning and are logged once per process; use foca.get_config() (in scripts, with Foca.use_config()), the security.cors configuration and Foca.create_celery_app() instead (#637, #731, #741, #742)
  • Also deprecated, removed in the ASGI release: reading, setting and deleting app.config.foca (#716, #721), www_authenticate of foca.errors.Unauthorized, whose challenges are now in headers (#710, #714), exception maps with raw Werkzeug classes instead of those of foca.errors (#633, #709), and x-body-name: permission in specifications that route operations to the controllers of the permissions API (#717, #722)
  • FOCA finds routes in its own route table of the operations of the specifications instead of Flask's url_map; for routes that aren't operations (e.g., the Swagger UI, openapi.json, routes added to Flask directly), is_permitted_for() is now False, me_path is no longer checked, and ownership controllers refuse requests; the log field operation_id is the specification's operationId, or the one Connexion resolves if the specification has none (see Routes that aren't operations) (#632, #707; #718, #726)
  • By default, the detail of responses to requests rejected by request validation names the invalid fields by location and code (e.g., Invalid fields: #/name (too-long)), or, if none are listed, is the mapped detail or The request is invalid., instead of the validator's reason; this also replaces the detail of BadRequestProblem (RequestValidationProblem) that apps raise, so raise foca.errors.InvalidFieldsProblem to name the invalid fields of checks of your own. Clients and tests that check detail should check errors instead, or set exceptions.validation_reasons: true to keep the reasons (see Validation reasons without request values) (#732, #733, #736, #738)
  • Logs at INFO: request logs (log_traffic) and denials of access control name the route (the path template of the operation, e.g., GET /ga4gh/tes/v1/tasks/{id}, or <unknown route>) instead of the path, and requests rejected by request validation without invalid fields are logged with the mapped detail or the title instead of the validator's reason; paths and reasons are logged at DEBUG, so log at DEBUG (e.g., for the logger foca) to keep them (see Validation reasons without request values) (#748, #750)

Features

  • Request and claims accessors that keep their meaning on ASGI: foca.context.current_request(), a read-only snapshot of the request, and current_token_info() and current_claims() of foca.security.auth; FOCA itself reads the request only through them (#634, #715, #720; #717, #722; #718, #726)
  • foca.errors: framework-neutral error classes and stable names of Connexion's problems, which FOCA raises everywhere; challenges of Unauthorized go in its headers (#633, #709; #710, #714)
  • foca.api.routes, a route table of the operations of the registered specifications, with get_routes() and match() (#632, #707)
  • foca.testing.Client, a test client with the API of httpx and Starlette's TestClient, foca.testing.request_context() for unit tests of code that reads the accessors, and the pytest fixtures foca_app and foca_client (#635, #729)
  • FOCA logs each of its deprecations once per process at WARNING, on the logger foca.deprecation, so that they show under Gunicorn, where Python hides DeprecationWarning; apps can use foca.deprecation.warn_deprecated() (#727, #728)
  • The ast-grep rule flask-import in FOCA's repository finds the imports of Flask, Werkzeug and Connexion's Flask modules that apps still have to move before the ASGI release, and names the replacements (#636, #730)
  • Responses to invalid requests list the invalid fields (up to 100), of the body and the parameters together, in the new member errors of their problem details, with the problem type Invalid request; title and status stay as before, and detail changes as described under Breaking changes. Raise foca.errors.InvalidFieldsProblem to list the invalid fields of checks of your own the same way (#586, #711, #712, #734)
  • Foca.use_config() lets scripts use a configuration and its collections (get_config(), get_collection()) without creating an app, without Flask and without writing to the database; it replaces set_app_config() for scripts (see Preparing for the ASGI release) (#741, #742)

Security

  • Responses to invalid requests no longer quote the rejected values (and, for parameters, the schema) in detail, which now names the invalid fields by location and code, e.g., Invalid fields: #/name (too-long); they stay listed in errors. Set the new option exceptions.validation_reasons: true to keep the validator's reasons, e.g., if clients depend on them. Names that clients choose are still named in detail: those of unknown query and form parameters and unknown keys of the body (#732, #733, #736, #738)
  • The plugin gateway's refusals of per-request pipelines and backends no longer quote the client's values; they name fields, settings and the positions of steps, e.g., Plugin not available in step 1 (see Plugin gateway messages) (#739, #740)
  • Error messages and logs quote fewer client values: GET /plugins/{plugin_id} names the parameter instead of the identifier, errors of the JSON parser on clients' pipelines get a fixed message unless exceptions.validation_reasons is on, an invalid user acted for in the auth.on_behalf_of_header is listed as an invalid field of the header, so that clients learn what to fix, and rejected users acted for, invalid identifiers and values of policy rules and the roles and subjects of refused role grants are no longer logged at INFO or above (#743, #745)
  • Request logs, denials of access control and rejections by request validation no longer log values of clients at INFO: request logs and denials name the route (the path template of the operation, e.g., GET /ga4gh/tes/v1/tasks/{id}) instead of the path, and rejections without invalid fields the title or mapped detail instead of the validator's reason; paths and reasons are logged at DEBUG; the INFO record Request rejected still names unknown parameters and body keys, whose names clients choose (see Migrating to 0.22.0) (#748, #750)
  • Errors for malformed MongoDB connection strings have a fixed message instead of PyMongo's, which could quote parts of the password (#701, #703)
  • The FOCA images install the Debian updates available when they are built, instead of upgrading single packages, and so get the fixes Debian has released, e.g., for zlib1g (CVE-2026-76844, CVE-2026-85091, CVE-2026-27171), which their base images still lack; images built on FOCA's image get the fixes, too (#747, #749)

Fixes

  • Apps are released when they are no longer used, also while objects of their APIs live on, e.g., in log records that a handler keeps; before, such objects kept the Flask app alive, which mattered for processes that build many apps, such as test suites (#735, #737)
  • The database configurations and MongoDB clients of apps with background jobs are released with their apps; before, Celery's worker signals kept them alive, which mattered for processes that create many apps, such as test suites or scripts (#744, #746)
  • foca check-config, sync-policies and export-spec no longer set up the plugin store of gateway apps without a db section (#705, #706)
  • Query strings that aren't UTF-8 no longer fail pagination links or the check for unexpected query parameters; such bytes stay percent-encoded (#717, #722; #718, #726)
  • Users acted for that can't be stored in policy rules (e.g., with a comma) are rejected as invalid fields of the auth.on_behalf_of_header with 400 Bad Request instead of failing with `500 Inter...
Read more

v0.21.0

v0.21.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 05 Nov 01:08
Immutable release. Only release title and notes can be modified.
v0.21.0
5eb4f70

FOCA 0.21.0 lets configuration files reference environment variables and takes credentials from files, gives every request an identifier in logs and responses, adds the foca command-line tool, an audit log of changes of access rights and helpers for testing apps, and makes Celery workers safe with MongoDB. Configurations, requests and responses are checked more strictly, so apps may need to change: see the migration guide. Discovery reads serviceId of Cloud Registry 1.0.0rc2. Apps with plugins of foca-plugins can't install this release until foca-plugins allows it.

Breaking changes

  • Configuration files: ${...} now references an environment variable, an unset variable or an invalid form stops the app, and $$ means a literal $; write $$ for each literal $ in these two cases (#625, #691)
  • jobs.backend is now a SecretStr, as are the db.client_options authMechanismProperties and tlsCertificateKeyFilePassword, so code reading them must call .get_secret_value() (#625, #691)
  • Celery workers replace the MongoDB client before starting their pool and in each pool process, so clients, databases and collections kept from earlier raise InvalidOperation (#659, #663)
  • Index conflicts and documents violating a unique index raise IndexConflictError, a ValueError; other OperationFailures when creating indexes stay what they are (#622, #688)
  • Foca.create_celery_app() stops on invalid access control settings, so such a worker doesn't start (#622, #688)
  • A log section naming filters or handlers that it doesn't configure stops the app, instead of falling back to the default logging (#620, #684)
  • Requests can now fail with 400 for values that don't fit the formats date-time, date or uri, for unpaired surrogates in JSON and, with strict_validation, for query parameters of operations without parameters; with validate_responses, the same format checks answer 500, also for stored data (#617, #686)
  • is_admin() is False for models with global and resource-scoped roles whose matcher doesn't start with exactly g(r.sub, "admin") || (#613, #682)
  • Gateway plugins: request_id() follows server.request_id instead of taking any client's X-Request-ID, so that by default the field request_id of pipeline runs and their records has a generated identifier (#620, #684; #695, #696)
  • MongoDB clients time out after 5 seconds when selecting a server and connecting, down from PyMongo's 30 and 20 seconds (#618, #675)
  • docker/Dockerfile: the build argument PY_IMAGE only takes 3.11 to 3.15 with -slim-trixie; images built on the published FOCA images aren't affected (#629, #685)

Features

  • Configuration files reference environment variables with ${VAR}, ${VAR:-default} and ${VAR:?message}, and FOCA's variables with credentials can come from files, with <name>_FILE (#625, #691)
  • Responses have the header X-Request-ID, log records have the request's identifier, operation, subject and client, the formatter json writes one JSON object per line, and log takes filters, loggers and more options (#620, #684)
  • The console script foca, with check-config, create-indexes, sync-policies and export-spec, and the switches db.create_indexes_on_startup and security.access_control.sync_policies_on_startup (#621, #690)
  • Changes of access rights go to the logger foca.audit, with who made them; the permissions API no longer logs Policy rule '...' added., updated. or deleted. on its own logger (#614, #689)
  • foca.testing: a local OIDC issuer and a pytest plugin with a network guard and a mongodb fixture, with the extra foca[testing] (#630, #679)
  • GET /me, off by default, with a hook for fields of the app (#610, #687)
  • Access control: api_enabled and api_base_path of the permissions API (#611, #678); required_roles, require_enforced, packaged models with model: foca:<file> and resource_roles_cover_custom_methods (#613, #682); is_permitted_for(), get_api_base_path(), get_resource_path() and {base_path} in policies (#606, #667)
  • getResourceRoles of ownership_server takes q, limit and offset (#609, #681)
  • foca.utils.pagination, IdConfig for identifiers and service_info.locked_fields (#623, #676)
  • db.client_options for MongoDB clients, which also report a name to MongoDB (appname) (#618, #675)
  • security.auth.userinfo_cache_ttl, for changes of groups read from user info to apply sooner (#615, #669)
  • jobs.periodic for the schedules of Celery beat, and hints for configuration keys removed in 0.14 (#622, #688)
  • foca.gunicorn_config binds to the port in PORT, by default 8080 (#619, #662)
  • Startup warnings for a service info with the placeholder version 0.0.0.dev0 and for gateways without loop detection (#624, #664)
  • The release has foca-image-requirements-py<version>.txt as assets, to install the same versions in images built on the FOCA image (#629, #685)
  • foca-common 0.5.0: extraEnv, extraEnvFrom and rolloutOnSecrets (#626, #672); autoscaling and topology spread constraints (#627, #677); gateway apps with plugins, backendsKey and requireAccessControl, and Flower (#628, #692)

Security

  • By default, apps generate the request's identifier and ignore what clients send; server.request_id.trust_incoming is for apps behind a proxy that replaces or rejects clients' values, as clients could otherwise choose the identifier in logs and audit events (#695, #696)
  • security.auth.reject_invalid_tokens, off by default, answers 401 for invalid tokens on operations with optional authentication, and startup warns of functions it doesn't reach (#607, #668; #693, #694)
  • The repr of database and collection settings no longer shows the credentials of clients, and the log of new MongoDB clients has only hosts and ports as PyMongo understands them, as well as the database (#625, #691)
  • The log no longer has the start of a password containing # (#674, #675)
  • Logs of invalid responses no longer have the response body: Connexion's message is filtered out, and the logger foca.errors.exceptions logs the operation and the error (#616, #671)
  • The FOCA image installs its dependencies with their hashes and pins its base images by digest (#629, #685)
  • The FOCA image upgrades apt for CVE-2026-109518, which its base images don't have the fix of yet (#697, #698)

Fixes

  • MongoDB clients are no longer used across forks in Celery workers (#659, #663)
  • Discovery reads serviceId, which Cloud Registry 1.0.0rc2 has instead of service_id in GET /verifications, so that apps such as proTES no longer end up without backends; group and artifact ignore surrounding whitespace (#665, #670)
  • Revocations in GET /verifications apply to cached backends even if GET /services fails (#673, #683)
  • Older pods no longer overwrite the configured rules of newer ones during rolling upgrades, with policies_revision and policies_force (#612, #680)
  • Admins can list the roles of resources without owners and assign their first owner, if the operation of ownership_server is passed an existence check (#608, #666)

Documentation

  • The migration guide covers all changes of behaviour, and the docs explain PORT and the limits of the foca command (#693, #694)
  • Links to the docs of Casbin, and a contributing note on upgrading system packages of the image (#697, #698; #699, #700)
  • NOTICE has an entry for the Casbin adapter (#655, #657)

Maintenance

  • A real gateway plugin runs in the live service tests (#656, #658)
  • An integration test of the request ID through Gunicorn, and one pinned version of uv in the jobs of CI (#693, #694)
  • Dependency updates (#660, #661)
  • Release preparation for 0.21.0: citation metadata and release notes (#699, #700)

Commits

Read more

foca-common 0.5.0

foca-common 0.5.0 Pre-release
Pre-release

Choose a tag to compare

@uniqueg uniqueg released this 09 Nov 15:58
Immutable release. Only release title and notes can be modified.
chart-v0.5.0
5eb4f70

foca-common 0.5.0 adds extra environment variables and rollouts on changed Secrets, autoscaling and topology spread constraints, and the settings of gateway apps, and follows FOCA 0.21.0's credentials from files.

Features

  • extraEnv, extraEnvFrom and rolloutOnSecrets (#626, #672)
  • Autoscaling (HorizontalPodAutoscaler) and topology spread constraints (#627, #677)
  • Gateway apps: plugins, backendsKey and requireAccessControl, and Flower (#628, #692)
  • The check of variables that the chart sets also covers their _FILE forms, as FOCA refuses both at once (#625, #691)

Documentation

  • The chart's docs cover server.request_id.trust_incoming for apps behind a proxy (#695, #696)

Maintenance

  • A gateway example chart runs a real gateway plugin in the kind install test (#656, #658)

Commits

  • test: run a real gateway plugin in live services by @uniqueg in #658
  • feat(chart): add extraEnv and rollout on secrets by @uniqueg in #672
  • feat(chart): add HPA and topology spread by @uniqueg in #677
  • feat(chart): add gateway helpers by @uniqueg in #692
  • fix: don't trust incoming request IDs by default by @uniqueg in #696
  • feat(config)!: support secrets in config by @uniqueg in #691

Full Changelog: chart-v0.4.0...chart-v0.5.0

v0.20.0

v0.20.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 03 Nov 21:14
Immutable release. Only release title and notes can be modified.
v0.20.0
55e2ea5

FOCA 0.20.0 removes pip from the FOCA image, so that image scans of apps built on it no longer report the copies of packages that pip vendors, and closes a way for clients to overwrite records of failed runs. Gateway apps can key the hashes of the plugin store with a secret, and the Helm library chart foca-common 0.4.0 runs apps with several replicas and tunable probes. Apps whose images install packages with pip install on top of the FOCA image need to change, as do apps that read failure records by their _id: see the migration guide. Token exchange is not part of this release.

Breaking changes

  • The FOCA image no longer contains pip, which vendors copies of other packages that image scans report in every image built on FOCA; pip install in a Dockerfile based on the image now fails, so install packages with uv from a pinned stage, without copying uv into the image, and remove the entries for pip's vendored packages from .trivyignore.yaml (#556, #592)
  • Gateway plugins: records of failed runs (ProvenanceStore.save_failure(), only with plugins.provenance.record_failed: true) are keyed (_id) by run- and the server-generated run ID rather than the client's X-Request-ID, which stays in the field request_id; lookups by request ID need to query that field, and also _id while records of 0.19.0 exist (#575, #587)

Features

  • Gateway plugins: the setting plugins.defaults.store.key_secret or the environment variable FOCA_PLUGINS_STORE_KEY_SECRET keys the hashes of ctx.store.key_for() (HMAC-SHA256), and apps that keep such data in the database without it log a warning at startup; setting, changing or removing the secret makes entries keyed with key_for() unreachable (#565, #589)
  • foca-common 0.3.0: app replicas (replicas) and a PodDisruptionBudget (podDisruptionBudget); app charts need a template file for the budget (#584, #585)
  • foca-common 0.4.0: the value pluginStore.existingSecret passes the plugin store's key secret from an existing Secret to the app and the worker, and rendering fails if the config overlay sets it (#565, #589; #644, #650)
  • foca-common 0.4.0: overrides of the app's probes (startupProbe, readinessProbe, livenessProbe) (#603, #642)

Security

  • Gateway plugins: clients can no longer overwrite records of failed runs, or collide with those of others, by reusing a request ID (#575, #587)
  • GuardedClient: bodies of redirects are limited to max_response_size without reading them first, and auth or session hooks that read responses without limit (e.g., HTTPDigestAuth) are refused (#640, #643)
  • Validation errors of the configuration no longer show the invalid input, including the plugins' config and step params and the custom configuration, as it may contain secrets (#565, #589; #646, #653)
  • FOCA requires urllib3 2.8 (CVE-2026-97688, CVE-2026-97689, which defeat the deadline and size limit of GuardedClient against hostile servers) and pymongo 4.18.3 (CVE-2026-106435) (#645, #653)
  • A warning at the first token validation names trusted issuers reached without TLS, except on the loopback interface (#647, #652)

Fixes

  • GuardedClient decides by whether sending has started if an error is RequestNotSent or RequestMaybeSent, not by the kind of error, so some errors change: see the migration guide (#640, #643)
  • GuardedClient reports a header that can't be encoded as Latin-1 as invalid_header, not as invalid_url (#647, #652)
  • foca-common: requireAudience accepts configurations in which each issuer has an audience of its own, as FOCA does (#604, #641)
  • Access control logs the warning about group subjects at the right level, and the plugin listing has the right media type (#577, #639)

Documentation

  • Shutdown of Celery workers (#605, #638)
  • The contributing guide is the organization's, without an override (#578, #582)
  • The deprecated name ELIXIR Cloud is gone (#579, #581)
  • The README and the docs index point to the guide for 0.20.0; the guides and the deployment docs cover the upgrade of app charts, configured rules during a rollout and the plugin store's warnings (#644, #650; #648, #651)

Maintenance

  • CI pushes images in the environment dev-images and releases in release (#574, #576)
  • CI checks the titles of pull requests under the gate (#580, #583)
  • Release jobs have aligned names, and the README's images have absolute URLs on PyPI (#572, #573, #588)
  • Releases require a successful CI run of the release commit (#590, #591)
  • Tests of GuardedClient over real TLS; an origin note on the Casbin adapter (#647, #652)
  • Dependency updates (#595, #596, #597, #600, #601, #602)
  • Release preparation for 0.20.0: citation metadata and release notes (#649, #654)

Commits

  • ci: push images in dev-images and release by @uniqueg in #576
  • docs: drop the deprecated ELIXIR Cloud name by @uniqueg in #581
  • docs: stop overriding the org contributing guide by @uniqueg in #582
  • ci: check PR titles under the gate by @uniqueg in #583
  • fix(plugins): key failure records by run ID by @uniqueg in #587
  • feat(chart): add app replicas and a PDB by @uniqueg in #585
  • ci: align release jobs, absolute README images by @uniqueg in #588
  • ci: release only commits whose CI passed by @uniqueg in #591
  • feat(plugins): key store hashes with a secret by @uniqueg in #589
  • build!: remove pip from the FOCA image by @uniqueg in #592
  • build(deps): Bump astral-sh/setup-uv from 10.3.2 to 10.3.3 in the github-actions group across 1 directory by @dependabot[bot] in #595
  • build(deps): Bump types-pyyaml from 6.0.12.20260906 to 6.0.12.20261030 by @dependabot[bot] in #597
  • build(deps): Bump types-requests from 2.33.0.20261006 to 2.33.0.20261030 in /requirements by @dependabot[bot] in #600
  • build(deps): Bump types-requests from 2.33.0.20261006 to 2.33.0.20261030 by @dependabot[bot] in #598
  • build(deps): Bump the python-dependencies group across 2 directories with 1 update by @dependabot[bot] in #596
  • build(deps): Bump semgrep from 1.182.1 to 1.183.0 in the semgrep group across 1 directory by @dependabot[bot] in #601
  • build(deps): Bump ruff from 0.17.2 to 0.17.3 in the ruff group across 1 directory by @dependabot[bot] in #602
  • docs: describe Celery worker shutdown by @uniqueg in #638
  • fix: group-subject warning, listing media type by @uniqueg in #639
  • fix(chart): honour per-issuer audiences by @uniqueg in #641
  • fix: bound redirect bodies, tell sent from unsent by @uniqueg in #643
  • fix(chart): rename plugins.existingSecret by @uniqueg in #650
  • docs: point upgraders to the 0.20.0 guide by @uniqueg in #651
  • fix: small pre-release findings of 0.20.0 by @uniqueg in #652
  • fix: hide plugin input, raise dependency floors by @uniqueg in #653
  • build: prepare the 0.20.0 release by @uniqueg in #654

Full Changelog: v0.19.0...v0.20.0

foca-common 0.4.0

foca-common 0.4.0 Pre-release
Pre-release

Choose a tag to compare

@uniqueg uniqueg released this 09 Nov 15:58
Immutable release. Only release title and notes can be modified.
chart-v0.4.0
55e2ea5

foca-common 0.4.0 passes the key secret of the gateway plugins' store from an existing Secret, allows overrides of the app's probes, and accepts per-issuer audiences, as FOCA 0.20.0 does.

Features

  • The value pluginStore.existingSecret passes the plugin store's key secret from an existing Secret to the app and the worker, and rendering fails if the config overlay sets it (#565, #589; #644, #650)
  • Overrides of the app's probes (startupProbe, readinessProbe, livenessProbe) (#603, #642)

Fixes

  • requireAudience accepts configurations in which each issuer has an audience of its own, as FOCA does (#604, #641)

Maintenance

  • Releases require a successful CI run of the release commit (#590, #591)
  • Release preparation, together with FOCA 0.20.0 (#649, #654)

Commits

  • ci: release only commits whose CI passed by @uniqueg in #591
  • feat(plugins): key store hashes with a secret by @uniqueg in #589
  • fix(chart): honour per-issuer audiences by @uniqueg in #641
  • feat(chart): allow app probe overrides by @uniqueg in #642
  • fix(chart): rename plugins.existingSecret by @uniqueg in #650
  • build: prepare the 0.20.0 release by @uniqueg in #654

Full Changelog: chart-v0.3.0...chart-v0.4.0

foca-common 0.3.0

foca-common 0.3.0 Pre-release
Pre-release

Choose a tag to compare

@uniqueg uniqueg released this 09 Nov 15:58
Immutable release. Only release title and notes can be modified.
chart-v0.3.0
4fef0d4

foca-common 0.3.0 runs apps with several replicas and a PodDisruptionBudget, and uses a keep-alive longer than the idle timeouts of common proxies. App charts need a template file for the budget.

Features

  • App replicas (replicas) and a PodDisruptionBudget (podDisruptionBudget); app charts need a template file for the budget (#584, #585)

Fixes

  • The petstore chart and the docs use a keep-alive of 100 s, longer than the idle timeouts of common proxies (#469, #478)

Documentation

  • The Gunicorn settings of the chart take precedence over FOCA's default settings in the image (#458, #463)
  • The chart version in the docs is taken from Chart.yaml (#472, #481)

Maintenance

  • CI workflow and job names are aligned with the other repositories (#480, #482)
  • Releases of the chart need approval, in the protected environment release (#449, #520; #563, #571)
  • Dependency updates (#484, #555)

Commits

  • feat(config): add default Gunicorn settings by @uniqueg in #463
  • fix(chart): use a keep-alive of 100 s by @uniqueg in #478
  • docs: take the chart version from Chart.yaml by @uniqueg in #481
  • ci: align workflow and job names by @uniqueg in #482
  • build(deps): Bump the github-actions group across 3 directories with 4 updates by @dependabot[bot] in #484
  • ci: approve library chart releases by @uniqueg in #520
  • build(deps): Bump the github-actions group across 1 directory with 2 updates by @dependabot[bot] in #555
  • ci: publish in the environment release by @uniqueg in #571
  • feat(chart): add app replicas and a PDB by @uniqueg in #585

Full Changelog: chart-v0.2.0...chart-v0.3.0

v0.19.0

v0.19.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 31 Oct 16:31
Immutable release. Only release title and notes can be modified.
v0.19.0
04eebb1

FOCA 0.19.0 gives gateway plugins a shared key-value store (ctx.store), e.g., for caches and per-user budgets of third-party APIs, kept in the app's MongoDB database for all processes and replicas, and shows what each plugin stores in the plugin listing. There is no migration guide, as nothing breaks, but operators of gateway apps should read the first two Features bullets before upgrading: gateways with a database create a collection and indexes at startup, and the plugin listing has new required fields.

Features

  • Gateway plugins: a key-value store for plugins (ctx.store: get, set, delete, atomic increment with limits, and key_for to pseudonymize keys), with a namespace per plugin distribution and a TTL on every entry; new settings plugins.defaults.store and plugins.available.<id>.store (enabled, max_entry_size, max_ttl, by default 30 days). With db.dbs, gateway apps keep the entries in the collection plugin_store of the app's first database (not in the policy database that access control adds for apps without one) and create its indexes there at startup (a TTL index on expires_at, one on ns), so the database user needs the right to create indexes; if that fails, the app starts anyway with a warning (an error, with the cause, for conflicting indexes, failed authentication or missing rights), and writes to the store fail until the indexes exist. Each start also tries to cut the expiry of existing entries to the current max_ttl; if that fails (logged), they keep their expiry until a later start succeeds. Without database, each process keeps its entries in memory, without size limit (configure a short max_ttl), and the app warns at startup if plugins keep stored data there. Plugins that use ctx.store require foca>=0.19 (#550, #557, #564, #568)
  • Gateway plugins: plugins declare what they keep in their store (data_stored), and the plugin listing (GET /plugins, GET /plugins/{plugin_id}) shows it with the mode of the plugin's store (storage: shared, local or off); both fields are new and required (the listing's specification is now version 1.1.0), so clients that validate listings need to know them, and plugins that declare data_stored require foca>=0.19 (#551, #560, #564, #568)

Documentation

  • The README shows the new logo, with a variant for dark mode (#566, #567)

Maintenance

  • The community files (code of conduct, contributing guidelines, security policy) are the organization's; the README and the docs link to them (#542, #544)
  • CI passes in forks, without the upstream secrets (#546, #547), uses the organization's shared scan-image and gate actions (#548, #549, #553), pinned to their release v1.0.0 (#558, #559), and also scans the released Python 3.15 image (#540, #541)
  • Releases publish the package to PyPI and release the Helm library chart in one protected environment, release (formerly pypi and chart-release) (#563, #571)
  • Curated release notes (docs/releases/) are added to GitHub's generated notes of each release (#539, #543)
  • The image scan ignores an advisory of the setuptools that pip vendors, which the app doesn't use (#561, #562)
  • Dependency updates (#554, #555)
  • Release preparation for 0.19.0: citation metadata and release notes (#569, #570)

Commits

  • ci: scan the released Python 3.15 image by @uniqueg in #541
  • ci: prepend custom notes to generated notes by @uniqueg in #543
  • docs: use the org-wide community files by @uniqueg in #544
  • ci: make CI pass in forks by @uniqueg in #547
  • ci: use the shared scan-image and gate actions by @uniqueg in #553
  • build(deps): Bump the github-actions group across 1 directory with 2 updates by @dependabot[bot] in #555
  • build(deps): Bump the ruff group across 2 directories with 1 update by @dependabot[bot] in #554
  • feat(plugins): add plugin key-value store by @uniqueg in #557
  • ci: pin the shared actions to v1.0.0 by @uniqueg in #559
  • feat(plugins): list plugin storage by @uniqueg in #560
  • build: accept setuptools advisory vendored by pip by @uniqueg in #562
  • docs: replace the README logo by @uniqueg in #567
  • fix(plugins): fix plugin store review findings by @uniqueg in #568
  • ci: publish in the environment release by @uniqueg in #571
  • build: prepare the 0.19.0 release by @uniqueg in #570

Full Changelog: v0.18.0...v0.19.0

v0.18.0

v0.18.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 27 Oct 01:31
Immutable release. Only release title and notes can be modified.
v0.18.0
1098fa6

FOCA 0.18.0 adds a plugin engine for gateway apps such as proTES (plugins installed and pinned by operators, per-request pipelines, failover routing, provenance and a plugin test kit), an HTTP client for untrusted URLs guarded against SSRF, opt-in roles (e.g., for an admin mode), settings per trusted issuer and Python 3.15 support, and keeps one cached Casbin enforcer per app instance, so that requests cost about the same with many policy rules as with few. It contains breaking changes: please read Migrating to 0.18.0 before upgrading.

Breaking changes

  • Access control: each app instance keeps one shared, cached Casbin enforcer, kept up to date via a record of changes (<collection_name>_changes); rules changed in the database directly (e.g., with mongosh) no longer apply from the next request, but only after mark_changed() or a restart; enforcer methods that FOCA's adapter can't store (update_policy(), remove_policies()) raise NotImplementedError; during a rolling update from 0.17, upgrade all instances before changing rules (#450, #454).
  • Access control: get_enforcer() is removed; use the context manager locked_enforcer() (#468, #477).
  • Access control and errors: apps refuse to start if group_mapping maps groups but no group claim is set, or if claim_groups has surrounding whitespace; exceptions.validation_details now defaults to true, so responses to invalid requests carry the validation reason as detail (#467, #475).
  • Auth: with several trusted issuers, subjects are namespaced by issuer (<namespace>|<subject>, by default the issuer URL), also in policies, resource roles, owners and on-behalf-of users; rules and grants stored for bare subjects no longer apply unless the issuer's namespace is set to "" (#509, #512).
  • Auth: trusted issuers can be listed with settings of their own (namespace, audience, claim_groups, userinfo_claims), which replace the global settings for their tokens; security.auth.issuers is typed Sequence[str | IssuerConfig] (use issuer_urls for the URLs) (#503, #510, #514).
  • Configuration: the top-level plugins section is now validated as FOCA's gateway plugin configuration, with unknown keys refused, also in apps that are no gateways; gateway apps refuse the keys of earlier middleware stacks (middlewares, custom.middlewares) (#486, #496).

Features

  • Gateway plugins: a framework-free plugin engine (foca.plugins) for gateway apps, declared with Foca(gateway=GatewayApp(...)): plugins from the entry point group foca.plugins, allowlisted and pinned in plugins.available, run in the phases request, route, forward and response, in steps with fallback alternatives, timeouts and on_failure (#486, #496).
  • Gateway plugins: clients choose presets, own pipelines (off by default) and backends per request in the reserved tags gateway.pipeline and gateway.backends, within limits, roles and an admin frame (prepend, append); experimental (#487, #498).
  • Gateway plugins: provenance records of each run, with hashes of each plugin's changes and no secrets; optional records of failed runs with a TTL (#488, #499).
  • Gateway plugins: typed backend lists for gateway apps (#493, #501), a default failover router foca.routing.ordered (#491, #504), gateway tags that record the pipeline, plugins and backend of each task or run (#494, #505), a plugin listing API for clients (GET /plugins, GET /plugins/{plugin_id}) (#489, #506) and a plugin test kit (foca.plugins.testing) with contract checks and fakes (#492, #507).
  • Utilities: GuardedClient (foca.utils.http) sends requests to untrusted URLs with SSRF guards (public addresses only, also after DNS resolution and on connect; redirects not followed; time and size limits); new dependencies urllib3>=2.6,<3 and packaging>=23 (#490, #500).
  • Access control: opt-in roles (opt_in_roles, header opt_in_header, default X-Request-Roles) that apply only to requests that ask for them, e.g., for an admin mode, with get_available_opt_in_roles() and get_active_opt_in_roles() (#502, #508).
  • Access control: ownership by document field (set_owner_field(), owner_filter()) for resources that are never shared (#455, #456).
  • Configuration: startup checks that warn about settings that likely don't work as intended (e.g., no admins; placeholder service info), and security.access_control.require_admin (#459, #466).
  • Configuration: public URLs behind proxies (server.public_url, get_public_url()) and the typed custom configuration (get_custom_config()) (#460, #465).
  • Errors: request-specific details of validation errors (exceptions.validation_details) (#461, #464).
  • Deployment: default Gunicorn settings for apps in containers (foca.gunicorn_config) (#458, #463).
  • Python 3.15 is supported, with images tagged -py3.15; the unsuffixed tags stay on Python 3.13 (#448, #457).

Security

  • Gateway plugins: client pipelines are off by default and only accepted from authenticated callers, and the app warns on startup about policy steps of the default pipeline that client pipelines could skip (#518, #526).
  • Gateway plugins: the caller (Principal) passed to plugins is identified as by access control: on-behalf-of users, the roles of service clients and role rules (#519, #527).
  • The SSRF guard rejects IPv6 site-local addresses (fec0::/10); the build context of the base image is an allowlist, so local files (e.g., .env) can't end up in published images; the petstore-access-control example adds admins via the permissions API (#516, #522).
  • The .dockerignore files of the examples are allowlists, so that local files stay out of example images (#511, #513).

Fixes

  • Gateway plugins: the plugin listing API works in apps that set a controller for all operations (add_operation_fields with x-openapi-router-controller) (#515, #521).
  • Gateway plugins: gateway settings are bound to their app: a later Foca(...) without gateway= (e.g., in a Celery worker module) no longer clears them (#517, #525).
  • Access control: opt-in roles need no group mapping to them, so that an app's base config can make a role opt-in before its deployments map groups to it; apps warn of opt-in roles that no group is mapped to on startup, and opt-in roles must not be resource roles or start with a subject prefix (#530, #533).
  • Releases are published only after their assets are uploaded (#451, #452).
  • The petstore chart and the docs use a keep-alive of 100 s, longer than the idle timeouts of common proxies (#469, #478).

Documentation

  • Migration guide for 0.18, linked from the README and the docs index; the README lists gateway plugins and the guarded HTTP client (#523, #531, #534, #535).
  • Gateway plugins: the client-facing tags gateway.pipeline and gateway.backends and the settings client_pipelines and client_backends are marked as experimental, as they may change with federated backend selection (#528) (#529, #532).
  • The version is taken from one source (#453, #462), and the chart version in the docs from Chart.yaml (#472, #481).
  • Zenodo DOI and badge (#412, #476); the docs badge uses Shields.io (#473, #474, #479).

Maintenance

  • CI workflow and job names are aligned with the other repositories, with a single required gate CI passed (#480, #482).
  • Releases of the library chart need approval (#449, #520).
  • Sourcery skips rule-test fixtures (#470, #471).
  • Dependency updates (#484, #497).
  • Citation metadata for 0.18.0 (#524, #536).
  • A flaky timing test of the registry backend cache is fixed (#537, #538).

Commits

  • fix: publish releases after uploading assets by @uniqueg in #452
  • perf(access-control): cache the policy enforcer by @uniqueg in #454
  • feat(access-control): add field-based ownership by @uniqueg in #456
  • build: support Python 3.15 by @uniqueg in #457
  • docs: take the version from one source by @uniqueg in #462
  • feat(config): add default Gunicorn settings by @uniqueg in #463
  • feat(errors): serve validation error details by @uniqueg in #464
  • feat: add public URLs and typed custom config by @uniqueg in #465
  • feat: add startup checks of the config by @uniqueg in #466
  • ci: let Sourcery skip rule-test fixtures by @uniqueg in #471
  • docs: fix the docs badge URL by @uniqueg in #474
  • docs: add the Zenodo DOI and badge by @uniqueg in #476
  • feat!: tighten group checks and error details by @uniqueg in #475
  • refactor!: remove get_enforcer() by @uniqueg in #477
  • fix(chart): use a keep-alive of 100 s by @uniqueg in #478
  • docs: use Shields.io for the docs badge by @uniqueg in #479
  • docs: take the chart version from Chart.yaml by @uniqueg in #481
  • ci: align workflow and job names by @uniqueg in #482
  • feat(plugins): add plugin engine by @uniqueg in #496
  • feat(plugins): resolve per-request pipelines by @uniqueg in #498
  • feat(plugins): record provenance by @uniqueg in #499
  • feat...
Read more

v0.17.0

v0.17.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 23 Oct 19:25
Immutable release. Only release title and notes can be modified.
v0.17.0
6eee618

What's Changed

  • docs: re-run failed releases, tags are protected by @uniqueg in #394
  • ci: give Dependabot Docker Hub credentials by @uniqueg in #395
  • feat(chart): Gateway API and ingress guides by @uniqueg in #404
  • chore: add CODEOWNERS and .editorconfig by @uniqueg in #405
  • docs: add code of conduct and contributing guide by @uniqueg in #406
  • docs: add a security policy by @uniqueg in #410
  • feat: patch specs and policies via config by @uniqueg in #409
  • fix(access-control): replace roles atomically by @uniqueg in #413
  • docs: add citation metadata by @uniqueg in #415
  • ci: attest, sign and scan published images by @uniqueg in #414
  • ci: add aggregate checks for tests and scans by @uniqueg in #421
  • fix(access-control)!: replace policies atomically by @uniqueg in #423
  • ci: add semgrep and ast-grep rules by @uniqueg in #416
  • docs: address 0.17.0 pre-release review by @uniqueg in #424
  • feat(chart): keep MongoDB data on uninstall by @uniqueg in #427
  • docs: align the README with the other apps by @uniqueg in #429
  • chore: use the service contact address by @uniqueg in #435
  • fix(scripts): harden citation.py by @uniqueg in #431
  • ci: sign and tag only the scanned image digest by @uniqueg in #432
  • ci: upload only fixable scan findings by @uniqueg in #439
  • fix(chart): drop ingress-nginx defaults by @uniqueg in #440
  • fix(image): upgrade vulnerable Python packages by @uniqueg in #441
  • docs: use generic identity provider examples by @uniqueg in #445
  • fix: address 0.17.0 review findings by @uniqueg in #443
  • chore: set citation metadata to 0.17.0 by @uniqueg in #447

Full Changelog: v0.16.0...v0.17.0