30 Commits
Author SHA1 Message Date
Gabriel20xx 8701874efb feat(logshipper): support dynamic OmniLogger credentials
- Add per-service OmniLogger credentials to core config and update subscriptions.
- Follow config pushes and enforce entry and request size limits.
- Requeue batches after transient send failures.
2026-11-20 21:45:45 +01:00
GabrielandClaude Haiku 5.5 74942e55f9 test(python-backend): restore test typing fixes and formatting
A later vendored sync reverted the test typing fixes from 23bd5b2 and the
line-length formatting from 50461c0, which fails the ty check in consumers
that run `ty check --error-on-warning`. Restore them:

- assert the narrowed upgraded/found values before use
- suppress the intentional _FakeDatabase argument mismatches with
  `# ty: ignore[invalid-argument-type]`
- reformat the long lines to the package's line-length of 100

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-11-10 14:38:14 +01:00
Gabriel20xx add64ff180 refactor(auth): remove obsolete project restriction APIs
- Remove legacy project restriction schema and helpers
- Install Python test extras in CI
- Update the quality report status
2026-10-20 19:32:45 +00:00
Gabriel20xx f7819904b9 docs: record auth hash alignment and validation results 2026-10-20 15:26:58 +00:00
Gabriel20xx 22887fef03 ci: expand CI checks and make consumer sync opt-in
- Add Go, npm, Python, and Java validation to CI
- Run Go tests against PostgreSQL
- Record performance fixes in the report
2026-10-19 21:14:31 +00:00
Gabriel20xxandClaude Haiku 5.5 199a5efaef Fix high audit findings and port the hidden-media rule
Fixed findings from the audit reports (SECURITY, QUALITY, PERFORMANCE):
- P-001 · Unbounded per-session timing maps and no connection cap in the sync hub
- S-001 · Anonymous `PUT /access` switches off login for every guarded route
- S-002 · Malformed cookies crash the Node middleware and fail requests in Java
- S-004 · Anonymous `PUT /sync` writes unvalidated JSON into shared session state

Also includes the pre-existing uncommitted changes in web-ui, README, shared-styles and the .changeset files, as the owner asked.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-19 07:47:10 +00:00
Gabriel20xx 64607f7e7a Fix ty suppression for auth router 2026-09-28 22:28:53 +02:00
Gabriel20xx b85601ae32 fix: standardize startup database retries 2026-09-23 04:56:32 +02:00
Gabriel20xx 8bbaf3c70b Format Python backend sources 2026-09-18 13:11:49 +02:00
Gabriel20xx 51eef30971 feat: honor project login requirement in shared auth 2026-09-17 00:14:56 +02:00
Gabriel20xx ddcf2fd78d Show missing SECRET in auth status 2026-09-15 23:26:02 +02:00
Gabriel20xx 0e450d53de feat: migrate project secrets and user-scoped colors 2026-09-15 13:23:17 +02:00
Gabriel20xxandClaude Sonnet 5 dcfdb3d7af Make AuthGuard integration decouple from knowing the URL at startup
Every language's AuthGuard client/service used "no URL at construction"
to mean "auth disabled forever" - a live SetBaseUrl/setBaseUrl push from
ProjectConfigurator could only ever retarget an *already-enabled* client,
never turn one on for the first time. That made AUTHGUARD_URL a de-facto
required env var everywhere, even though ProjectConfigurator can push it
live after startup.

- Go: shared/backend/auth's New/NewWithStore now default to a "pending"
  Service (still enabled, fails closed until a URL arrives) instead of
  disabled when authGuardURL is empty; add an explicit Disabled() option
  for the genuine standalone/local-dev opt-out.
- Python/Node/Java: add setBaseUrl/set_base_url to each AuthClient so a
  client built with an empty base URL can be retargeted in place once a
  URL is pushed, the same as the Go client already supported.
- Python/Node: add a coreconfig module (Info/Store), the framework-agnostic
  equivalent of shared/backend/coreconfig (Go), for services in those
  languages to receive ProjectConfigurator's core-services push at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 09:35:45 +02:00
Gabriel20xxandClaude Sonnet 5 c09957189f Add shared_backend.authproxy: FastAPI AuthGuard-proxy engine
Extracted from three near-identical bespoke implementations (Heretic,
HordeWorker, InfiniteVideo), each ~800-1000 lines hand-rolling the same
status/setup/login/logout/TOTP/admin-user-CRUD proxy around AuthClient.
build_auth_router(get_client, get_store) returns a ready-to-mount
APIRouter matching shared/backend/auth (Go)'s Service response shapes.
Gated behind an optional `fastapi` extra so the rest of this
framework-agnostic package is unaffected. 18 new tests, including a
regression test for a real bug this had (request models nested inside
build_auth_router silently broke under `from __future__ import
annotations`, misrouting every JSON body as a missing query param).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 21:27:54 +02:00
Gabriel20xxandClaude Sonnet 5 f58579290d Add project-key support to Python/Node/Java AuthClient equivalents
Mirrors Go's authclient.WithProjectKey: each client now accepts a
project_key/projectKey and sends it as X-Project-Key on every request,
so AuthGuard can enforce per-user project-access restriction for
consumers written in these languages too.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 21:08:49 +02:00
Gabriel20xxandClaude Sonnet 5 72c3ba028c Fix ruff formatting in authclient test_authclient.py
Reformat the new scheme-detection test cases with `ruff format` (line
length) so `ruff format --check .` passes in consumers that lint the
whole repo, e.g. Heretic/HordeWorker's CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 22:22:21 +02:00
Gabriel20xxandClaude Sonnet 5 449bb6fd6a Auto-detect scheme for AUTHGUARD_URL instead of always assuming https
A bare host:port (e.g. a LAN AuthGuard reachable only over plain HTTP)
was always defaulting to https, so a TLS handshake against a plain-HTTP
AuthGuard failed at the transport level. Now a loopback, RFC1918/RFC4193
private, or link-local host (or a .local name) defaults to http instead;
an explicit http:// or https:// is still always honored as-is.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 21:46:53 +02:00
Gabriel20xx de9b599232 authclient: auto-detect https for a bare AUTHGUARD_URL host, extend Java client to full surface
AUTHGUARD_URL only needs to name a host/IP now - all four language
clients (Go/Node/Python/Java) assume https:// when no scheme is given,
so a bare value like 192.168.1.50:8080 works instead of failing
outright; an explicit http://scheme is still left alone for local/LAN
deployments.

Java's AuthClient was validate-only; it now mirrors the Go/Node/Python
clients' full surface (register/login/logout/me/totp*/passwordReset*/
managedUsers*/setupStatus) using Jackson for the request/response JSON
this larger surface has to build and parse, since MegaBasterd (this
package's only verified consumer) already depends on Jackson.
2026-09-02 20:49:29 +02:00
Gabriel20xxandClaude Sonnet 5 f5a20b72af Extend Go/Python/Node authclient with the full AuthGuard API surface
Previously each authclient only supported GET /api/session/validate - the
"just gate requests behind a valid session" case. A service that runs its
own login/register/admin-user-management screens proxied to AuthGuard
(GameStream's pattern, now also used by InfiniteVideo and OutdoorGames)
needs much more: register, login, logout, me, totp_enable/verify/disable,
password-reset request/confirm, and managed-user list/create/update/delete.

The Go client already had this full surface from GameStream's original
migration; Python and Node only had validate(), so both gained the same
method set as Go, mirroring its behavior and JSON wire shapes exactly
(register/login/logout return the raw Set-Cookie values to forward,
totp_required surfaces on a 401 from login, etc). Also adds a SetupStatus/
setup_status/setupStatus method (GET /api/setup-status) so a service's own
first-launch flow can tell whether AuthGuard already has an account before
showing its own account-creation form, and adds totp_enabled to the Go
client's PublicUser (AuthGuard has reported it for a while; the client
just hadn't picked it up).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02 10:37:21 +02:00
Gabriel20xxandClaude Sonnet 5 d2ad20e0f8 Fix ty type error in authclient test: HTTPError needs a Message, not None
urllib.error.HTTPError's stub declares hdrs: Message (non-optional);
passing None works at runtime but fails strict type checking. Heretic's
lint workflow runs ty over its full tree including the vendored shared/
snapshot, which is what caught this - construct an empty Message()
instead, identical runtime behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-01 11:23:21 +02:00
Gabriel20xxandClaude Sonnet 5 ac516a7dc8 Add Python authclient module (mirrors the Go/Node authclient)
Async (asyncpg-consistent with the rest of this package), stdlib-only
HTTP via urllib + asyncio.to_thread (no new dependency for one GET
call). Framework-agnostic by design: read the two real consumers
(HordeWorker's aiohttp webui, Heretic's FastAPI app) and they don't
share a framework, so token_from_request/resolve_user work over plain
headers/cookies mappings rather than shipping a framework adapter.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 23:06:07 +02:00
Gabriel20xx c94f749430 fix: reformat config.py to match its declared 100-column line length
One line was wrapped as if for an 88-column budget, violating the
100-column ruff line-length this package declares in its own
pyproject.toml - ruff format (which respects that nested config)
correctly flagged it as unformatted.
2026-08-19 13:04:17 +02:00
Gabriel20xx da1cdca3b2 Rename shared code references 2026-08-06 16:55:51 +02:00
Gabriel20xx dfae1cb572 Bump Go and Python package release to 0.1.1
Publish Go package / Publish shared Go module (push) Successful in 57s
Publish npm packages / Publish shared npm packages (push) Failing after 39s
Publish Python package / Publish shared Python package (push) Successful in 12s
2026-08-06 12:12:04 +02:00
Gabriel20xx e2e21e84f7 Publish versioned shared Go module
Publish Go package / Publish shared Go module (push) Failing after 33s
2026-08-06 09:44:54 +02:00
Gabriel20xx 90080a8425 fix: use public SharedCode clone URL
Lint / Lint (Node/Svelte) (push) Successful in 17s
Lint / Lint (Go) (push) Successful in 19s
Lint / Lint (Python) (push) Successful in 9s
Tests / Test (Python) (push) Successful in 10s
Tests / Test (Node/Svelte) (push) Successful in 13s
Tests / Test (Go) (push) Successful in 20s
2026-08-06 08:59:24 +02:00
Gabriel20xx 2093c39ed2 fix: satisfy Ruff lint checks
Lint / Lint (Node/Svelte) (push) Successful in 14s
Lint / Lint (Go) (push) Successful in 16s
Lint / Lint (Python) (push) Successful in 9s
Tests / Test (Node/Svelte) (push) Successful in 14s
Tests / Test (Go) (push) Successful in 18s
Tests / Test (Python) (push) Successful in 10s
2026-08-05 16:00:40 +02:00
Gabriel20xx da97fd4fb1 feat(auth): implement TOTP setup and management
Lint / Lint (Node/Svelte) (push) Successful in 24s
Tests / Test (Go) (push) Successful in 25s
Lint / Lint (Go) (push) Successful in 28s
Lint / Lint (Python) (push) Failing after 14s
Tests / Test (Node/Svelte) (push) Successful in 18s
Tests / Test (Python) (push) Successful in 12s
- Added TOTP support for two-factor authentication in the auth module.
- Introduced new types and interfaces for TOTP setup and token actions in the web UI.
- Created backend logic for generating and verifying TOTP secrets and tokens.
- Implemented user management features including role assignments and user CRUD operations.
- Enhanced UI components for managing users and TOTP settings.
- Added styles for optional labels and authentication reset links.
- Implemented reset code generation and validation for admin accounts.
2026-08-05 14:57:01 +02:00
Gabriel20xx fbbdab49bc Add lint and test workflows
Tests / Test (Go) (push) Successful in 1m46s
Tests / Test (Python) (push) Successful in 14s
Lint / Lint (Go) (push) Successful in 21s
Lint / Lint (Python) (push) Successful in 10s
Tests / Test (Node/Svelte) (push) Successful in 12s
Lint / Lint (Node/Svelte) (push) Successful in 40s
2026-08-04 15:23:36 +02:00
Gabriel20xx 838a97d344 Add initial shared code packages 2026-08-04 15:17:15 +02:00