-
Notifications
You must be signed in to change notification settings - Fork 236
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
Backblaze Application Keys #298
Comments
What happens when you use S3Proxy with an application key today? Reading through the docs it is not obvious if anything needs to be done to support it: |
I work for Backblaze and I wanted to chime in here and explain, how I understand, the authorize call works with B2. When using the Master Key, the Key ID and the Account ID are the same. However, when using Application Keys, the Key ID of the application key is not the same as the account ID. The account ID is what is needed to make certain calls such as bucket operations. The response of the b2_authorize_account contains the account ID. If you look at the b2_list_buckets endpoint, it takes in an account ID. This Account ID is returned in the authorize call. Looking at the source code, It seems that the account ID is being pulled from the credentials that the user entered versus the response from the authorize call. Can you please confirm if this is indeed the case? |
@nilayp - Adding Nilay for Visibility. |
Again, does anything need to be done to support applications keys beyond what already exists? You can trace through the jclouds code |
Yes. You need to pull the account ID from the response of the authorize call rather than use the account ID from what is passed in to authenticate the user. If you look at the bucketsAPI class - https://github.com/apache/jclouds/blob/master/providers/b2/src/main/java/org/jclouds/b2/features/BucketApi.java - you will see that the account ID is pulled from : @PayloadParams(keys = {"accountId"}, values = {"{jclouds.identity}"}) This should actually be pulled from the Authorization response. https://github.com/apache/jclouds/blob/master/providers/b2/src/main/java/org/jclouds/b2/domain/Authorization.java |
This makes sense. It seems that you will need a custom |
I am going to move this ticket to JClouds repo as I am not able to develop this. Hopefully someone from the community can contribute and fix this. |
+1 on this even though it's a JClouds issue |
Hi, I submitted a fix to the jclouds repository apache/jclouds#190 I tested my fix with s3proxy, and it works beautifully with application keys now! Hopefully a future release of s3proxy will be able to include this updated fix! |
Addressed by S3Proxy 2.2.0. |
Is it possible to add support for Application Keys which was added in v2 of the Backblze api?
Rather than having to use the main account's master id?
The text was updated successfully, but these errors were encountered: