Tags: sebdroid/cookiecrypt
Tags
chore(deps): bump github.com/caddyserver/caddy/v2 from 2.11.3 to 2.11… ….4 (#25) * chore(deps): bump github.com/caddyserver/caddy/v2 from 2.11.3 to 2.11.4 Bumps [github.com/caddyserver/caddy/v2](https://github.com/caddyserver/caddy) from 2.11.3 to 2.11.4. - [Release notes](https://github.com/caddyserver/caddy/releases) - [Commits](caddyserver/caddy@v2.11.3...v2.11.4) --- updated-dependencies: - dependency-name: github.com/caddyserver/caddy/v2 dependency-version: 2.11.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * docs: sync README Caddy floor with go.mod --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(deps): raise Caddy floor to v2.11.3 and quic-go to v0.59.1 (#20) Caddy v2.11.2 is affected by GHSA-wwhq-w58m-w29c (CVE-2026-30852 fix bypass), GHSA-gx7w-56w6-g48x and GHSA-x5w9-xh9r-mvfc (remote admin authorisation bypasses), all resolved in v2.11.3. quic-go v0.59.0 is affected by GHSA-vvgj-x9jq-8cj9 (HTTP/3 QPACK trailer memory exhaustion), resolved in v0.59.1. govulncheck reports no findings for the new graph in symbol or module mode.
feat!: replace cookie encryption with authenticated, fail-closed desi… …gn (#18) * fix: go * feat!: replace cookie encryption with authenticated, fail-closed design - Encrypt with AES-256-GCM (default, FIPS 140-3 compatible) or ChaCha20-Poly1305; bind each ciphertext to its cookie name as AAD so values cannot be replayed under another name - Accept multiple 32-byte hex keys: first encrypts, all decrypt, enabling zero-downtime rotation - Fail closed everywhere: encrypt errors drop the Set-Cookie line, decrypt failures drop the cookie, and Write/ReadFrom/Flush force header processing so implicit 200s can no longer leak plaintext - Drop forged plaintext twins of encrypted cookies (shadow rule), with an exception for allow_outbound names so garbage ciphertexts cannot evict legitimate bare cookies - Replace allowlist/denylist with directional controls: allow_outbound, block_unencrypted + allow_inbound; path.Match globs with deny-overrides "!" negation - Split oversized cookies across <=32 chunk cookies and reassemble transparently; strict count parsing bounds forged-header work - Keep __Host-/__Secure- prefixes outermost so browser enforcement survives renaming; escape dots so chunk names cannot collide with encrypted names - Add no-prefix mode (prefix ""): names stay unchanged and every inbound cookie is presumed ciphertext unless listed - Preserve unrecognized Set-Cookie attributes and RFC-invalid Cookie segments verbatim; support WebSockets/SSE via Unwrap and http.ResponseController - Demote per-cookie logs to DEBUG; WARN/ERROR for drops, names only Tests cover both ciphers, rotation, shadowing, splitting, FIPS-only mode (via subprocess), and GCM construction compatibility at ~98% coverage. CI adds vet, -race tests, golangci-lint, govulncheck, and a job testing against the latest Caddy. BREAKING CHANGE: keys must now be 64-char hex strings decoding to 32 bytes; old free-form keys are rejected. The Caddyfile allowlist and denylist directives are removed: map `allowlist A B` to `allow_outbound * !A !B` and `denylist C` to `allow_outbound C`. In JSON config the `key` string field is now `keys`, an array. The wire format changed, so cookies issued by v1 fail to decrypt and are dropped once (users are logged out and re-issued cookies on their next visit). Requires Caddy >= v2.11.2 and Go >= 1.25. * docs: update README with important notes on Caddy version and key management; improve key provisioning logic and tests * fix: use the correct english * fix: improve error message for FIPS compliance and clarify response writer comments