Commit Graph
28 Commits
Author SHA1 Message Date
LeoVasanko 7ff8869e1d CLI: positional rp-id/rp-name; init adds domains to an existing database
- 'paskia init [rp-id] [rp-name]' and 'paskia migrate [rp-id]' are now
  positional; comma separation and the --rp-id/--rp-name flags are gone.
- With an existing paskia.kantadb, init adds the rp-id as a new domain
  (seeding its OIDC provider) or updates an existing domain's rp-name.
- Origin allow-list semantics clarified: the bare '*' entry allows
  anything within the rp-id domain on any scheme and port (also the
  empty-list default and its display in the admin UI, replacing the
  synthetic '*.rp-id' row); '*.x' wildcards are https-only; exact entries
  match scheme, host and port. Legacy '*.rp-id' wildcards migrate to '*'
  to preserve their any-scheme meaning.
2026-09-07 03:07:38 +00:00
LeoVasanko 476ce996ad Simplify paskia init to rp-id/rp-name only
Only rp-id and rp-name are essential bootstrap-time configuration;
origins and auth hosts are set up afterwards via the admin interface.
Removes --origin/--auth-host from init and from devserver, and the
now-unused hostutil.validate_auth_host.
2026-09-07 02:17:22 +00:00
LeoVasanko f2e6f5784e Rename realms to domains; object-keyed origins/related config format
Finish the realm→domain terminology removal across source, tests, e2e
and docs. The stored config drops all lists: Config.domains is keyed by
rp-id, DomainConfig.origins/related are objects keyed by host (https://
omitted), values True or OriginEntry(auth_host=True). The default/primary
domain concept is gone; ordering is display-time. Tests and e2e updated
to the new API shapes (not run). Database re-migrated from the legacy
backup into the new format.
2026-09-07 02:05:12 +00:00
LeoVasanko fefd54f02a CLI: explicit 'paskia migrate' subcommand for legacy conversion
Serve never converts databases: with no paskia.kantadb it points at
'paskia init', or at 'paskia migrate' when legacy *.paskiadb candidates
exist. migrate converts a lone candidate, or the one named by --rp-id
when several exist; the rest stay in place. devserver fails fast with
the same hint. gitignore covers paskia.kantadb and *.converted-bak.
2026-09-06 22:11:17 +00:00
LeoVasanko e979dd6312 Devserver and proxy configs for multi-realm
- devserver bootstraps via one-shot 'paskia init' when no database
  exists (multi --rp-id, --rp-name/--auth-host/--origin apply to the
  default realm), then runs plain 'paskia' serve which reads all realm
  configuration from the database; legacy *.paskiadb is adopted by
  serve without init.
- Caddy origins iterate all bootstrap rp-ids.
- vite.config.js accepts a comma-separated PASKIA_AUTH_HOST list and
  proxies /.well-known/webauthn to the backend so ROR works in dev.
- caddy/auth/setup forwards /.well-known/openid-configuration and
  /.well-known/webauthn to paskia (they must not be swallowed by a
  static /.well-known/* file handler); Caddyfile.dev updated to match
  the generated dev config.
2026-09-06 14:49:27 +00:00
LeoVasanko 8c2809a879 Update fastapi-vue-setup, make use of its access logging facility. 2026-09-05 14:36:25 +00:00
LeoVasanko f74bf3ebe6 Require Python 3.14, ruff formatting for simpler typing. 2026-08-11 00:46:45 +00:00
LeoVasanko 3f51d06f13 Admin Server Options panel added for configuring rp-name, auth-host and origins. 2026-02-19 18:53:53 +00:00
LeoVasanko 39000ef831 Remove PASKIA_SITE_URL env, use PASKIA_VITE_URL instead, moving the correct site URL determination to paskia CLI directly. This resolves devserver issues where VITE URL was reported as the external site URL instead of configured auth-host or origins. Main CLI still simplified. Bump deps versions and cleanup pyproject.toml. 2026-02-18 17:21:03 +00:00
LeoVasanko ef7a6c8011 Upgrade fastapi-vue-setup 1.0.2 2026-02-11 21:33:21 +00:00
LeoVasanko 6a217978d6 Upgrade fastapi-vue-setup. 2026-02-09 16:29:24 +00:00
LeoVasanko 615066a2a2 Upgrade by fastapi-vue-setup, devserver script entirely rewritten to use its facilities. 2026-02-05 18:50:08 +00:00
LeoVasanko 632278d4ce Change CLI to use --listen rather than positional hostport argument. Fix listening on all interfaces (runs lifespan twice, which needs to be OK). Update README with various CLI changes and more. 2026-02-05 02:54:07 +00:00
LeoVasanko 5b3406025c Silence type checker about our unconventional imports. 2026-01-29 22:09:03 +00:00
LeoVasanko 5e12dcba76 Add paskia-js to Python build; update build-frontend to use fastapi-vue utils for JS_RUNTIME that also can be set via env now. Fix paskia-js compatibility issue with deno, now works with all three runtimes. 2026-01-29 21:33:09 +00:00
LeoVasanko 5ee7443801 Use fastapi-vue-setup, merging its template scripts to old Paskia entry point and devserver. Simplified CLI, no longer uses serve subcommand. Fixed the URL displayed on banner to show to actual frontend/caddy server even in devmode. 2026-01-25 03:15:50 +00:00
LeoVasanko 0bfb035f76 Docs updates. 2025-12-19 18:34:12 +00:00
LeoVasanko 4a753ca29b Vite devserver configuration that behaves correctly for auth-host, serving the profile view at site root and /admin/ instead of under /auth/. 2025-12-10 18:18:14 +00:00
LeoVasanko a8ffd629ff Fix devserver script misprocessing in some situations where auth-host was being used. Deduplicate origins on server end. 2025-12-10 17:39:09 +00:00
LeoVasanko 1bed2c39d8 Implement code word based remote authentication (#1)
Add comprehensive remote authentication system allowing users to log in from one device by authenticating from another trusted device. Features include:

- Proof of Work (PoW) protection using PBKDF2-SHA512 to prevent abuse
- Simple pairing codes (3 words) protected by dynamic PoW difficulty
- Autocomplete pairing code input with error checking
- Real-time WebSocket communication between devices

Unlike device addition links and reset links with QR codes that only allow adding an authentication method, and that work offline over the duration of several days, this mechanism is strictly online, with 5 minute time limit.
2025-12-08 23:56:48 +00:00
LeoVasanko 127e06179b More robust server startup, startup logo and info screen, renewed devmode script. 2025-12-05 19:06:42 +00:00
LeoVasanko 8609f2fe69 Refactor dev mode into a source repo script (remove dev subcommand from package). 2025-12-05 18:36:13 +00:00
LeoVasanko 4f50974222 Updated build-frontend script, now uses deno, npm, bun in this order. 2025-12-01 19:25:08 +00:00
LeoVasanko 2b371c70db Updated frontend build script 2025-09-02 05:16:48 +00:00
LeoVasanko 6840f319eb Instruct type checker 2025-08-30 07:03:14 +00:00
LeoVasanko 62cf384cfa Bootstrap code cleanup. 2025-08-07 02:39:44 +00:00
LeoVasanko 0578706bdf Initial bootstrap to add admin user 2025-08-07 00:16:37 +00:00
LeoVasanko e7192e078e Build frontend as part of Python build 2025-07-14 02:23:07 +00:00