• v0.16.2 5c48cc2fb5

    v0.16.2 Stable

    x released this 2026-11-05 12:51:02 +00:00 | 13 commits to main since this release

    VSKI v0.16.2

    SSO with OAuth providers, storage statistics for the dashboard, and
    self-contained API docs. Safe upgrade from v0.16.0 — the one schema
    change (an optional scope column on _auth_providers) is applied
    automatically on first start; no configuration changes are required.

    SSO: hosted login for apps and CLIs

    Applications can now hand authentication to the server instead of
    building their own login screens. The flow is OAuth-like: the app sends
    the user to GET /sso/authorize?redirect_uri=...&state=..., the server
    renders a hosted login page, and on success redirects back with a
    one-time 60-second code that the app exchanges for a token via
    POST /api/auth/exchange — the same {token, user} shape as
    /api/auth/login, and the token never appears in a URL or browser
    history.

    • Both superusers and auth-collection users can sign in; superusers are
      checked first. A valid session skips the form on the next
      authorization (HttpOnly vski_sso cookie, 24h), and GET /sso/logout
      clears it.
    • Redirect targets are locked down: loopback addresses
      (127.0.0.1/localhost/::1, any port) and the vski:// scheme are
      always allowed; anything else must be listed exactly in the
      _system_settings key sso_allowed_redirects (JSON array).
    • The hosted pages are embedded in the binary and can be overridden
      per-file from TEMPLATES_DIR (default <DATA_DIR>/templates), with
      the template data documented in Authentication.md.
    • Login form fields are readable in both themes (explicit input colors
      with autofill overrides — previously nearly invisible in dark mode).

    OAuth providers on the hosted page

    The hosted login page shows a "continue with" row for every configured
    provider. The full server-side client flow lives at
    /sso/oauth/{provider} and /sso/oauth/{provider}/callback:
    server-bound state (10-minute, single-use), code exchange, user info
    resolution, external_auths linking with automatic registration on
    first sign-in, then back to the application with a fresh code.

    • Providers are configured as _auth_providers records — name, auth and
      token URLs, userinfo URL, client id/secret, enabled, and the new
      optional scope (a sensible default is used per known provider).
    • Fixed two latent bugs in the existing /api/auth/oauth2-login flow:
      the client secret is now actually sent in the token exchange, and
      providers that report the subject as sub (with no numeric id) no
      longer fail user resolution.
    • The callback URL is derived from the request (with PUBLIC_URL as an
      override) so it works behind proxies without extra configuration.

    vski login --browser (py-sdk)

    The CLI can now authenticate through the hosted page instead of a
    password prompt. The default method runs a local loopback listener
    (http://127.0.0.1:<port>/callback) and waits; --method deeplink
    uses the vski:// scheme instead, with --register-deeplink to
    register the handler with the OS (Linux .desktop, Windows registry).
    --no-browser prints the URL for headless use.

    Storage statistics

    GET /api/stats/storage (admin only — superusers and admin-role API
    keys) returns deployment-level numbers in bytes: deployment_size (the
    whole data directory), db_size (the selected database file including
    WAL sidecars, selected via x-dbname), and disk_available/
    disk_total for the disk holding the data directory.

    The dashboard's Databases page shows these as three cards under the
    SQL editor whenever no query results are displayed, refetching when the
    selected database changes. SDKs expose it as client.stats.storage(db?)
    (@vski/sdk 2.8.0, vski-sdk with the stats namespace).

    SQL console results modal

    Query results now open in a modal overlaying the SQL view instead of
    pushing the page down: full-area card with the same results header plus
    a close button, dismissible via the X, Escape, or a click outside;
    column headers stay pinned while scrolling. Dry-run status gets a
    64px success/error icon with the message.

    Self-contained API docs

    /openapi.html no longer depends on a public CDN: the ReDoc bundle
    (v2.5.1) is embedded in the binary and served from /openapi.js, so
    the docs render on offline and firewalled installations too.

    Downloads