- API key auth:
Authorization: Bearer <token> - Roles:
admin,developer,readonly - Tokens are hashed (
sha256) at rest. - Tokens are project-scoped; job/crawl/artifact access is project-scoped.
- Tokens can have an optional
expiresAttimestamp. - Expired tokens are rejected during
resolveAuth()before any route handler executes. - Token expiration can be set at creation or updated via
PATCH /v1/admin/tokens/:tokenId.
- Fastify rate limit per token+IP key.
- Per-role defaults: admin (500 RPM), developer (120 RPM), readonly (60 RPM).
- Per-role limits stored in
rate_limit_configdatabase table, manageable viaGET/PUT /v1/admin/rate-limits. - Global fallback configurable via
KRYFTO_RATE_LIMIT_RPM.
- HTTP/HTTPS only.
- Private/internal IP ranges blocked by default (
KRYFTO_SSRF_BLOCK_PRIVATE_RANGES=true). - Optional host allowlist via
KRYFTO_ALLOWED_HOSTS. - URL checks executed in both API validation and worker runtime.
respectRobotsTxtdefaultstrue.- Crawl requests support allow/deny, depth/page caps, same-domain control, and politeness delay.
- Structured logs are redacted for auth and secret-like fields.
- Step input with
secret: trueis masked in persisted step logs. - Browser profile cookies are encrypted at rest (
KRYFTO_PROFILE_ENCRYPTION_KEY).
- Artifact downloads require auth or valid short-lived download token.
- Access is audit logged.
- S3 presigned URL support is available when using MinIO/S3 backend.
Audit records are written for:
- job create/cancel/state transitions
- artifact download
- recipe upload/validation
- token administration actions
- crawl create/completion/failure
- Restrict outbound egress at infrastructure level to approved targets.
- Keep MinIO/DB/Redis private to the Docker network in production.
- Rotate API tokens and encryption keys regularly.
- Run containers with read-only root filesystems where feasible and explicit writable mounts for
/tmpand artifact paths. - Apply CPU/memory limits per service in production orchestrators (Compose examples can be added under
deploy.resources). - Keep Compose
.envvalues out of source control. - Use non-default credentials for Postgres, MinIO, and API bootstrap token before first production start.