Skip to content

v0.3.4

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Sep 06:50
5db2a56

Lil now supports many users. Each person signs in through your OIDC identity provider, and Lil records who created, edited, or deleted every link. This is the recommended release for upgrading from 0.2.x. It contains 0.3.0 and every fix since.

Upgrading from 0.2.x

  1. Back up your SQLite database. Lil runs a schema migration on first start.
  2. Register an OIDC client with the redirect URI https://<your host>/auth/oidc.
  3. Replace [admin] with [auth] in your config. See config.sample.toml and the Authentication section of the README.
  4. Deploy, sign in, and create API tokens for your scripts.

Links created before the upgrade have no recorded creator.

Breaking changes

  • Basic Auth is removed. Lil ignores the [admin] username and password.
  • [auth] is required. auth.mode must be oidc or dev. Lil has no unauthenticated mode and refuses to start if [auth] is incomplete.
  • Access is an explicit list. auth.oidc.allowed_emails is required and strict. allowed_domains is an optional extra check that must also pass. There is no self sign-up.
  • Scripts need API tokens. Send Authorization: Bearer lil_... instead of Basic credentials. This includes Prometheus scraping of /api/v1/metrics.

Features

  • OIDC sign-in with PKCE (S256) and nonce. client_secret is optional, so PKCE-only public clients work. For Google, domain checks use the signed hd claim.
  • Claims from userinfo. Some providers leave email, email_verified and name out of the ID token. Lil then reads them from the userinfo endpoint and accepts them only when the subject matches the ID token.
  • Per-user API tokens. Create and revoke them on the Tokens page or through /api/v1/tokens. Lil shows each token once.
  • Attribution. Every link records created_by, updated_by and updated_at, and the dashboard shows them.
  • Activity log. /api/v1/audit and the Activity page show every change, with before and after snapshots. Entries survive link deletion.
  • Users page. Disabling a user ends their sessions and revokes their tokens at once. Enabling them again restores neither.
  • Optional analytics. A config without [analytics] starts with analytics off.

Security

  • On every request, Lil checks the allowlist, the issuer, and whether the user is disabled, not only at sign-in.
  • Browser writes are protected with Go's http.CrossOriginProtection. Your proxy must preserve the Host header.
  • After login, Lil redirects only to clean paths under /admin/.
  • Callback failures log a fixed reason. Lil never logs provider error bodies, codes, or tokens.

Fixed since 0.3.0

  • Sign-in with userinfo-only providers no longer fails with "email not verified" (0.3.2).
  • Redirect loop after upgrading from Basic Auth (0.3.3). Browsers keep sending cached Basic credentials to a site that once asked for them. Lil treated that header as an API token attempt, so the valid session was ignored. Only Bearer headers now select token authentication.
  • Temporary diagnostics removed (0.3.4). The claim-shape debug logging from 0.3.1 is gone. Duplicate and misleading tests were removed.

Dependencies

  • github.com/coreos/go-oidc/v3 v3.21.0
  • golang.org/x/oauth2 v0.37.0
  • github.com/alexedwards/scs/v2 v2.9.0
  • github.com/go-jose/go-jose/v4 v4.1.4 (already a go-oidc dependency; the tests use it directly)