[codex] fix(monitoring): secure dashboard auth defaults#1536
[codex] fix(monitoring): secure dashboard auth defaults#1536SH20RAJ wants to merge 1 commit intomofa-org:mainfrom
Conversation
|
This PR is intended as a GSoC 2026-aligned contribution after reviewing Relevant ideas-list areas it maps to:
The concrete scope here is to harden the monitoring dashboard defaults so unauthenticated access is no longer silently enabled. That keeps the monitoring surface safer by default while preserving an explicit local-development opt-out path. |
|
Hi! This PR secures the monitoring dashboard by requiring an explicit opt-out for unauthenticated access and restricting |
|
Hi! I've verified the changes in this PR locally using the internal test suite. All 6 authentication tests in |
|
Addressing Issue #1154. This PR significantly hardens the monitoring dashboard's security by requiring an explicit |
Summary
NoopAuthProvidermetadata from wildcard permissions to read-onlyread:metricswith_require_auth(false)when they intentionally run unauthenticatedMotivation
The monitoring dashboard currently starts unauthenticated by default, which makes REST and WebSocket endpoints publicly accessible unless contributors remember to wire a real auth provider. This hardens the default while still preserving a clear local-development escape hatch.
Changes
DashboardConfig::require_authwith secure defaulttrueRelated Issues
Closes #1154
Testing
$HOME/.cargo/bin/cargo test -p mofa-monitoringNotes
create_dashboard(port)now opts into unauthenticated mode explicitly for local/dev convenience instead of inheriting a silent insecure default.