You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "scsmithr (via GitHub)" <gi...@apache.org> on 2023/10/22 00:34:42 UTC

[I] Panic when using an azure object store with an invalid access key [arrow-rs]

scsmithr opened a new issue, #4972:
URL: https://github.com/apache/arrow-rs/issues/4972

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   
   When using an azure object store configured with an invalid access key, attempting to use the store will result in a panic.
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   
   Example:
   
   ```rust
   use object_store::azure::MicrosoftAzureBuilder;
   use object_store::{path::Path, ObjectStore};
   
   #[tokio::main]
   async fn main() {
       let store = MicrosoftAzureBuilder::new()
           .with_account("my_account")
           .with_container_name("my_container")
           .with_access_key("invalid")
           .build()
           .unwrap();
   
       let path = &Path::parse("/my_path").unwrap();
       let _res = store.get(&path).await;
   }
   ```
   
   Results in a panic during the `get`:
   
   ```
   thread 'main' panicked at /Users/sean/.cargo/registry/src/index.crates.io-6f17d22bba15001f/object_store-0.7.1/src/azure/credential.rs:189:56:
   called `Result::unwrap()` on an `Err` value: InvalidPadding
   ```
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   No panic and instead an error gets returned.
   
   The easy fix is to just propagate the error up from here: https://github.com/apache/arrow-rs/blob/03d0505fc864c09e6dcd208d3cdddeecefb90345/object_store/src/azure/credential.rs#L170-L182
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->
   
   Our use case is we configure object stores based on user provided values, and so a panic when provided with an invalid value is undesirable.


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Panic when using an azure object store with an invalid access key [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #4972:
URL: https://github.com/apache/arrow-rs/issues/4972#issuecomment-1790474032

   `label_issue.py` automatically added labels {'object-store'} from #4974


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Panic when using an azure object store with an invalid access key [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #4972:
URL: https://github.com/apache/arrow-rs/issues/4972#issuecomment-1774130447

   Agreed, we should probably check this on construction within the builder


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Panic when using an azure object store with an invalid access key [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #4972: Panic when using an azure object store with an invalid access key
URL: https://github.com/apache/arrow-rs/issues/4972


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org