{"action":"created","issue":{"url":"https://api.github.com/repos/restic/restic/issues/1907","repository_url":"https://api.github.com/repos/restic/restic","labels_url":"https://api.github.com/repos/restic/restic/issues/1907/labels{/name}","comments_url":"https://api.github.com/repos/restic/restic/issues/1907/comments","events_url":"https://api.github.com/repos/restic/restic/issues/1907/events","html_url":"https://github.com/restic/restic/issues/1907","id":345549940,"node_id":"MDU6SXNzdWUzNDU1NDk5NDA=","number":1907,"title":"b2 application key permissions","user":{"login":"rphillips","id":1963,"node_id":"MDQ6VXNlcjE5NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1963?v=4","gravatar_id":"","url":"https://api.github.com/users/rphillips","html_url":"https://github.com/rphillips","followers_url":"https://api.github.com/users/rphillips/followers","following_url":"https://api.github.com/users/rphillips/following{/other_user}","gists_url":"https://api.github.com/users/rphillips/gists{/gist_id}","starred_url":"https://api.github.com/users/rphillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rphillips/subscriptions","organizations_url":"https://api.github.com/users/rphillips/orgs","repos_url":"https://api.github.com/users/rphillips/repos","events_url":"https://api.github.com/users/rphillips/events{/privacy}","received_events_url":"https://api.github.com/users/rphillips/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-29T17:59:55Z","updated_at":"2018-07-29T19:50:25Z","closed_at":null,"author_association":"NONE","body":"Output of `restic version`\r\n--------------------------\r\n0.9.1\r\n\r\nHow did you run restic exactly?\r\n-------------------------------\r\nGenerated application key on b2 with bucket only read/write permissions. restic calls into b2 with a list_buckets which is not permitted with bucket level only permissions.\r\n\r\n`restic init`\r\n\r\nWhat backend/server/service did you use to store the repository?\r\n----------------------------------------------------------------\r\nb2, bucket level only permissions\r\n\r\n\r\nExpected behavior\r\n-----------------\r\nI would expect a b2 application key to be generated for a specific bucket. Giving the key access to 'all' buckets works as expected.\r\n\r\nActual behavior\r\n---------------\r\nrestic errors out with a 401 error with the the list_buckets call.\r\n\r\nSteps to reproduce the behavior\r\n-------------------------------\r\n\r\nDo you have any idea what may have caused this?\r\n-----------------------------------------------\r\nAPI level permissions\r\n\r\nDo you have an idea how to solve the issue?\r\n-------------------------------------------\r\nPerhaps the list_buckets call can be avoided on an init?\r\n\r\n\r\nDid restic help you or made you happy in any way?\r\n-------------------------------------------------\r\nRestic is awesome!"},"comment":{"url":"https://api.github.com/repos/restic/restic/issues/comments/408701218","html_url":"https://github.com/restic/restic/issues/1907#issuecomment-408701218","issue_url":"https://api.github.com/repos/restic/restic/issues/1907","id":408701218,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODcwMTIxOA==","user":{"login":"mholt","id":1128849,"node_id":"MDQ6VXNlcjExMjg4NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/1128849?v=4","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"created_at":"2018-07-29T19:50:25Z","updated_at":"2018-07-29T19:50:25Z","author_association":"CONTRIBUTOR","body":"It appears that the call to listBuckets is required to verify that the bucket exists: https://github.com/kurin/blazer/blob/c83da4d7069325fe34d9ed0f09883c02aedac140/b2/b2.go#L285\r\n\r\nThis is how the B2 client library works, and isn't really specific to restic. I'm not sure what the implications are of skipping the existence check, or if it's even possible to bypass it: many operations are called on the Bucket once it is obtained."}}
{"actor":{"display_login":"mholt"}}