Repository navigation
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
- Back up your SQLite database. Lil runs a schema migration on first start.
- Register an OIDC client with the redirect URI
https://<your host>/auth/oidc. - Replace
[admin]with[auth]in your config. Seeconfig.sample.tomland the Authentication section of the README. - 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.modemust beoidcordev. Lil has no unauthenticated mode and refuses to start if[auth]is incomplete.- Access is an explicit list.
auth.oidc.allowed_emailsis required and strict.allowed_domainsis 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_secretis optional, so PKCE-only public clients work. For Google, domain checks use the signedhdclaim. - Claims from userinfo. Some providers leave
email,email_verifiedandnameout 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_byandupdated_at, and the dashboard shows them. - Activity log.
/api/v1/auditand 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 theHostheader. - 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
Bearerheaders 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/v3v3.21.0golang.org/x/oauth2v0.37.0github.com/alexedwards/scs/v2v2.9.0github.com/go-jose/go-jose/v4v4.1.4 (already a go-oidc dependency; the tests use it directly)