[Task] Remove appSecret from sandbox-beforesign response header
Description
SandboxServiceImpl.requestProxyGateway() builds a signing pre-image by appending appSecret to the path/timestamp/version string, then writes the full pre-image (including the raw appSecret) into the sandbox-beforesign HTTP response header. Since the format is deterministic (path
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/SandboxServiceImpl.java Proposed Change:
Strip the appSecret suffix from the value written to sandbox-beforesign. Only include the path, timestamp, and version components for debugging purposes: java// Before: response.addHeader("sandbox-beforesign", encode(signContent)); // includes appSecret // After: String debugPreimage = "path" + path + "timestamp" + timestamp + "version" + VERSION; response.addHeader("sandbox-beforesign", UriUtils.encode(debugPreimage, StandardCharsets.UTF_8)); Acceptance Criteria:
The sandbox-beforesign response header no longer contains appSecret. The sandbox-sign header (the final HMAC digest) is unaffected. The debugging intent of the header (showing what was signed, minus the secret) is preserved.
Task List
No response
👋 Hello @yuluo-yx
A new issue has been opened by @Aias00:
- Title: [Task] Remove appSecret from sandbox-beforesign response header
- Link: https://github.com/apache/shenyu/issues/6402
Please review when you have time. Thank you! 🙏
i will try this