Commit Graph
4 Commits
Author SHA1 Message Date
nelson-baptista 836d967aeb chore(runtime): BIT-31723 upgrade Node 20 → Node 24 LTS + audit PHP/TS code
CI / Test ingest-api (pull_request) Successful in 33s
CI / Test api (pull_request) Successful in 34s
CI / Lint and typecheck admin-ui (pull_request) Successful in 1m19s
CI / Validate Docker build (pull_request) Successful in 3m54s
- Dockerfiles (admin-ui, collector-worker, ingest-api): node:20-bookworm-slim → node:24-bookworm-slim
- CI (.gitea/workflows/ci.yml): node-version '20' → '24' in all 3 jobs
- package.json engines.node: '>=20' → '>=24.22.1' (admin-ui, api, collector-worker, ingest-api, web)
- @types/node: ^20/^22 → ^24 in all packages
- api: bcrypt ^5.1.1 → ^6.0.0 (Node 24 prebuilt binary compat)
- clients/php/ErrorReporter.php: PHP 8.4+ compat audit (no deprecated patterns)
- clients/node/errorReporter.mjs: Node 24+ doc update

All tests verified locally:
- api: 51/51 passed (vitest)
- ingest-api: 40 passed + 14 skipped (vitest)
- collector-worker: 12/12 passed (vitest)
- admin-ui: lint + typecheck clean
- web: lint + typecheck + build clean

Paperclip-Agent: Nelson Baptista (urlKey nelson-baptista; id e34f1b0f-62db-487c-8584-f6a47203f7b5)
Paperclip-Issue: BIT-31723
Paperclip-Run: 76d06689-1879-421f-ad2c-04f5fe85d21d
2026-10-23 17:30:13 +01:00
David Santos 2d93c4a3fc Align web and admin-ui on Next 15.5 + React 19.2 (BIT-2516)
CI / Test ingest-api (push) Has been cancelled
CI / Test api (push) Has been cancelled
CI / Lint and typecheck admin-ui (push) Has been cancelled
CI / Validate Docker build (push) Has been cancelled
Pin matching versions in web/ and admin-ui/, document the decision and
Node requirement in README, and ignore TypeScript build info artefacts.

Made-with: Cursor
2026-04-12 19:53:18 +00:00
David Santos 78003b001d chore(errors): incremental tech debt — rate-limit typings, legacy web on Next 15
CI / Test ingest-api (push) Has been cancelled
CI / Test api (push) Has been cancelled
CI / Lint and typecheck admin-ui (push) Has been cancelled
CI / Validate Docker build (push) Has been cancelled
- api: Align rate-limit plugin docs with actual store (in-memory unless wired in
  index); type errorResponseBuilder context; augment FastifyRequest with optional
  ingest_token_id instead of casting to any.
- web: Upgrade to Next 15 / React 19; add ESLint 9 flat config, tsconfig,
  next-env.d.ts; outputFileTracingRoot so file tracing stays within this product tree.

Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Paperclip-Issue: BIT-2479
Paperclip-Run: e3292ca4-a7b9-42f1-83ca-bc3d78906532
2026-04-12 09:23:04 +00:00
1sonhadorandPaperclip eeb5039a3c feat(BIT-183): admin auth, RBAC, audit logging, rate limiting
Implements BIT-154.7 — Auth administrativa, RBAC e quotas:

- api/src/types/auth.ts: 3 roles (superadmin/admin/viewer), 18 permissions,
  ROLE_PERMISSIONS map as single source of truth
- api/src/plugins/auth.ts: JWT via HTTP-only __Host- cookies (15min access /
  7d refresh), token rotation, timing-safe login
- api/src/plugins/rbac.ts: requirePermission() + requireRole() Fastify
  decorators for route-level enforcement
- api/src/plugins/audit.ts: auditLog() helper + Fastify plugin; writes to
  audit_logs table; failure never aborts main operation
- api/src/plugins/rate-limit.ts: per-route limits (login: 10/5min IP,
  ingest: 1000/min token, global: 500/min) + payload size enforcement
- api/src/routes/admin/auth.ts: POST login, POST refresh, POST logout,
  GET /me — with audit events on all operations
- db/migrations/001–004: admin_users, refresh_tokens, audit_logs tables +
  dev seed (bcrypt superadmin)
- web/src/app/(admin)/login: Velzon Bootstrap 5 login page (Next.js client
  component, credentials:include, HTTP-only cookie flow)
- docs/permission-matrix.md: full permission matrix + audit event catalogue
  + rate/payload limit table (BIT-183 acceptance criterion)

Co-Authored-By: Paperclip <[email protected]>
2026-03-22 04:22:57 +00:00