-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Release: Nightly -> Main #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Feat: Auth via ticketing for Websocket
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fix: SDK functionalities addition + Auth redesign
feat: use original worker types in sdk
feat: expand drizzle types script on sdk bundle
feat: integration tests with worker
Feat: implement phase timeline management and state tracking in SDK
feat: add phase timeline change subscription and event handling
|
Claude finished @AshishKumar4's task in 2m 47s —— View job Code Quality & Security Review (Critical Path)Recommendation: APPROVE PR SummaryThis PR introduces ticket-based WebSocket authentication for the SDK, replacing direct JWT exposure in WebSocket URLs with secure, one-time-use tickets. It also improves SDK documentation, removes Node.js WebSocket shim requirements, and enhances type safety. PR Description
Addressed Issues
Security Review
Security Implementation - Well Designed:
Low Severity:
Code Quality
Positive Observations:
Testing
Architecture NotesTicket Flow: Key Design Decisions:
Breaking Changes Acknowledged
Final RecommendationAPPROVE - This PR implements a well-designed security improvement that removes JWT exposure in WebSocket URLs. The ticket-based authentication system follows security best practices:
The code quality is good, types are properly defined, and test coverage has been added. No critical or high severity issues found. Tasks
|
Summary
This PR introduces ticket-based WebSocket authentication for the SDK and improves SDK documentation, type safety, and cross-runtime compatibility.
Changes
SDK Changes
protocol.tsfor better type consistencyexpand-drizzle-types.tsscript for cleaner type exports in SDK bundleWorker Changes (Security)
worker/middleware/auth/ticketAuth.ts):tk_{random}(agent) andtkv_{userId}_{random}(vault)WsTicketManagerclassworker/api/controllers/ticket/controller.ts):/api/ws-ticketendpoint for ticket creationworker/middleware/auth/routeAuth.ts):ticketAuthoption tosetAuthLevelmiddlewareCodeGeneratorAgentandUserSecretsStorenow implement ticket storage/consumptionMotivation
Testing
sdk/test/session-ws.test.tsandsdk/test/ws-routing.test.tssdk/test/test-server.ts) simulates ticket-based auth flowbun run test:integrationTo test locally:
Breaking Changes
Related Issues