hanicz opened a new pull request, #1541:
URL: https://github.com/apache/knox/pull/1541

   [KNOX-3613](https://issues.apache.org/jira/browse/KNOX-3613) - Restrict 
KnoxShellTable JSON import to table data
   
   ## What changes were proposed in this pull request?
   
   - `json().fromJson()` / `json().path()` import table data only (`title`, 
`headers`, `rows`).
     JSON that contains a `callHistoryList`, or that isn't a JSON object, is 
rejected with a clear error.
   - Removed the call-history replay logic from the JSON deserializer.
   - In-session replay/rollback is limited to the KnoxShellTable builder and 
filter classes.
   - Exported call histories now mask the JDBC `password()` value. The file 
export uses the same masked history as the string export.
   - Fixed the KnoxShell user guide examples (`json().path`, `connectTo`, 
`password`) and documented which JSON format can be imported.
   - Re-importing a call-history-only export (`toJSON(false)`) to rebuild a 
table by re-running its steps.
     History exports are now for inspection only. To rebuild a table, save the 
builder chain as a Groovy script.
   - Unchanged: data JSON round-trip, in-session `rollback()` / `replay()` / 
`getCallHistory()`, all builders, filters, `toCSV()` and KnoxLine.
   
   ## How was this patch tested?
   
   - New/updated unit tests in `KnoxShellTableTest` and 
`KnoxShellTableCallHistoryTest`.
     They cover rejected history imports (string, file and non-object JSON), 
replay limited to table classes, and credential masking in exports.
   - `mvn -pl gateway-shell verify`: all tests, checkstyle, PMD, spotbugs and 
forbiddenapis pass.
   - Manual end-to-end run in a packaged KnoxShell (`bin/knoxshell.sh`):
     CSV load, filter, in-session replay and rollback, and data JSON round-trip 
all work; history imports are rejected.


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