feat(notifications): enforce room access#23
Conversation
Test & Lint SummaryTests:
Lint:
|
noa-lucent
left a comment
There was a problem hiding this comment.
Static review only (not running builds/tests).
Key gaps to address before merge:
- Room allowlist currently rejects documented room patterns (agent:{id}, trace:{trace_id}) — either support them with proper auth, or explicitly deprecate/remove and update docs + callers.
- workload:{id} auth path likely broken: Runners GetWorkload is called with the incoming server context (incoming metadata won’t be forwarded). Create an outgoing ctx with x-identity-id.
- Missing test coverage for workload:{id} subscriptions (runners lookup + can_view_workloads). runnersStub is currently unused.
- Repo e2e smoke/doc examples still Subscribe with an empty request and publish to a non-prefixed room; update them to match the new validated room patterns.
|
Summary:
Tests:
|
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review (static only — not running builds/tests).
Progress: the previous blockers are addressed (agent/trace room support, identity metadata forwarding to downstream services, workload:{id} test coverage, and the e2e smoke harness updated to use a supported room + x-identity-id).
Remaining blocker:
- parseTraceID() uses
uuid.UUID(decoded)which won’t compile (cannot convert[]byte->[16]byte). Please fix viauuid.FromBytes(decoded)orcopy(parsedUUID[:], decoded).
|
Summary:
Tests:
|
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review (static only — not running builds/tests).
The trace ID parsing compile issue is fixed (using uuid.FromBytes). All prior threads are resolved and the Subscribe room validation/auth + room filtering behavior remains aligned with issue #22/spec.
69f2ac3 to
cb620a4
Compare
|
Summary:
Tests/Lint:
Results: passed 4, failed 0, skipped 0. Lint: no issues. CI: https://github.com/agynio/notifications/actions/runs/24946444699 (run id 24946444699) |
noa-lucent
left a comment
There was a problem hiding this comment.
Requesting changes (static review only — not running builds/tests).
Blockers:
internal/config/config.go: introduces a legacy env-var fallback (AUTHORIZATION_ADDRESSwhenAUTHORIZATION_ADDRis empty). Per rollout constraints (no compatibility / alternate paths), please pick a single env var (preferAUTHORIZATION_ADDRwith default) and remove the fallback.- Subscribe auth bypass:
Subscribecan currently skip room authorization whenx-identity-idis missing, allowing unauthenticated subscriptions to protected/unknown rooms. Please makex-identity-idmandatory forSubscribe(Unauthenticated when missing) and always enforceauthorizeSubscribe.
Non-blocking:
- PR description uses
Refs #22; consider switching toCloses #22(or explicit repo-qualified link) if this PR should auto-close the issue.
|
Summary:
Tests/Lint:
Results: passed 4, failed 0, skipped 0. Lint: no issues. CI: https://github.com/agynio/notifications/actions/runs/24946779069 (run id 24946779069) |
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review complete (static only).
- Removed legacy AUTHORIZATION_ADDRESS fallback (single env var: AUTHORIZATION_ADDR).
- Subscribe now requires x-identity-id and always enforces room authorization.
Previous threads resolved.
Summary
Testing
Refs #22