{"action":"created","issue":{"url":"https://api.github.com/repos/docker/distribution/issues/1561","repository_url":"https://api.github.com/repos/docker/distribution","labels_url":"https://api.github.com/repos/docker/distribution/issues/1561/labels{/name}","comments_url":"https://api.github.com/repos/docker/distribution/issues/1561/comments","events_url":"https://api.github.com/repos/docker/distribution/issues/1561/events","html_url":"https://github.com/docker/distribution/issues/1561","id":143623837,"number":1561,"title":"catalog list + s3 driver","user":{"login":"dpetzel","id":943268,"avatar_url":"https://avatars.githubusercontent.com/u/943268?v=3","gravatar_id":"","url":"https://api.github.com/users/dpetzel","html_url":"https://github.com/dpetzel","followers_url":"https://api.github.com/users/dpetzel/followers","following_url":"https://api.github.com/users/dpetzel/following{/other_user}","gists_url":"https://api.github.com/users/dpetzel/gists{/gist_id}","starred_url":"https://api.github.com/users/dpetzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpetzel/subscriptions","organizations_url":"https://api.github.com/users/dpetzel/orgs","repos_url":"https://api.github.com/users/dpetzel/repos","events_url":"https://api.github.com/users/dpetzel/events{/privacy}","received_events_url":"https://api.github.com/users/dpetzel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-03-25T23:12:42Z","updated_at":"2016-03-31T23:56:27Z","closed_at":null,"body":"Sorry if this has been covered, but I've been unable to find anything. My Configuration:\r\n* S3 Driver\r\n* Token based authentication using https://github.com/cesanta/docker_auth\r\n* Version 2.1.1 (but I did test with 2.3 as well without success)\r\n\r\nNo matter what I do, when I call the catalog API I get back an empty list (`{\"repositories\":[]}`)\r\n\r\nIf I switch out the configuration to use the local filesystem, then the catalog does return a value (no other changes made).\r\n\r\nMy IAM role is granted an allow on `s3:` so I don't believe there are any permissions issues (I can pull and push without problem)\r\n\r\nI cranked up Debug logging for one request and here is the output (scrubbed)\r\n\r\n```\r\n{\r\n  \"version\": \"v2.1.1\",\r\n  \"time\": \"2016-03-25T21:18:18.804331906Z\",\r\n  \"msg\": \"authorizing request\",\r\n  \"http.request.host\": \"myregistry.host\",\r\n  \"http.request.id\": \"211f0ade-ff87-4888-a7e4-ae004dd50e23\",\r\n  \"http.request.method\": \"GET\",\r\n  \"http.request.remoteaddr\": \"1.2.3.4\",\r\n  \"http.request.uri\": \"/v2/_catalog\",\r\n  \"http.request.useragent\": \"curl/7.35.0\",\r\n  \"instance.id\": \"17319e22-5fd8-4f3f-a5e0-1574baf6af97\",\r\n  \"level\": \"debug\"\r\n}\r\n{\r\n  \"version\": \"v2.1.1\",\r\n  \"instance.id\": \"17319e22-5fd8-4f3f-a5e0-1574baf6af97\",\r\n  \"http.request.useragent\": \"curl/7.35.0\",\r\n  \"http.request.uri\": \"/v2/_catalog\",\r\n  \"http.request.remoteaddr\": \"1.2.3.4\",\r\n  \"http.request.method\": \"GET\",\r\n  \"http.request.id\": \"211f0ade-ff87-4888-a7e4-ae004dd50e23\",\r\n  \"http.request.host\": \"myregistry.host\",\r\n  \"auth.user.name\": \"myself\",\r\n  \"level\": \"debug\",\r\n  \"msg\": \"s3.List(\\\"/docker/registry/v2/repositories\\\")\",\r\n  \"time\": \"2016-03-25T21:18:18.953652594Z\",\r\n  \"trace.duration\": 148339252,\r\n  \"trace.file\": \"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go\",\r\n  \"trace.func\": \"github.com/docker/distribution/registry/storage/driver/base.(*Base).List\",\r\n  \"trace.id\": \"fdfbab84-cc3e-4647-a4d3-7801dcfa6170\",\r\n  \"trace.line\": 123\r\n}\r\n{\r\n  \"version\": \"v2.1.1\",\r\n  \"instance.id\": \"17319e22-5fd8-4f3f-a5e0-1574baf6af97\",\r\n  \"http.request.useragent\": \"curl/7.35.0\",\r\n  \"http.request.uri\": \"/v2/_catalog\",\r\n  \"http.request.remoteaddr\": \"1.2.3.4\",\r\n  \"http.request.method\": \"GET\",\r\n  \"http.request.id\": \"211f0ade-ff87-4888-a7e4-ae004dd50e23\",\r\n  \"http.request.host\": \"myregistry.host\",\r\n  \"auth.user.name\": \"myself\",\r\n  \"level\": \"debug\",\r\n  \"msg\": \"s3.Stat(\\\"/docker/registry/v2/repositories/\\\")\",\r\n  \"time\": \"2016-03-25T21:18:18.954023884Z\",\r\n  \"trace.duration\": 24667,\r\n  \"trace.file\": \"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go\",\r\n  \"trace.func\": \"github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat\",\r\n  \"trace.id\": \"fe681239-f881-4236-a34b-91f841f3c1a6\",\r\n  \"trace.line\": 111\r\n}\r\n{\r\n  \"version\": \"v2.1.1\",\r\n  \"time\": \"2016-03-25T21:18:18.954448653Z\",\r\n  \"msg\": \"response completed\",\r\n  \"level\": \"info\",\r\n  \"instance.id\": \"17319e22-5fd8-4f3f-a5e0-1574baf6af97\",\r\n  \"http.response.written\": 20,\r\n  \"http.response.status\": 200,\r\n  \"http.request.host\": \"myregistry.host\",\r\n  \"http.request.id\": \"211f0ade-ff87-4888-a7e4-ae004dd50e23\",\r\n  \"http.request.method\": \"GET\",\r\n  \"http.request.remoteaddr\": \"1.2.3.4\",\r\n  \"http.request.uri\": \"/v2/_catalog\",\r\n  \"http.request.useragent\": \"curl/7.35.0\",\r\n  \"http.response.contenttype\": \"application/json; charset=utf-8\",\r\n  \"http.response.duration\": \"152.203024ms\"\r\n}\r\n```\r\n\r\nHere is my storage config:\r\n```\r\nstorage:\r\n  s3:\r\n    region: my_region\r\n    bucket: my_bucket\r\n    encrypt: true\r\n    secure: true\r\n    v4auth: true\r\n    chunksize: 104857600\r\n    rootdirectory: /my_prefix\r\n  delete:\r\n    enabled: false\r\n  cache:\r\n    blobdescriptor: redis\r\n  redirect:\r\n    disable: true\r\n```\r\n\r\nI'm not sure if this is a bug, or if I need adjust any of my configurations. Any thoughts would be greatly appreciated."},"comment":{"url":"https://api.github.com/repos/docker/distribution/issues/comments/204179447","html_url":"https://github.com/docker/distribution/issues/1561#issuecomment-204179447","issue_url":"https://api.github.com/repos/docker/distribution/issues/1561","id":204179447,"user":{"login":"dpetzel","id":943268,"avatar_url":"https://avatars.githubusercontent.com/u/943268?v=3","gravatar_id":"","url":"https://api.github.com/users/dpetzel","html_url":"https://github.com/dpetzel","followers_url":"https://api.github.com/users/dpetzel/followers","following_url":"https://api.github.com/users/dpetzel/following{/other_user}","gists_url":"https://api.github.com/users/dpetzel/gists{/gist_id}","starred_url":"https://api.github.com/users/dpetzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpetzel/subscriptions","organizations_url":"https://api.github.com/users/dpetzel/orgs","repos_url":"https://api.github.com/users/dpetzel/repos","events_url":"https://api.github.com/users/dpetzel/events{/privacy}","received_events_url":"https://api.github.com/users/dpetzel/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T23:56:27Z","updated_at":"2016-03-31T23:56:27Z","body":"Updated to the following, but the results are still empty:\r\n```\r\n    \"Statement\": [\r\n        {\r\n            \"Resource\": \"arn:aws:s3:::*\",\r\n            \"Action\": [\r\n                \"s3:ListAllMyBuckets\"\r\n            ],\r\n            \"Effect\": \"Allow\"\r\n        },\r\n        {\r\n            \"Resource\": \"arn:aws:s3:::mine*\",\r\n            \"Action\": \"s3:*\",\r\n            \"Effect\": \"Allow\"\r\n        },\r\n        {\r\n            \"Resource\": \"arn:aws:s3:::mine*/*\",\r\n            \"Action\": \"s3:*\",\r\n            \"Effect\": \"Allow\"\r\n        }\r\n    ]\r\n```"}}