Aias00 opened a new pull request, #6386: URL: https://github.com/apache/shenyu/pull/6386
<!-- Describe your PR here; e.g. Fixes #issueNo --> ## Summary - Require WebSocket sync clients to provide `X-Shenyu-Sync-Token` during the handshake before admin accepts the connection. - Add `shenyu.sync.websocket.token` to admin and bootstrap config so bootstrap nodes send the shared sync token. - Keep `APP_AUTH.appSecret` in sync payloads for bootstrap behavior and mask the new token in `WebsocketConfig.toString()`. ## Notes - This intentionally does not remove `/websocket` from the Shiro whitelist. Bootstrap nodes are not admin UI users, so the node trust check is enforced in the JSR-356 handshake configurator instead. - Empty admin token configuration rejects WebSocket sync handshakes, so deployments must configure the same `SHENYU_SYNC_WEBSOCKET_TOKEN` value on admin and bootstrap. Make sure that: - [x] You have read the [contribution guidelines](https://shenyu.apache.org/community/contributor-guide). - [x] You submit test cases (unit or integration tests) that back your changes. - [ ] Your local test passed `./mvnw clean install -Dmaven.javadoc.skip=true`. ## Test Plan - [x] `./mvnw -pl shenyu-admin,shenyu-sync-data-center/shenyu-sync-data-websocket -am -DfailIfNoTests=false -Dskip.checkstyle=true -DskipLicense=true -Dspotless.check.skip=true -Djacoco.skip=true -Dtest=WebsocketConfiguratorTest,WebsocketSyncPropertiesTest,WebsocketConfigTest test` - [x] `./mvnw -pl shenyu-admin,shenyu-sync-data-center/shenyu-sync-data-websocket -am -DskipTests -DfailIfNoTests=false -DskipLicense=true -Dspotless.check.skip=true -Djacoco.skip=true package` - [x] `git diff --check origin/master..HEAD` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
