lasdf1234 opened a new pull request, #12983: URL: https://github.com/apache/gravitino/pull/12983
### What changes were proposed in this pull request? - Treat property keys whose names look credential-like (contain `secret`, `password`, `token`, `credential`, or `access`, case-insensitive; `_`/`-` equivalent) as sensitive even when undeclared in properties metadata - Mask those values as `******` on API read paths via `HiddenPropertyMaskUtils` - Return stored plaintext for those keys from `getSecrets` / `SecretPropertyUtils.buildSecrets` (in addition to existing secret-manager URN resolution), so clients that merge `properties()` + `getSecrets()` (Spark/Flink/IRC standalone) still receive usable credentials ### Why are the changes needed? Redaction previously depended only on declared `hidden` metadata. A mistyped credential property name bypassed masking and leaked plaintext on catalog get/list. See also https://github.com/datastrato/gravitino-enterprise/issues/1758 Fix: #12982 ### Does this PR introduce _any_ user-facing change? Yes. 1. Undeclared properties whose names match the sensitive pattern are returned as `******` instead of plaintext. 2. `getSecrets` may include additional keys: sensitive-named inline plaintext values, not only secret-manager URN resolutions. ### How was this patch tested? ```bash ./gradlew :core:test --tests 'org.apache.gravitino.secret.TestSecretPropertyUtils' \ --tests 'org.apache.gravitino.connector.TestHiddenPropertyMaskUtils' -PskipITs ``` Made with [Cursor](https://cursor.com) -- 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]
