Skip to content

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, this project adheres to Semantic Versioning, commits follow Conventional Commits, and this changelog is generated by Structured Changelog.

Unreleased

v0.6.0 - 2026-10-25

Highlights

  • Security release for the session and Redis packages: session IDs are validated and kept out of logs and errors, SiteID is enforced on every session operation, and the Redis backend requires TLS and a password for remote servers

Breaking

  • session.ViolationEvent.SessionID is deprecated and always empty; use the new SessionRef field. SessionError.Details and the violation and eviction logs use the key session_ref instead of session_id (6a98254)
  • kvsredis.New returns an error wrapping ErrInsecureConnection for a non-loopback redis:// URL, a rediss:// URL without a password, or a URL with skip_verify=true, unless Config.AllowInsecure is set (080e710)
  • The kvs session backend refuses session IDs that ValidSessionID rejects (more than MaxSessionIDLength characters, or characters outside A-Z, a-z, 0-9, -, _ and .): Create and Update return ErrInvalidSession, Get returns ErrNotFound and Delete is a no-op (8286ea3)
  • With SiteID set, ControlledStore.Update and Touch return ErrNotFound for a session stored for another site and Delete leaves it in place, and DeleteByUserID deletes only this site's sessions and returns an error when the underlying store does not implement SessionLister (f30e70d)

Upgrade Guide

  • Violation handlers and log or metrics pipelines: read event.SessionRef instead of event.SessionID, and the session_ref key instead of session_id; compare a known session ID with session.SessionRef(id)
  • Redis: use rediss://:<password>@host:port with certificate verification for any non-loopback server, or set kvsredis.Config{AllowInsecure: true} for a trusted network
  • Custom session IDs: generate them with session.GenerateSessionID, or make sure they pass session.ValidSessionID; sessions stored under other IDs in the kvs backend can no longer be read and should be recreated
  • Multi-site deployments: keep SiteID the same across the processes of one site, and use a session store that implements SessionLister (both bundled backends do) if you call DeleteByUserID

Security

  • The kvs session backend kept sessions and each user's session index in one key space and used session IDs from client cookies as given, so the ID user:<id> addressed a user's index: deleting it hid the user's sessions from DeleteByUserID. Session IDs are now validated, and Get and Delete act only on a stored session with that ID (8286ea3)
  • ControlledStore put the full session ID, a bearer credential, into violation log lines, ViolationEvent.SessionID, SessionError details and the eviction log, so anyone with access to logs, metrics or error reports could take over the session. These now carry a non-reversible reference (the first 8 hex characters of the SHA-256 of the ID) (6a98254)
  • ControlledStore stamped SiteID on Create and checked it on Get only: Update wrote the session as given, so a session rebuilt without SiteID was stored for site "", and Update, Delete and Touch acted on sessions of another site sharing the backend. They now enforce the configured site and report a site_mismatch violation (f30e70d)
  • ControlledStore.DeleteByUserID passed straight through, so one site's "log out everywhere" also ended the user's sessions on every other site sharing the backend. With SiteID set it now deletes only this site's sessions (88f37e8)
  • kvsredis.New accepted any redis:// URL, so a remote Redis could be used over plaintext and without authentication, exposing session data and tokens on the network. Non-loopback servers now require rediss:// with certificate verification and a password (080e710)
  • The Redis backend's List built its SCAN MATCH pattern without escaping, so glob metacharacters in the key prefix or the requested prefix matched keys outside it, including other namespaces sharing the instance. The literal prefix is now escaped and keys outside the requested prefix are dropped (32c897b)

Added

  • session.ValidSessionID and session.MaxSessionIDLength (8286ea3)
  • session.SessionRef and ViolationEvent.SessionRef (6a98254)
  • kvsredis.Config.AllowInsecure and kvsredis.ErrInsecureConnection (080e710)

Fixed

  • The kvs session backend logs failures of its best-effort user index maintenance with slog.WarnContext instead of discarding them, and Create no longer overwrites a user's index it could not read, which hid the user's other sessions from DeleteByUserID (91b1e12)

Dependencies

  • 3 dependency updates

Documentation

  • KVS guide and README describe the Redis connection requirements and AllowInsecure (080e710)
  • Session controls guide describes site enforcement on every operation, site-scoped DeleteByUserID and session_ref (6a98254)

Tests

  • kvs session backend tests, including a crafted index ID and index maintenance failures (8286ea3)
  • ControlledStore tests for site enforcement on Update, Delete, Touch and DeleteByUserID, and for session references in events, errors and logs (f30e70d)
  • Redis backend tests for connection requirements and prefix escaping (080e710)

v0.5.0 - 2026-06-20

Highlights

  • Session storage package with multi-site isolation, size controls, and per-user limits. Redis backend for KVS.

Added

  • Session storage package (session/) with Store interface for session management (221c0b9)
  • ControlledStore wrapper with size limits, JSON validation, and violation callbacks (221c0b9)
  • Multi-site isolation via SiteID configuration for secure session separation (221c0b9)
  • MaxSessionsPerUser limit with automatic oldest session eviction (221c0b9)
  • Structured error types with machine-readable codes for HTTP status mapping (221c0b9)
  • In-memory session backend (session/backend/memory) for development/testing (221c0b9)
  • KVS session backend (session/backend/kvs) adapting any kvs.ListableStore (221c0b9)
  • Redis KVS backend (kvs/backend/redis) using go-redis/v9 (5687d5b)
  • ViolationHandler callback for metrics and alerting on policy violations (221c0b9)

Fixed

  • Linting issues in session package resolved (9a9a355)

Dependencies

  • 8 dependency updates

Documentation

  • KVS package documentation (docs/kvs/index.md) (160741b)
  • Session package overview (docs/session/index.md) (160741b)
  • Session backends guide (docs/session/backends.md) (160741b)
  • Session controls reference (docs/session/controls.md) (160741b)
  • MkDocs navigation updated with Key-Value Storage and Session Storage sections (160741b)

Tests

  • Comprehensive tests for ControlledStore including size limits, JSON validation, and site isolation (a994541)

v0.4.0 - 2026-05-03

Highlights

  • Root-level aggregator for batteries-included backend registration

Added

  • Root aggregator omnistorage.go that re-exports core types and auto-registers all built-in backends (channel, dropbox, file, memory, sftp) (edd22c1)
  • Users can now import github.com/plexusone/omnistorage-core directly to get all core backends registered automatically (edd22c1)
  • Backends() function re-exported in aggregator to list registered backends (fc31d32)

Documentation

  • README updated with aggregator import usage example
  • Docs updated to explain core vs umbrella package pattern

v0.3.0 - 2026-04-25

Highlights

  • Organization change: module renamed from github.com/grokify/omnistorage to github.com/plexusone/omnistorage-core with reorganized package structure

Breaking

  • Module renamed from github.com/grokify/omnistorage to github.com/plexusone/omnistorage-core (988a83b)
  • Package structure reorganized: backend/ → object/backend/, compress/ → object/compress/, format/ → object/format/, sync/ → object/sync/ (988a83b)
  • S3 backend removed from core; now available in separate plexusone/omni-aws package (988a83b)
  • AWS SDK dependencies removed to keep core thin and provider-agnostic (988a83b)

Added

  • New kvs/ subsystem for key-value storage with Store, ListableStore, and DocumentStore interfaces (988a83b)
  • In-memory KVS backend (kvs/backend/memory) for ephemeral storage (988a83b)
  • SQLite KVS backend (kvs/backend/sqlite) for persistent key-value storage using modernc.org/sqlite (988a83b)

Changed

  • MkDocs theme updated to PlexusOne design system with dark mode default (6333164)
  • Site URL updated to plexusone.github.io/omnistorage-core (6333164)

Dependencies

  • 5 dependency updates

Documentation

  • All documentation updated for new module name and package paths (5d41959)
  • S3 backend documentation updated to reference plexusone/omni-aws package (5d41959)
  • README badges and links updated for new organization (8544a5b)

v0.2.0 - 2026-01-17

Highlights

  • Security fix for SFTP host key verification, cross-platform timestamp improvements, and dependency updates

Security

  • SFTP backend now verifies host keys using ~/.ssh/known_hosts instead of InsecureIgnoreHostKey() to prevent MITM attacks (6f7b22b)

Changed

  • SFTP backend requires server host key in ~/.ssh/known_hosts file for connections (6f7b22b)
  • Use oscompat/tsync for cross-platform timestamp comparison in sync.NeedsUpdate() (c96f8f6)

Dependencies

  • 4 dependency updates

Documentation

  • Rename Omnistorage to OmniStorage in documentation (1f1ee11)
  • Fix TRD.md formatting (405652a)

v0.1.0 - 2026-01-10

Highlights

  • Initial release with unified storage abstraction layer for Go

Added

  • Core Backend interface with NewWriter, NewReader, Exists, Delete, List, Close methods (0ae32d4)
  • RecordWriter and RecordReader interfaces for streaming record-oriented data (0ae32d4)
  • ExtendedBackend interface with Stat, Mkdir, Rmdir, Copy, Move, and Features methods (0ae32d4)
  • ObjectInfo interface for file metadata (Size, ModTime, Hash, MimeType) (0ae32d4)
  • Hash support for MD5, SHA1, SHA256, CRC32, and custom hash types (0ae32d4)
  • Features struct for backend capability discovery (0ae32d4)
  • Backend registry with Register(), Open(), and Backends() functions (0ae32d4)
  • File backend (backend/file) for local filesystem storage (0e30186)
  • Memory backend (backend/memory) for in-memory storage and testing (0e30186)
  • S3 backend (backend/s3) supporting AWS S3, Cloudflare R2, MinIO, Wasabi, and other S3-compatible services (5d3aa2f)
  • SFTP backend (backend/sftp) for SSH file transfer with password and key authentication (a17e985)
  • Channel backend (backend/channel) for Go channel-based inter-goroutine communication (41109e3)
  • Multi-writer (multi/writer) for fan-out to multiple backends (WriteAll, WriteBestEffort, WriteQuorum modes) (18e84fd)
  • NDJSON format (format/ndjson) for newline-delimited JSON record framing (9ec3bd3)
  • Gzip compression (compress/gzip) wrapper (60a6395)
  • Zstandard compression (compress/zstd) wrapper (60a6395)
  • Sync package with rclone-inspired file synchronization (a66ded4)
  • sync.Sync() for one-way sync with optional delete (a66ded4)
  • sync.Copy() for copying files without deleting extras (a66ded4)
  • sync.CopyFile(), sync.CopyBetweenPaths(), sync.CopyToPath(), sync.CopyFromPath() convenience functions (a66ded4)
  • sync.TreeCopy() for preserving full directory structure (a66ded4)
  • sync.Check() for comparing files between backends (a66ded4)
  • sync.Verify(), sync.VerifyFile(), sync.VerifyChecksum() for verification (a66ded4)
  • sync.VerifyWithDetails() and sync.VerifyAndReport() for detailed verification results (a66ded4)
  • sync.VerifyIntegrity() and sync.VerifyAllIntegrity() for file integrity checks (a66ded4)
  • sync.Bisync() for bidirectional sync with conflict resolution (NewerWins, LargerWins, KeepBoth, etc.) (a66ded4)
  • Filter system (sync/filter) with include/exclude patterns, size filters, and age filters (a66ded4)
  • Rate limiting with token bucket algorithm for bandwidth control (a66ded4)
  • Retry with exponential backoff and jitter for failed operations (a66ded4)
  • Progress callbacks for sync operations (a66ded4)
  • Dry-run mode for sync operations (a66ded4)
  • Concurrent transfer support with configurable parallelism (a66ded4)
  • Structured logging via slog for sync operations (a66ded4)
  • Helper functions CopyPath() and MovePath() for cross-backend operations (0ae32d4)
  • AsExtended() helper for type-safe ExtendedBackend conversion (0ae32d4)

Documentation

  • README.md with usage examples and API documentation (e48bda5)
  • ROADMAP.md with development phases and planned features (e48bda5)
  • PRD.md (Product Requirements Document) (e48bda5)
  • TRD.md (Technical Requirements Document) (e48bda5)
  • GoDoc comments on all public APIs (e48bda5)

Tests

  • Comprehensive test suite with 80+ tests across all packages (de720c3)
  • Conformance tests for backend implementations (de720c3)
  • Integration tests for file, memory, and S3 backends (de720c3)