Skip to content

0.4.0: HTTP Source Caching, Timeouts, Security, Stability

Latest

Choose a tag to compare

@jbaiter jbaiter released this 24 Nov 10:15

Highlights of this release

Caching for HTTP Source Images: Images loaded from HTTP Sources can now be stored in a LRU disk-based cache to reduce latency for repeated source accessed like in tiled viewing use cases. Extensions can now also supply a custom cache identity to override the default identifier-based identity. Upstream HTTP Cache Validation Headers are honored and control cache invalidation in the disk-based cache.

Timeouts for Wolpi-issued HTTP Requests: Most HTTP requests that originate from Wolpi, like for HTTP Source images or backend API calls from extensions through the Wolpi-provided HTTP client now have a configurable timeout, defaulting to 30 seconds. This should also help if you've experienced stability issues from unresponsive backends, which could previously tie up a lot of request handling threads.

Security Improvements: We implemented a few changes to increase the default security level for Wolpi deployments, specifically for container-based deployments and for deployments that use authentication extensions.

Detailed Change Log

Changed

  • Breaking: Wolpi now refuses to start when a configured extension cannot be loaded, instead
    of logging the error and starting without it. An extension that is configured but not loaded no
    longer enforces its hooks, so e.g. an authorize extension that failed to load left the server
    publicly accessible. The startup error lists every failing extension together with the position
    in the extension code that caused the failure. The validate and install-extensions
    subcommands are exempt, they log the failure and continue with the remaining extensions.
  • Breaking: The container image now runs as the unprivileged user
    (UID/GID 10001) by default. Existing bind mounts or volumes for /app/data
    that are owned by root must be writable by this user (or, in Kubernetes,
    use securityContext.fsGroup: 10001). Mounted configuration and image files must
    be readable by this user. The default user can be changed. The image itself does not
    require a writable home directory: GraalVM's native resource cache and the npm and pip
    caches used for installing extensions live below the data directory.
  • Breaking: Client conditional headers (If-None-Match, If-Modified-Since) are no longer
    forwarded to HTTP image sources. Wolpi evaluates them after reading the source, so a conditional
    request may download the full source before returning 304, including when the HTTP source cache
    is disabled. An origin 304 without a stored body now produces HTTP 502, not a client 304.
  • Deployment change: HTTP source caching is enabled by default and requires a separate cache
    directory for each instance. Existing Kubernetes Deployments with multiple replicas must mount
    a pod-local emptyDir at the cache directory, switch to a StatefulSet with a separate volume per
    replica, or disable caching with wolpi.http-source-cache.enabled: false. Replicas cannot share
    one cache directory; Wolpi refuses to start if another instance owns it. The validate,
    install-validator, and install-extensions subcommands are exempt: when another instance
    owns the configured directory they log a warning and use a temporary directory for that
    invocation, so they remain usable next to a running server.
  • Added wolpi.image-processing.exif-orientation, which controls whether the source's EXIF
    Orientation tag is baked into the pixels (rotate) or ignored (ignore, the default).
    ignore reproduces the previous behaviour and keeps reported dimensions unchanged; rotate
    changes the reported dimensions of affected images, so derivative and client-side caches need to
    be invalidated after switching.
  • Image responses no longer carry source metadata (EXIF, XMP, IPTC, ICC)

Added

  • Shared http-timeouts.{connect,request} settings (defaults 10s/30s), with optional
    extensions and sources overrides to differentiate between HTTP requests made by Wolpi itself
    and those made by extensions through the httpClient on the context or the JavaScript
    wolpi:fetchSync function
  • Disk-backed caching of complete HTTP image sources, enabled by default, with a configurable
    byte limit, maximum freshness (default 1h), and per-resource size limit. Upstream cache directives
    and conditional revalidation govern reuse. Configurable stale-if-error fallback (default 7d,
    0s to disable) can serve expired bodies during origin failures when HTTP policy allows it.
    The optional X-Wolpi-Http-Source-Cache response header reports hits, misses, revalidation, stale
    fallback, and bypass reasons. Unknown-length and partial responses
    bypass caching.
  • New extension API: optional HttpResolvedImage.cacheIdentity supplies a stable, resolver-controlled
    source identity for cache reuse across rotating signed URLs and fetch headers, including S3
    presigned URLs. Omitting it preserves URL-and-header cache keying.

Removed

  • Wolpi is no longer published to Maven Central or the Sonatype OSS Snapshot
    Maven Repository, GitHub Releases and the GitHub Container Registry remain as
    the sole distribution channels. This is due to Maven Central's draconian
    limits that were introduced in October 2026, but it also serves to discourage
    inheriting from Wolpi in other Java projects, since the Extension API is
    intended as the sole officially supported means of customizing Wolpi.