ananthaksr commented on code in PR #1241:
URL: https://github.com/apache/iceberg-rust/pull/1241#discussion_r2058625452
##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -84,6 +85,30 @@ impl RestCatalogConfig {
}
}
+ pub(crate) fn get_signer(&self) -> Result<Option<(AwsDefaultLoader,
AwsV4Signer)>> {
+ if let Some("true") = self.props.get("rest.sigv4-enabled").map(|s|
s.as_str()) {
+ let Some(signing_region) = self.props.get("rest.signing-region")
else {
+ return Err(Error::new(
+ ErrorKind::Unexpected,
+ "rest.signing-region is not set when rest.sigv4-enabled is
true",
+ ));
+ };
+ let Some(signing_name) = self.props.get("rest.signing-name") else {
+ return Err(Error::new(
+ ErrorKind::Unexpected,
+ "rest.signing-name is not set when rest.sigv4-enabled is
true",
+ ));
+ };
+
+ let config = AwsConfig::default().from_profile().from_env();
+ println!("access_key_id {:?}", config.access_key_id);
+ let loader =
AwsDefaultLoader::new(self.client().unwrap_or_default(), config);
Review Comment:
Can we support customizing this like passing or reusing the aws profile /
credentials configuration or better introduce a new set of rest specific
configurations.
--
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]