cloudserver icon indicating copy to clipboard operation
cloudserver copied to clipboard

Cannot configure docker registry to use Scality s3 as a backend

Open romfreiman opened this issue 9 years ago • 8 comments

Hey, Wanted to have a short POC by configuring docker-registry:2.5 to run against scality with scality as a backend.

Apparently, cannot make it work - getting AccessDenied error. Accessing same bucket with same credentials works just fine.

I ran scality using docker according to your example in the website:

docker run -d --name s3server -p 18000:8000 -v /mnt/s3:/s3/ -e S3DATAPATH=/s3/s3 -e S3METADATAPATH=/s3/meta -e SCALITY_ACCESS_KEY_ID=newAccessKey -e SCALITY_SECRET_ACCESS_KEY=newSecretKey -e LOG_LEVEL=trace scality/s3server

docker registry configuration:

version: 0.1 log: level: debug formatter: text fields: service: registry environment: staging storage: s3: accesskey: newAccessKey secretkey: newSecretKey region: us-east-1 regionendpoint: http://127.0.0.1:18000 bucket: bucketname encrypt: false secure: false v4auth: true rootdirectory: / http: addr: :5005 headers: X-Content-Type-Options: [nosniff] health: storagedriver: enabled: true interval: 10s threshold: 3

sniffing the request and response of the heartbeat:

GET http://127.0.0.1:18000/bucketname?delimiter=%2F&max-keys=1000&prefix= HTTP/1.1 Host: 127.0.0.1:18000 User-Agent: aws-sdk-go/1.1.0 (go1.6.4; linux; amd64) Authorization: AWS4-HMAC-SHA256 Credential=newAccessKey/20170723/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=a4e12db07c2aba870a672862b131a07f1fa9d3b52d6a88f5622f050f3631f077 X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 X-Amz-Date: 20170723T121637Z Accept-Encoding: gzip

12:16:37.735234 IP localhost.biimenu > localhost.62148: Flags [P.], seq 407:813, ack 1006, win 452, options [nop,nop,TS val 62913335 ecr 62913334], length 406 ................E...u.@[email protected].............. ...7...6HTTP/1.1 403 Forbidden server: S3 Server x-amz-id-2: 0341d4726a43a82665d7 x-amz-request-id: 0341d4726a43a82665d7 Content-Type: application/xml Content-Length: 174 Date: Sun, 23 Jul 2017 12:16:37 GMT Connection: keep-alive

AccessDeniedAccess Denied0341d4726a43a82665d7

Not sure what am I missing here.

Thanks, Rom

romfreiman avatar Jul 23 '17 12:07 romfreiman

@rom-stratoscale, can you please try without mapping your port to a different port -- map 8000 to 8000?

I assume you are internal so please follow up on the TS Topic S3 hipchat.

LaurenSpiegel avatar Jul 24 '17 16:07 LaurenSpiegel

@LaurenSpiegel it did not work. I managed to make it work only after moving to registry:2 (instead of 2.5). My assumption is that it's related to the aws-client (or different go version may be?)

romfreiman avatar Jul 26 '17 09:07 romfreiman

@rom-stratoscale, I'm glad you got it to work. There seem to be a couple of issues in docker relating to s3 authentication so might be one of those.

Let us know if you hit any further issues.

LaurenSpiegel avatar Jul 26 '17 16:07 LaurenSpiegel

@LaurenSpiegel: thanks, that is a cool idea, I'll look into it ASAP

On Wed, Jul 26, 2017 at 6:38 PM, Lauren Spiegel [email protected] wrote:

@rom-stratoscale https://github.com/rom-stratoscale, I'm glad you got it to work. There seem to be a couple of issues in docker relating to s3 authentication so might be one of those.

@LaureVergeron https://github.com/laurevergeron, you might want to write a blog about this use case.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/scality/S3/issues/831#issuecomment-318110883, or mute the thread https://github.com/notifications/unsubscribe-auth/ANpbLkiexbOpYbaU7Cn1l_MjbxLStFi5ks5sR2ubgaJpZM4OgcI4 .

--

http://www.zenko.io?utm_source=signatures&utm_medium=Email&utm_campaign=Zenko

LaureVergeron avatar Jul 27 '17 22:07 LaureVergeron

@LaureVergeron please mention my name inside ;) And use the correct registry.

romfreiman avatar Jul 28 '17 05:07 romfreiman

@rom-stratoscale : do you want to write the post yourself, actually? We could feature you on our website, I'd write a quick intro and that way you'd be able to sign the article? If you don't want to / don't have the time, I'll write it and mention you and this issue then :) If you want to do it, I'll let you take a look at the /docs folder in this repository, and especially the "Integrations" section, to check the expected format.

LaureVergeron avatar Jul 28 '17 17:07 LaureVergeron

@LaureVergeron can u share your email address please so I'll share with you the draft of the blog?

romfreiman avatar Jul 31 '17 18:07 romfreiman

You can send it to [email protected] and I'll receive it :) Thanks for your implication!

LaureVergeron avatar Jul 31 '17 21:07 LaureVergeron