feat: adapt Keystone for Axon 0.5.0#97
Merged
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 adapts Keystone for the Axon 0.5.0 workflow by adding recorder WebSocket client authentication, token rotation support, callback public URL handling, and recorder diagnostic metadata persistence.
Motivation
Changes
Modified Files
internal/api/handlers/device_registration.go- Adds recorder WebSocket credential handling and token rotation flow.internal/api/handlers/axon_rpc.go- Updates Axon RPC handling for the authenticated recorder/transfer workflow.internal/api/handlers/task.go- Uses callback public URL configuration when creating task callback payloads.internal/api/handlers/transfer.go- Persists transfer/recorder diagnostic metadata, including writer health and recorder version.internal/api/handlers/episode.go- Exposes recorder diagnostics in episode metadata responses.internal/config/config.go- Adds callback URL and WebSocket client auth configuration.internal/server/server.go- Registers the new callback URL endpoint and WebSocket auth wiring.docker/.env.example- Documents new runtime configuration.docker/docker-compose.dev.yml- Adds new development environment configuration.docker/docker-compose.test.yml- Adds new test environment configuration.Added Files
internal/api/handlers/ws_client_auth.go- Implements WebSocket client credential authentication helpers.internal/api/handlers/callback_urls.go- Adds callback public URL response handling.internal/storage/database/migrations/000007_ws_client_auth_tokens.up.sql- Adds WebSocket client auth token storage.internal/storage/database/migrations/000007_ws_client_auth_tokens.down.sql- Rolls back WebSocket client auth token storage.docs/designs/callback-public-base-url.zh.md- Documents callback public base URL behavior.docs/designs/episode-recorder-writer-health.md- Documents recorder writer health metadata.internal/api/handlers/episode_metadata_test.go- Covers episode metadata diagnostics.internal/api/handlers/task_callback_config_test.go- Covers task callback URL configuration.internal/api/handlers/transfer_asset_id_snapshot_test.go- Covers transfer metadata snapshot behavior.Deleted Files
Type of Change
Impact Analysis
Breaking Changes
None
Backward Compatibility
Fully backward compatible. Existing device registration, task, episode, and transfer flows continue to work while new Axon 0.5.0 metadata and credential fields are supported.
Testing
Test Environment
GOCACHE=/tmp/archebase-go-build-cacheTest Cases
Manual Testing Steps
Test Coverage
Commands run:
GOCACHE=/tmp/archebase-go-build-cache go test ./...Screenshots / Recordings
Not applicable.
Performance Impact
Documentation
Related Issues
Additional Notes
go test ./...attempt failed because the default Go build cache under/home/shark/.cache/go-buildis read-only in the local sandbox. Re-running withGOCACHE=/tmp/archebase-go-build-cachepassed.Reviewers
Notes for Reviewers
Checklist for Reviewers