assignUser commented on code in PR #41559:
URL: https://github.com/apache/arrow/pull/41559#discussion_r1777830158


##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -3031,6 +3034,30 @@ Result<std::string> S3FileSystem::PathFromUri(const 
std::string& uri_string) con
                                      
internal::AuthorityHandlingBehavior::kPrepend);
 }
 
+Result<std::string> S3FileSystem::MakeUri(std::string path) const {
+  if (path.length() <= 1 || path[0] != '/') {
+    return Status::Invalid("MakeUri requires an absolute, non-root path, got 
", path);
+  }
+  ARROW_ASSIGN_OR_RAISE(auto uri, util::UriFromAbsolutePath(path));
+  if (!options().GetAccessKey().empty()) {
+    uri = "s3://" + options().GetAccessKey() + ":" + options().GetSecretKey() 
+ "@" +
+          uri.substr("file:///"s.size());

Review Comment:
   Is this still recommended practice? It seems Azure recommends not doing this 
to prevent accidental exposure of credentials in logs etc. 
https://lists.apache.org/thread/mhwr2lvtxvjcqos12k7hr4cqkdofrxxo
   
   I don't know anything about S3 auth though so :shrug:



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