Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for changes to b2_authorize_account and b2_list_buckets. #8

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

clgillis
Copy link

Due to changes to Backblazes api, you need to use the Application Key ID to authorize an account but still use the AccountID to list buckets. Also, you have to specific the name of the bucket if the authorization key restricts access to one bucket or you will get "unauthorized" returned.

This PR fixes these issues.

@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling 1ae8d9b on clgillis:master into b197f7a on FiloSottile:master.

@aviau
Copy link

aviau commented Jan 3, 2021

@FiloSottile Any chance you can take a look at this? I can confirm that this fixes the issue for me.

aviau added a commit to aviau/perkeep that referenced this pull request Jan 3, 2021
- Add documentation in storage-examples for using Perkeep with b2 as a
  storage backend. The documentation uses the new API terminology:
  AccountID is no longer a thing in the Backblaze web console.

- Temporarily replace FiloSottile/b2 by aviau/b2 where I host a copy of
  clgillis's Pull Request[1]. We can point to the original project
  again as soon as it is merged.

  Note that I haven't updated the vendor directory and it seems that
 `go mod vendor` updates way more things that are also outdated in the
  master branch, so I will leave that as an exercise to whoever has
  commit access :).

Before this Pull Request, launching the b2 storage would error with the
following error message:
```
Error parsing config: Caught panic: error instantiating storage for prefix "/sto-b2/", type "b2": Post "https://api000.backblazeb2.com/b2api/v1/b2_list_buckets": b2 remote error [bad_request]: accountId invalid
```

Now, it seems to work as expected!

1. FiloSottile/b2#8
aviau added a commit to aviau/perkeep that referenced this pull request Jan 3, 2021
- Add documentation in storage-examples for using Perkeep with b2 as a
  storage backend. The documentation uses the new API terminology:
  AccountID is no longer a thing in the Backblaze web console.

- Temporarily replace FiloSottile/b2 by aviau/b2 where I host a copy of
  clgillis's Pull Request[1]. We can point to the original project
  again as soon as it is merged.

  Note that I haven't updated the vendor directory and it seems that
 `go mod vendor` updates way more things that are also outdated in the
  master branch, so I will leave that as an exercise to whoever has
  commit access :).

Before this Pull Request, launching the b2 storage would error with the
following error message:
```
Error parsing config: Caught panic: error instantiating storage for prefix "/sto-b2/", type "b2": Post "https://api000.backblazeb2.com/b2api/v1/b2_list_buckets": b2 remote error [bad_request]: accountId invalid
```

Now, it seems to work as expected!

1. FiloSottile/b2#8
aviau added a commit to aviau/perkeep that referenced this pull request Jan 14, 2021
- Add documentation in storage-examples for using Perkeep with b2 as a
  storage backend. The documentation uses the new API terminology:
  AccountID is no longer a thing in the Backblaze web console.

- Replace FiloSottile/b2 by perkeep/b2 where we host a copy of
  clgillis's Pull Request[1]. We can point to the original project
  again as soon as it is merged.

  Note that I haven't updated the vendor directory and it seems that
 `go mod vendor` updates way more things that are also outdated in the
  master branch, so I will leave that as an exercise to whoever has
  commit access :).

Before this Pull Request, launching the b2 storage would error with the
following error message:
```
Error parsing config: Caught panic: error instantiating storage for prefix "/sto-b2/", type "b2": Post "https://api000.backblazeb2.com/b2api/v1/b2_list_buckets": b2 remote error [bad_request]: accountId invalid
```

Now, it seems to work as expected!

1. FiloSottile/b2#8
aviau added a commit to aviau/perkeep that referenced this pull request Jan 14, 2021
- Add documentation in storage-examples for using Perkeep with b2 as a
  storage backend. The documentation uses the new API terminology:
  AccountID is no longer a thing in the Backblaze web console.

- Replace FiloSottile/b2 by perkeep/b2 where we host a copy of
  clgillis's Pull Request[1]. We can point to the original project
  again as soon as it is merged.

  Note that I haven't updated the vendor directory and it seems that
 `go mod vendor` updates way more things that are also outdated in the
  master branch, so I will leave that as an exercise to whoever has
  commit access :).

Before this Pull Request, launching the b2 storage would error with the
following error message:
```
Error parsing config: Caught panic: error instantiating storage for prefix "/sto-b2/", type "b2": Post "https://api000.backblazeb2.com/b2api/v1/b2_list_buckets": b2 remote error [bad_request]: accountId invalid
```

Now, it seems to work as expected!

1. FiloSottile/b2#8
aviau added a commit to aviau/perkeep that referenced this pull request Jan 14, 2021
- Add documentation in storage-examples for using Perkeep with b2 as a
  storage backend. The documentation uses the new API terminology:
  AccountID is no longer a thing in the Backblaze web console.

- Replace FiloSottile/b2 by perkeep/b2 where we host a copy of
  clgillis's Pull Request[1]. We can point to the original project
  again as soon as it is merged.

  Note that I haven't updated the vendor directory and it seems that
 `go mod vendor` updates way more things that are also outdated in the
  master branch, so I will leave that as an exercise to whoever has
  commit access :).

Before this Pull Request, launching the b2 storage would error with the
following error message:
```
Error parsing config: Caught panic: error instantiating storage for prefix "/sto-b2/", type "b2": Post "https://api000.backblazeb2.com/b2api/v1/b2_list_buckets": b2 remote error [bad_request]: accountId invalid
```

Now, it seems to work as expected!

1. FiloSottile/b2#8
aviau added a commit to perkeep/perkeep that referenced this pull request Jan 14, 2021
- Add documentation in storage-examples for using Perkeep with b2 as a
  storage backend. The documentation uses the new API terminology:
  AccountID is no longer a thing in the Backblaze web console.

- Replace FiloSottile/b2 by perkeep/b2 where we host a copy of
  clgillis's Pull Request[1]. We can point to the original project
  again as soon as it is merged.

  Note that I haven't updated the vendor directory and it seems that
 `go mod vendor` updates way more things that are also outdated in the
  master branch, so I will leave that as an exercise to whoever has
  commit access :).

Before this Pull Request, launching the b2 storage would error with the
following error message:
```
Error parsing config: Caught panic: error instantiating storage for prefix "/sto-b2/", type "b2": Post "https://api000.backblazeb2.com/b2api/v1/b2_list_buckets": b2 remote error [bad_request]: accountId invalid
```

Now, it seems to work as expected!

1. FiloSottile/b2#8
aviau added a commit to perkeep/perkeep that referenced this pull request Jan 17, 2021
- Add documentation in storage-examples for using Perkeep with b2 as a
  storage backend. The documentation uses the new API terminology:
  AccountID is no longer a thing in the Backblaze web console.

- Replace FiloSottile/b2 by perkeep/b2 where we host a copy of
  clgillis's Pull Request[1]. We can point to the original project
  again as soon as it is merged.

  Note that I haven't updated the vendor directory and it seems that
 `go mod vendor` updates way more things that are also outdated in the
  master branch, so I will leave that as an exercise to whoever has
  commit access :).

Before this Pull Request, launching the b2 storage would error with the
following error message:
```
Error parsing config: Caught panic: error instantiating storage for prefix "/sto-b2/", type "b2": Post "https://api000.backblazeb2.com/b2api/v1/b2_list_buckets": b2 remote error [bad_request]: accountId invalid
```

Now, it seems to work as expected!

1. FiloSottile/b2#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants