Giter Club home page Giter Club logo

s3curl's People

Contributors

rtdp avatar shenghu avatar skizot722 avatar usatenko avatar zoran-rajic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

s3curl's Issues

Sleep with warning about key on command line is overkill

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.

SignatureDoesNotMatch against scality

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.

No list of buckets for Openstack cloud

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?

Connection fails from non english servers

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

s3curl - radosgw access denied

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

  • Trying IP...
  • Connected to server (IP) port 9090 (#0)

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

  • HTTP error before end of send, stop sending
    <
  • Excess found in a non pipelined read: excess = 1, size = 12, maxdownload = 12, bytecount = 0
  • Closing connection 0

Thanks
Hussein

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.