lasdf1234 opened a new issue, #15056:
URL: https://github.com/apache/gravitino/issues/15056

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   On entity **create** with secrets:
   
   1. `secretBindings` with empty `plaintext` (`""`) is accepted and written 
through the secret provider. Alter `setProperty` already rejects blank values, 
but create/alter `secretBindings` do not.
   2. `secretReferences` that cannot be resolved (for example a missing path in 
an external reference provider) are not checked before the catalog create-time 
backend probe. Catalog create resolves secrets via a lenient path 
(`toPlaintextOrMasked`), so a missing secret becomes the masked placeholder and 
the failure often surfaces later as `ConnectionFailedException` during JDBC (or 
similar) connectivity validation, instead of a clear secret-resolution 
`IllegalArgumentException`.
   
   Happy-path binding / reference create still works. Alter with unreadable 
secrets already fails more clearly via strict `toPlaintextProperties` in 
several paths.
   
   ### Error message and/or stacktrace
   
   Missing / unreadable secret reference on create (JDBC-style catalog):
   
   ```text
   ConnectionFailedException
   Failed to connect to JDBC catalog ...: password authentication failed
   ```
   
   Empty plaintext binding is accepted into the provider write path; for 
catalogs that probe connectivity, the failure may also appear only as a later 
connection error. For entities that do not probe, create can succeed with an 
empty stored secret.
   
   ### How to reproduce
   
   1. Enable an in-memory (or other) secret provider that supports 
write-through and/or external references.
   2. Create a relational JDBC catalog with `secretBindings` where `plaintext` 
is `""` → observe acceptance / late failure instead of early validation.
   3. Create a catalog with `secretReferences` pointing at a path the provider 
cannot resolve → observe `ConnectionFailedException` (or masked credentials) 
instead of a clear secret-resolution error.
   4. Contrast: alter paths that use strict secret resolution already return 
`IllegalArgumentException` for unreadable secrets.
   
   ### Additional context
   
   - Masked placeholder `******` and blank `provider` are already rejected.
   - Related: create should fail fast with clear secret-provider / validation 
errors, consistent with alter where possible.


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