v1.0.0-rc1
A release candidate for 1.0.0. It carries 52 pull requests since v0.7.2 and closes two rounds of security and correctness review.
Upgrading
Re-sign every URL before you deploy this. Two changes to the signature mean no existing signed URL validates.
- Every query parameter now takes part in the signature. Only the parameters named by
_keysdid before, which leftoverlayunprotected, so a caller holding one valid signed watermark URL could point the overlay at any address the service could reach. - The signed message is canonical. It holds the command path, the image URL, then the signed parameters as percent-encoded
name=valuepairs ordered by name, one field per line. The parameter name is part of the message, so two requests that differ only in where a character sits between adjacent parameters no longer share a signature.
DIMS_SIGNING_COMPAT=legacy accepts the mod_dims _keys signature. It does not accept signatures made by an earlier go-dims release.
The signing page carries the construction with a working implementation in PHP, Python, JavaScript, and Ruby.
Check these defaults against your traffic. Each one refuses a request that an earlier release served.
| Setting | Default | What it refuses |
|---|---|---|
DIMS_ALLOW_PRIVATE_NETWORKS |
false |
An origin that resolves to a loopback, link local, or private address. Set it to true when the origin sits inside your network. |
DIMS_MAX_SOURCE_BYTES |
64 MB | A larger source image, with 400. |
DIMS_MAX_SOURCE_PIXELS |
100 MP | A larger source image, with 400. |
DIMS_MAX_OUTPUT_PIXELS |
50 MP | A larger result, with 400. |
DIMS_MAX_CONCURRENT |
CPU count | Work past the limit queues for DIMS_MAX_CONCURRENT_WAIT, then returns 503. |
An unknown command name now returns an error. It used to be ignored, which served a differently processed image without saying so.
Terraform. signing_key is required, development_mode defaults to false, and the Lambda function URL defaults to AWS_IAM. A precondition blocks a public unsigned deployment.
Security
- The source address is checked at the socket, once per connection. A name that resolves to a private address is refused whatever it is called, and a redirect is checked the same way as the original request.
DIMS_ALLOWED_HOSTSandDIMS_MAX_REDIRECTSnarrow it further. - The file backend is contained with
os.OpenRoot, so a path cannot leave the base directory, including by way of a symlink. - Signatures are compared in constant time, and the digest is the full HMAC-SHA256.
- Two data races are fixed, on the shared configuration and on the HTTP client.
Added
- Conditional requests. A response carries an
ETag, and a request sending a matchingIf-None-Matchgets304. - Source and output pixel caps, a source byte cap, and separate limits on how many images are processed and downloaded at once.
- Server read, write, and idle timeouts, and a graceful shutdown that lets requests in flight finish.
- The libvips operation cache and thread count are configurable.
- The
sepiacommand. - Twenty settings in total. The configuration reference lists them.
This candidate
dims version reports 1.0.0-rc1. The container is published as ghcr.io/beetlebugorg/go-dims:1.0.0-rc1 and :next. The :latest tag still points at the last finished release.
What's Changed
- Bump the npm_and_yarn group across 1 directory with 20 updates by @dependabot[bot] in #41
- Bump the npm_and_yarn group across 1 directory with 20 updates by @dependabot[bot] in #42
- Bump the npm_and_yarn group across 1 directory with 2 updates by @dependabot[bot] in #40
- Add contributor conventions by @beetlebugorg in #43
- Move golden test helpers into a test file by @beetlebugorg in #44
- Add a CI job for tests, vet, and vulnerability scanning by @beetlebugorg in #45
- Require a signing key in the Terraform module by @beetlebugorg in #46
- Correct the version linker flag and health check command by @beetlebugorg in #48
- Reject negative width and height by @beetlebugorg in #49
- Fix two data races in request handling by @beetlebugorg in #50
- Close vips images after use by @beetlebugorg in #51
- Sign query parameters in the order _keys lists them by @beetlebugorg in #52
- Sign every query parameter by @beetlebugorg in #53
- Pin webpackbar to 7 so the documentation builds by @beetlebugorg in #54
- Refuse connections to non-public addresses by @beetlebugorg in #57
- Contain file source reads within the base directory by @beetlebugorg in #58
- Harden the S3 source backend by @beetlebugorg in #59
- Add server timeouts and graceful shutdown by @beetlebugorg in #60
- Add a manual workflow to publish the builder image by @beetlebugorg in #65
- Build with Go 1.27 by @beetlebugorg in #61
- Fix cache header generation by @beetlebugorg in #63
- Validate command arguments by @beetlebugorg in #64
- Rotate quarter turns exactly by @beetlebugorg in #66
- Escape and correct the Content-Disposition header by @beetlebugorg in #67
- Trim the v5 path prefix and report CLI errors by @beetlebugorg in #68
- Remove dead code and name the geometry flags for what they do by @beetlebugorg in #69
- Implement the S3 prefix and output format exclusion settings by @beetlebugorg in #71
- Answer conditional requests with 304 by @beetlebugorg in #72
- Simplify AES-GCM decoding and warn on legacy keys by @beetlebugorg in #73
- Report configuration errors instead of printing them by @beetlebugorg in #74
- Update the pinned native library versions by @beetlebugorg in #75
- Implement sepia by @beetlebugorg in #76
- Limit source and output pixels by @beetlebugorg in #77
- Limit how many images are processed at once by @beetlebugorg in #78
- Allow a release rebuild to be triggered by hand by @beetlebugorg in #79
- Keep one set of golden images by @beetlebugorg in #80
- Limit source download size by @beetlebugorg in #81
- Match the Lambda deploy artifact name to the build by @beetlebugorg in #82
- Configure the libvips cache and concurrency at startup by @beetlebugorg in #83
- Correct the source backend and golden test documentation by @beetlebugorg in #84
- Sign a canonical message by @beetlebugorg in #85
- Remove unused signature and etag config fields by @beetlebugorg in #86
- Stamp the build version into the lambda and binary images by @beetlebugorg in #87
- Make the Lambda CORS policy configurable by @beetlebugorg in #88
- Fix the libpng ARG name in the builder image by @beetlebugorg in #89
- Update the golang.org/x indirect dependencies by @beetlebugorg in #90
- Update Docusaurus and the documentation dependencies by @beetlebugorg in #91
- Build against upstream govips by @beetlebugorg in #92
- Check that the build version reaches the binary by @beetlebugorg in #93
- Update the Go dependencies by @beetlebugorg in #94
- Publish a candidate tag as next rather than latest by @beetlebugorg in #95
- Stamp the release version into the binary by @beetlebugorg in #96
New Contributors
- @dependabot[bot] made their first contribution in #41
Full Changelog: v0.7.2...v1.0.0-rc1