geemus/fog — Issue #583: S3: Signature Does Not Match
Author: mmarschall
Created: 2011-11-02 13:59:41+00:00
State: open

Hi,

I'm running Fog against an S3 compatible service by German provider Hosteurope. While I can successfully connect to their service using various S3 clients, it fails using Fog :-(

Here is the exception:

irb(main):001:0> storage = Fog::Storage.new({:provider => 'AWS', :aws_access_key_id => "UCNVGEXEVTP5AKFMQ93R", :aws_secret_access_key => "...", :endpoint => 'https://cs.hosteurope.de'})
=> #, @signer=#>, @aws_secret_access_key="...", @port=443, @scheme="https", @connection=#"443", :path=>"", :headers=>{}, :query=>nil, :scheme=>"https", :host=>"cs.hosteurope.de", :mock=>nil}>, @persistent=nil>, @host="cs.hosteurope.de", @path="", @endpoint="https://cs.hosteurope.de", @aws_access_key_id="UCNVGEXEVTP5AKFMQ93R">
irb(main):002:0> storage.get_bucket("helpster-cms-backup")
Excon::Errors::Forbidden: Expected(200) <=> Actual(403 Forbidden)
request => {:expects=>200, :port=>"443", :path=>"/", :headers=>{"Authorization"=>"AWS UCNVGEXEVTP5AKFMQ93R:xDF89OO+i4dWEaLivctwZM4cO4M=", "Date"=>"Wed, 26 Oct 2011 13:43:03 +0000", "Content-Length"=>0, "Host"=>"helpster-cms-backup.cs.hosteurope.de:443"}, :idempotent=>true, :method=>"GET", :query=>{}, :host=>"helpster-cms-backup.cs.hosteurope.de", :scheme=>"https", :mock=>nil}
response => #\nSignatureDoesNotMatch\n\n\n", @headers={"Content-Type"=>"application/xml", "Date"=>"Wed, 26 Oct 2011 13:43:04 GMT", "Content-Length"=>"110", "Server"=>"RestServer/1.0", "Cache-Control"=>"no-cache", "Connection"=>"close"}, @status=403>
from /Library/Ruby/Gems/1.8/gems/excon-0.6.3/lib/excon/connection.rb:179:in `request'
from /Library/Ruby/Gems/1.8/gems/fog-0.7.2/lib/fog/core/connection.rb:20:in `request'
from /Library/Ruby/Gems/1.8/gems/fog-0.7.2/lib/fog/storage/aws.rb:323:in `request'
from /Library/Ruby/Gems/1.8/gems/fog-0.7.2/lib/fog/storage/requests/aws/get_bucket.rb:55:in `get_bucket'
from (irb):2

Any ideas?