tustvold commented on code in PR #4974:
URL: https://github.com/apache/arrow-rs/pull/4974#discussion_r1368495092
##########
object_store/src/azure/credential.rs:
##########
@@ -93,13 +96,25 @@ impl From<Error> for crate::Error {
}
}
+/// A shared Azure Storage Account Key
+#[derive(Debug, Eq, PartialEq)]
+pub struct AzureAccessKey(Vec<u8>);
+
+impl AzureAccessKey {
+ /// Create a new [`AzureAccessKey`], checking it for validity
+ pub fn try_new(key: &str) -> Result<Self> {
+ let key = BASE64_STANDARD.decode(key).context(InvalidAccessKeySnafu)?;
+ Ok(Self(key))
+ }
+}
+
/// An Azure storage credential
#[derive(Debug, Eq, PartialEq)]
pub enum AzureCredential {
/// A shared access key
///
///
<https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key>
- AccessKey(String),
+ AccessKey(AzureAccessKey),
Review Comment:
This is an API change
--
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]