github mosona-labs/mosona-manager v0.1.20

46 minutes ago

Please refer to the Quickstart (Docs) for detailed instructions on installation and configuration.

This release adds scoped personal API keys with Bearer-authenticated automation routes, selectable IPinfo Lite geolocation in admin settings, and dashboard state caching in the Web UI.

Upgrade Notes

  • API key IP allowlists behind reverse proxies. When restricting API keys by IP/CIDR behind one or more reverse proxies, set API_KEY_TRUSTED_PROXY_CIDRS to the proxy CIDRs (comma-separated) so the Hub resolves the client IP from X-Forwarded-For right-to-left instead of matching the proxy's peer address.

Added

  • Scoped personal API keys msk_..., stored as SHA-256 digests) bound to the user's team membership ON DELETE CASCADE), managed via /api/v1/user/api-keys:
    • Fine-grained scopes server:read, monitor:read, category:read, alert:read, alert:write, server:create, server:update, server:delete), enforced against both the key's scopes and the user's current team role (write scopes require team administrator).
    • Configurable expiration (90 days by default, custom RFC3339 timestamp, or non-expiring), optional IP/CIDR allowlist (up to 32 IPv4/IPv6 entries), last_used_at tracking, and security audit logging on key lifecycle and write operations.
    • Bearer-authenticated automation API routes under /api/v1/automation for servers (cursor-paginated list, detail, create, partial JSON update, delete), monitoring (list, detail, chart, realtime), categories, and alerts.
    • API_KEY_TRUSTED_PROXY_CIDRS configuration in deploy/compose.yml, deploy/.env.example, and .env.manual.example, plus PostgreSQL integration test documentation in docs/testing.md.
  • Selectable IP geolocation provider in admin settings ip_geo_provider): choose between the local MaxMind GeoLite2 database local, default) and the IPinfo Lite API ipinfo_lite) with an ipinfo_lite_token. The token is validated as required when IPinfo Lite is active, masked in settings responses, and lookups are cached in memory (1-hour TTL, 4096 entries, 1.5s timeout, no redirects).
  • Global HTTP panic recovery middleware middleware.Recover) that logs the request path and stack trace and returns a 500 JSON response instead of terminating the request handler without a structured error.

Security

  • Require both current_password and a valid TOTP code v_code) to disable 2FA POST /api/v1/user/totp/disable), enforce atomic per-user Redis rate limiting (5 attempts per 10 minutes, fail-closed on Redis errors), and guard the database update against concurrent credential changes.
  • Fix team export and import authorization checks continuing past failed owner or TOTP validation: the helpers previously returned c.JSON(...) nil when the response wrote), allowing handlers to keep executing and write duplicate responses.

Fixed

  • Trim any leading v from the Agent runtime version in the startup banner so versions do not print with a duplicated vv prefix.

Changed

  • Update Go toolchain to 1.27.4 and bump dependencies, including echo v5.4.7, shoutrrr v0.25.1, go-oidc v3.22.0, go-jose v4.1.9, go-redis v9.24.1, gopsutil v4.26.11, golang.org/x/crypto v0.60.0, golang.org/x/net v0.63.0, golang.org/x/oauth2 v0.38.0, golang.org/x/image v0.48.0, and golang.org/x/sys v0.50.0.

Web UI

  • Add the API Keys management page (under the sidebar with a key icon) for creating, editing, and revoking personal API keys, configuring scopes, expiration, and IP allowlists, and revealing the full secret once upon creation across all locales.
  • Require current password and 6-digit authenticator code in a confirmation dialog when disabling TOTP, with a countdown timer when rate-limited 429 / Retry-After).
  • Add IP geolocation provider selection Local GeoLite2 / IPinfo Lite) and token input to Admin → General Settings, and normalize Agent version prefixes in the server edit dialog so v is not duplicated.
  • Cache dashboard monitor snapshots, alert state, category filter, scroll position, card heights, and expanded card states in memory per user/team so navigating away and returning preserves scroll and card state without reloading flicker.
  • Add an Open in new tab action to dashboard server card context menus.
  • Display a localized System label for log entries without a user user_id = 0) on team and admin log pages.
  • Replace ESLint and Prettier with Biome and upgrade frontend dependencies (including React 19.3.1, Vite 8.4.1, TypeScript 7.0.2, Tailwind CSS 4.3.5, xterm 6.0.0, and Recharts 3.11.3).

Full Changelog: v0.1.19...v0.1.20

Don't miss a new mosona-manager release

NewReleases is sending notifications on new releases.