bkietz commented on code in PR #41559:
URL: https://github.com/apache/arrow/pull/41559#discussion_r1775922083
##########
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:
This has been in place since S3 URIs were supported,
https://github.com/apache/arrow/pull/6403
The URI is intended to be a fully self contained initializer for a
filesystem, so if the filesystem requires secrets for initialization then the
URI must contain them
--
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]