Repository navigation
v0.5.0
This release is everything since v0.4.4.
Breaking
- The gateway now requires
AUDIT_URLat boot, because audit is on by default. SetAUDIT_URLto the audit service's internal base URL, e.g.http://audit:3003. If you don't want audit, setAUDIT_ENABLED=falseon the gateway. Any value other thantrueorfalserefuses boot. - Route-registry apply now rejects service names that aren't 1–128 characters of
[A-Za-z0-9._-]. The audit event'sservicefield has the same limit. - On
organizationandmemberroutes that are audited, the gateway writes the audit intent before forwarding. While audit is down, those requests return 503 and the service is not called. Writes are audited by default. - The gateway's check order changed: authenticate, rate limit, audit intent, then
required_labels. A request denied by labels (403) now counts against the rate limit. - The compose
adminrole incompose/roles.ymlgainsorg:audit:read. Update your ownROLES_FILEif you want the same.
Added
-
Audit service (
services/audit, new image). Each auditedorganizationormemberrequest is recorded as one event in the subject org's audit log. The intent is written before the request is forwarded, and the outcome is written afterwards in the background. An event stayspendinguntil its outcome arrives. A dropped or failed outcome write leaves the eventpending. -
GET /org/audit-eventsis published by the audit catalog (services/audit/routes.yml) and requires the labelorg:audit:read. -
docs/audit.mddescribes the model and its guarantees. -
Route
audit: true|falseoverrides the default, which is to audit writes. It applies toorganizationandmemberroutes only. -
The identity invite list (
GET /org/invites) setsaudit: true, because it returns live tokens. -
Services can report what changed on
X-Plat5-Audit-Details. The gateway stores it as sent and always strips it from requests and responses. It accepts one ASCII JSON object of at most 4096 bytes and ignores anything else with a warning. -
Gateway config:
AUDIT_ENABLEDAUDIT_URLINTERNAL_AUTH_TOKENis now also sent to audit.
-
New metrics:
- Gateway:
audit_writes_totalandaudit_intent_duration_seconds. - Audit service:
audit_intents_totalandaudit_outcomes_total.
- Gateway:
-
Compose files, CI, and the release workflow now include the audit service.
-
Gateway request log lines (
request completedandrequest failed) now carry the following fields, each present only when known:auth_type:jwt,user_apikey,member_apikey, ormember_sessionkey_prefixuser_id(admitted onuserroutes)organization_idandmember_id(admitted onorganizationandmemberroutes)
key_prefixis set before validation, so 401 and 403 lines carry it. It matcheskey_prefixon identity's key list, or a session'stoken_prefix. The key, token, and JWT are never logged, and the line has no labels or role (#21).
Changed
- Identity now reports changes to audit as
from/toand reports creates by id. It never reports a secret oruser_id. A newauditxhelper does this for organization, member, service-account, invite, and member-key handlers. - Organization update now reads the prior values and applies the change in one store call. Previously it read the organization first and saved it afterwards.
- Docs: wording for labels in the gateway
route_configcomments and innaming-conventions.mdnow matches the implementation (#20). - Docs: updated
routes.md,gateway-contract.md,identity.md,roles.md,self-hosting.md, andtelemetry.mdfor audit.
Fixed
- Route-registry apply now refuses routes that can't be recorded in the audit log.
- The audit service reads the org's prior state under the lock, so concurrent writes see consistent prior values.
Images
All at v0.5.0:
ghcr.io/plat5dev/gateway:v0.5.0ghcr.io/plat5dev/route-registry:v0.5.0ghcr.io/plat5dev/identity:v0.5.0ghcr.io/plat5dev/audit:v0.5.0
Compose images are pinned to v0.5.0 (PLAT5_VERSION).
Full changelog: v0.4.4...v0.5.0