dmsolr opened a new pull request, #7961:
URL: https://github.com/apache/shenyu/pull/7961

   ## What this PR does
   
   Adds an opt-in diagnostics subsystem to `shenyu-web` that lets an operator 
export a **bounded, redacted ZIP bundle** of gateway runtime state for 
troubleshooting. Collection happens on the data plane (the gateway is the only 
component that knows its own effective, in-memory config), is exposed through 
the existing `/actuator` management surface, and is disabled by default.
   
   Key safety properties:
   - **Redaction by construction**: effective plugin/selector/rule config and 
handles are emitted only as SHA-256 digests plus structural identity 
(name/role/condition count) — raw config never enters the bundle. A 
`DiagnosticRedactor` (secret-key detection, JSON/text redaction, URL 
userinfo/query stripping) is applied as a second layer.
   - **Bounded**: total and per-section byte budgets, per-section and total 
timeouts, and a max-concurrent-jobs limit with an overload fallback bundle.
   - **Isolated**: a failing or slow collector degrades to a 
`FAILED`/`SKIPPED`/`TRUNCATED` section without leaking exception messages or 
affecting other sections.
   - **Safe output**: ZIP entries are sanitized against path traversal; a 
`manifest.json` records format version, section statuses and sizes.
   
   ## Related Issue
   
   Fixes #7936
   
   Related: #7720, #7878, #7718, #7719
   
   ## Type of change
   
   - [ ] Bug fix
   - [x] New feature / enhancement
   - [ ] Refactor (no functional change)
   - [ ] Documentation
   - [ ] Chore / build
   
   ## How was this tested
   
   - [x] Unit tests added / updated (20 tests: redaction, writer, service 
budget/timeout/concurrency, a seeded-secret leak fixture, endpoint)
   - [x] `./mvnw test -pl shenyu-web` passed
   - [x] `./mvnw checkstyle:check -pl shenyu-web` passed (0 violations)
   - [x] `./mvnw apache-rat:check -pl shenyu-web` passed
   
   ## Checklist
   
   - [x] Apache 2.0 license header added to new source files
   - [x] No breaking changes to public API / config / DB schema (feature is 
opt-in, `shenyu.diagnostics.enabled` defaults to `false`)
   


-- 
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]

Reply via email to