feat(production): add big screen dashboard API#79
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Please ensure your PR meets the following requirements:
Summary
This PR adds the Keystone backend support for the Synapse production big-screen dashboard, including the overview aggregate API, dashboard display-token access, MCAP preview presign support, and supporting tests and design documentation.
Motivation
Changes
Modified Files
KEYSTONE_DASHBOARD_DISPLAY_TOKENenvironment variable.KEYSTONE_DASHBOARD_DISPLAY_TOKEN.DashboardAuth, display-token detection, constant-time token comparison, and display-role claims.DashboardAuth.Added Files
DashboardAuthdisplay-token acceptance.Deleted Files
Type of Change
Impact Analysis
Breaking Changes
None.
Backward Compatibility
Fully backward compatible. Existing JWT-based admin and data-collector dashboard access remains supported, and display-token access is additive and optional.
Testing
Test Environment
keystone-worktree2go1.24.13Test Cases
Commands Run
gofmt -l internal/api/handlers/episode.go internal/api/handlers/production_dashboard.go internal/api/handlers/production_dashboard_test.go internal/config/config.go internal/config/config_test.go internal/middleware/jwt_auth.go internal/middleware/jwt_auth_test.go internal/server/server.gogo test ./internal/middleware -vgo test ./internal/config -vgo test ./internal/api/handlers -run 'Test(ParseProductionDashboard|Dashboard|ProductionDashboard)' -vgo test ./internal/api/handlers -run TestResolveProductionDashboardScopeAllowsDisplayRole -vgo test -cover -race -v ./...Manual Testing Steps
Test Coverage
Known Local Test Limitation
go test -cover -race -v ./...was attempted locally but failed during setup/build in the current environment with:The targeted tests covering this PR's new dashboard, config, and middleware behavior passed.
Screenshots / Recordings
Not applicable for this backend change.
Performance Impact
Documentation
Related Issues
Additional Notes
KEYSTONE_DASHBOARD_DISPLAY_TOKENis optional. Leaving it empty disables display-token access.Reviewers
N/A
Notes for Reviewers
kind=mcapfor display-token callers.Checklist for Reviewers