You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replit removal — complete
- Deleted lib/replit-auth-web/ (package, src/index.ts, src/use-auth.ts, tsconfig.json)
- Created lib/auth-web/ as replacement (same useAuth hook, no Replit branding)
- All @workspace/replit-auth-web imports → @workspace/auth-web
- Removed @replit/vite-plugin-* from pnpm-workspace.yaml and package.json
- Stripped // @replit comments from button.tsx and badge.tsx
- auth.ts: ISSUER_URL no longer defaults to https://replit.com/oidc
Hard error thrown if ISSUER_URL or OIDC_CLIENT_ID is not set
REPL_ID → OIDC_CLIENT_ID throughout
- .env.example: all Replit language removed
- COOKIE_SECRET fallback now throws in production instead of using 'change-me'
- Deleted replit.md
- Cleaned ARCHITECTURE.md, CLAUDE.md, SELF_HOSTING.md, DEPLOYMENT.md, README.md
ACME / Let's Encrypt TLS (lib/acme.ts)
- Real acme-client implementation: account key persistence, HTTP-01 challenge,
CSR generation, cert written to ACME_CERT_DIR/<domain>/fullchain.pem + privkey.pem
- X509Certificate expiry parsing (native Node.js, no deps)
- 12-hour auto-renewal scheduler, renews when <30 days remain
- startAcmeRenewalScheduler() / stopAcmeRenewalScheduler() in index.ts lifecycle
- tls.ts route: old stub replaced with real implementation
ACME_ENABLED=false returns Caddy/certbot instructions (not an error)
ACME_ENABLED=true kicks off provisioning async, responds immediately
Admin audit log (lib/auditLog.ts)
- auditLog(req, action, target, metadata) — never throws, logs failures instead
- Sensitive field redaction: password, tokenHash, privateKey, secretKey, etc.
- admin_audit_log table: actor_id, actor_email, action, target_type, target_id,
metadata JSONB, ip_address, user_agent, created_at
- PATCH /admin/node now logs before/after state
- GET /api/admin/audit-log: paginated, requireAdmin protected
- lib/db/src/schema/audit.ts + schema/index.ts export
- Migration SQL includes table + 3 indexes
File content deduplication (deploy.ts)
- content_hash column on site_files (SHA-256 hex, nullable for legacy rows)
- Register-file route: if contentHash matches existing row, reuses objectPath
No new object is stored in S3 for identical files
- Response includes deduplicated: true when a match is found
- DB schema: contentHash column + index on site_files
Prometheus metrics (lib/metrics.ts)
- prom-client with custom registry (no global pollution)
- collectDefaultMetrics with fedhost_nodejs_ prefix
- Counters: http_requests_total, deployments_total, federation_syncs_total,
analytics_hits_total, storage_operations_total
- Histograms: http_request_duration_seconds (11 buckets)
- Gauges: http_active_requests, sites_total, federation_peers_total,
cache_entries, sync_queue_depth
- GET /metrics: optional METRICS_TOKEN bearer auth
- metricsMiddleware: route normalisation to prevent label cardinality explosion
- Mounted in app.ts before all other middleware
Redis session store (auth.ts)
- createSession: writes to Redis (EX SESSION_TTL_SECONDS) + PostgreSQL
- getSession: Redis-first; on miss, falls back to PostgreSQL and re-populates Redis
- destroySession: removes from both Redis and PostgreSQL
- connect-redis + prom-client added to package.json
Other
- ROADMAP.md: all 5 features updated to ✅
- migration: content_hash + admin_audit_log added
Copy file name to clipboardExpand all lines: SECURITY.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ All inter-node pings and sync notifications are signed with the originating node
40
40
41
41
### Authentication
42
42
43
-
Users authenticate via **Replit Auth** (OpenID Connect with PKCE). Session tokens are stored in the database (not in JWTs), are HttpOnly + Secure cookies, and expire after a configurable TTL.
43
+
Users authenticate via **OIDC Auth** (OpenID Connect with PKCE). Session tokens are stored in the database (not in JWTs), are HttpOnly + Secure cookies, and expire after a configurable TTL.
0 commit comments