lasdf1234 opened a new pull request, #15057:
URL: https://github.com/apache/gravitino/pull/15057

   ### What changes were proposed in this pull request?
   
   - Reject blank `secretBindings` plaintext in `SecretBinding` (and alter 
`setSecretBinding` validation).
   - On catalog / schema / fileset create, call `toPlaintextProperties` after 
staging secrets and before the backend probe, so unreadable `secretReferences` 
fail with `IllegalArgumentException` instead of a later connection failure.
   
   ### Why are the changes needed?
   
   Fixes #15056
   
   Empty binding plaintext was accepted into the write-through path. Missing 
external references were masked during create-time catalog init, so JDBC-like 
catalogs often failed with `ConnectionFailedException` instead of a clear 
secret-resolution error.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Create/alter with empty `secretBindings.plaintext` is rejected. Create 
with an unreadable `secretReferences` target fails earlier with 
`IllegalArgumentException`.
   
   ### How was this patch tested?
   
   - `./gradlew :api:test --tests org.apache.gravitino.secret.TestSecretBinding 
:core:test --tests org.apache.gravitino.secret.TestSecretManager --tests 
'org.apache.gravitino.catalog.TestCatalogManager.testCreateRejects*' --tests 
org.apache.gravitino.catalog.TestCatalogManager.testSecrets -PskipITs 
-PskipDockerTests=true`
   
   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]

Reply via email to