rtdp / s3curl Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
The usage text that outputs does not list the --delete option which is used to delete objects, folders, and buckets.
Code needs to be updated to add the endpoint s3-us-west-2.amazonaws.com
Secure usage is an important thing, but enforcing a 5 second sleep timer AND printing a warning to STDOUT is a bit much. It is okay to print the warning out to STDOUT because a user has to make a conscious effort to redirect it if he/she wishes to not see it. Having a 5 second sleep that cannot be bypassed is problematic in situations when someone is doing some quick and dirty scripting and it should be removed.
Another way to push people to use the .s3curl file is to offer the option to amend the file using the values provided at the command line, but such an enhancement will need to be the subject of another issue.
I was trying to verify a scality's s3server running in docker using s3curl.pl, but I'm getting SignatureDoesNotMatch. I'm running scality/s3server using Docker for Mac.
Here's what I'm doing - any ideas what's wrong?
$ docker run -d --name s3server -p 8000:8000 scality/s3server
$ cat << EOF > ~/.s3curl
%awsSecretAccessKeys = (
default => {
id => 'accessKey1',
key => 'verySecretKey1',
},
)
EOF
$ ~/bin/s3curl.pl --id default http://localhost:8000
<?xml version="1.0" encoding="UTF-8"?><Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided.</Message><Resource></Resource><RequestId>1b67d7146647abbdd604</RequestId></Error>$
Using s3curl.pl to connect to a minio server also returns SignatureDoesNotMatch.
I've determined that the problem is with s3curl.pl by using a different client (the minio client) -- it works fine against either the scality s3server or the minio server.
I'm using aws - kms encryption algorithm. It's getting error "signature v4 missing".
-H "Authorization: AWS **" is false, musu be -F
Hello, I am trying to list the existing buckets in our Openstack cloud but s3curl is reporting no content found. It will list the contents of a bucket though:
macleanal@onottar669810x:~/s3curl$ ./s3curl.pl --id personal -- -v http://<hostname>:8080/swift/v1/Test
* Hostname was NOT found in DNS cache
* Trying 10.117.231.7...
* Connected to <hostname> (<ip>) port 8080 (#0)
> GET /swift/v1/Test HTTP/1.1
> User-Agent: curl/7.35.0
> Host: <hostname>:8080
> Accept: */*
> Date: Thu, 20 Aug 2015 15:51:43 +0000
> Authorization: AWS <auth>
>
< HTTP/1.1 200 OK
< Date: Thu, 20 Aug 2015 15:51:49 GMT
* Server Apache/2.4.7 (Ubuntu) is not blacklisted
< Server: Apache/2.4.7 (Ubuntu)
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: text/plain; charset=utf-8
<
Iyad issue list
* Connection #0 to host <hostname> left intact
macleanal@onottar669810x:~/s3curl$ ./s3curl.pl --id personal -- -v http://<hostname>:8080/swift/v1/
* Hostname was NOT found in DNS cache
* Trying 10.117.231.7...
* Connected to <hostname> (<ip>) port 8080 (#0)
> GET /swift/v1/ HTTP/1.1
> User-Agent: curl/7.35.0
> Host: <hostname>:8080
> Accept: */*
> Date: Thu, 20 Aug 2015 15:51:34 +0000
> Authorization: AWS <auth>
>
< HTTP/1.1 204 No Content
< Date: Thu, 20 Aug 2015 15:51:41 GMT
* Server Apache/2.4.7 (Ubuntu) is not blacklisted
< Server: Apache/2.4.7 (Ubuntu)
< Content-Type: text/plain; charset=utf-8
<
* Connection #0 to host <hostname> left intact
Is there an authorization option that needs to be configured?
$httpDate is not formated correctly on non english systems (Mac OS X for example):
%a 3 char weekday is localized.
I have added the following lines to have the script working:
my @wd = ("0", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun");
my $wn = $wd[strftime("%u", gmtime )];
my $httpDate = POSIX::strftime(", %d %b %Y %H:%M:%S +0000", gmtime );
$httpDate = $wn . $httpDate;
Dear Sirs,
I am trying to use s3curl to access openstack using radosgw:
I can list the buckets and their contents without any problem, I have a problem when I try to put a file or create a bucket, I get access denied.
We are convinced that its not related to radosgw permissions, since we can put file using cyberduck or s3cmd using the same credential.
listing files is fine:
user@server:~/s3curl-master# ./s3curl.pl --id=prod -- http://server:9090/swift/v1/Test1
Cyberduck-6.0.0.24625.zip
e1000e-3.3.5.3.tar.gz
putting or creating file or bucket I get this error:
./s3curl.pl --id=prod1 --createBucket -- http://server:9090/swift/v1/ONE
AccessDenied
with debug enabled:
./s3curl.pl --debug --id=prod1 --createBucket -- http://server:9090/swift/v1/ONE
s3curl: Found the url: host=server; port=9090; uri=/swift/v1/ONE; query=;
s3curl: cname endpoint signing case
s3curl: StringToSign='PUT\n\n\nWed, 17 May 2017 14:52:54 +0000\n/server/swift/v1/ONE'
s3curl: exec curl -v -H 'Date: Wed, 17 May 2017 14:52:54 +0000' -H 'Authorization: AWS fred:swift:KEY=' -L -H 'content-type: ' --data-binary -X PUT http://server:9090/swift/v1/ONE
PUT /swift/v1/ONE HTTP/1.1
Host: server:9090
User-Agent: curl/7.47.0
Accept: /
Date: Wed, 17 May 2017 14:52:54 +0000
Authorization: AWS fred:swift:KEY=
Content-Length: 0
< HTTP/1.1 401 Unauthorized
< X-Trans-Id: tx000000000000000000025-00591c63c6-62dcde-default
< Content-Length: 12
< Accept-Ranges: bytes
< Content-Type: text/plain; charset=utf-8
< Date: Wed, 17 May 2017 14:52:54 GMT
Thanks
Hussein
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.