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

fixes bug #1519 #190

Merged
merged 3 commits into from
Feb 19, 2024
Merged

fixes bug #1519 #190

merged 3 commits into from
Feb 19, 2024

Conversation

davidsenk
Copy link
Contributor

Fixes the authorization error with b2 application keys.

Tested with s3proxy and curl

https://issues.apache.org/jira/projects/JCLOUDS/issues/JCLOUDS-1519

gaul/s3proxy#298

@gaul
Copy link
Member

gaul commented Feb 18, 2024

@davidsenk Please investigate CI failures.

@gaul
Copy link
Member

gaul commented Feb 19, 2024

Looks like some kind of over-strict ordering:

expected:<{"[accountId":"ACCOUNT_ID","bucketName":"any_name_you_pick","bucketType":"allPrivate]"}>
but was:<{"[bucketName":"any_name_you_pick","bucketType":"allPrivate","accountId":"YOUR_ACCOUNT_ID]"}>

@davidsenk
Copy link
Contributor Author

davidsenk commented Feb 19, 2024

@gaul resolved, https://github.com/davidsenk/jclouds/actions/runs/7953299249

there were a few bad assumptions in the test requests. YOUR_ACCOUNT_ID is returned in authorize_account_response.json, which is then not used in a few of the *_request.json payloads.

Additionally, the mockwebserver does not get the content-type headers set throughout the test. The "easiest" solution is to fix it so that the mock assert is only looking for application/unknown (default in mockhttpserver).

https://square.github.io/okhttp/3.x/mockwebserver/okhttp3/mockwebserver/MockResponse.html

https://github.com/square/okhttp/tree/master/mockwebserver

@gaul gaul merged commit 41d842d into apache:master Feb 19, 2024
1 check passed
@gaul
Copy link
Member

gaul commented Feb 19, 2024

Thank you for your contribution @davidsenk!

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.

2 participants