DerGut opened a new pull request, #2971:
URL: https://github.com/apache/iceberg-rust/pull/2971

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   This is derived from a thread in 
https://github.com/apache/iceberg-rust/pull/2836#discussion_r3684663264 and 
from @plusplusjiajia's original implementation on 
https://github.com/apache/iceberg-rust/pull/2838. There's three issues I see 
with the freshly introduced `iceberg::catalog::session::Credential` type:
   1. the naming of `Credential` already exists in the context of credential 
vending (see 
[`iceberg_catalog_rest::StorageCredential`](https://github.com/apache/iceberg-rust/blob/f28ae7dca60904a5f135f3b6eecb03b09032b581/crates/catalog/rest/src/types.rs#L240)
 - but in Java it's plain 
[`Credential`](https://github.com/apache/iceberg/blob/c9afdc64f41e42d4601fb3aa02ebe8cd785f453a/core/src/main/java/org/apache/iceberg/rest/credentials/Credential.java#L26)).
 A new `Credential` concept meaning "any sensitive string" conflicts with it
   2. use cases exist for a sensitive string type outside of catalog 
credentials, like FileIO properties (e.g. `s3.session-token`): 
`iceberg::catalog` is the wrong place to share it
   3. The existing (and analogous) 
[`iceberg::encryption::SensitiveBytes`](https://github.com/apache/iceberg-rust/blob/f28ae7dca60904a5f135f3b6eecb03b09032b581/crates/iceberg/src/encryption/crypto.rs#L46)
 type is located somewhere completely different, making it non-obvious that 
both exists and share semantics
   
   ## What changes are included in this PR?
   
   This PR moves the recently introduced (and unreleased) `Credential` type to 
a separate `iceberg::sensitive` module and colocates it with the existing 
`iceberg::encryption::SensitiveBytes`. 
   
   ## Are these changes tested?
   
   I added two new tests to assert the redaction behavior of the 
`SensitiveBytes` type and a third test to assert that imports of 
`SensitiveBytes` by its old location remain backwards-compatible.
   
   ## AI Disclosure
   
   I used AI to rubber-duck approaches and rebase my PR onto latest main.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to