Open tmoinel opened 4 years ago
After debugging it, I see that the server respond with a json error message with the reason but is discarded by the client.
What error did the client return?
A PR to improve the error message would be appreciated!
Constructing a new error with
https://github.com/ncw/swift/blob/017f012e58fa8f056707eb85ce9f794ba9beec6c/swift.go#L291
would probably be the right thing to do.
I can't find if the user domain is mandatory in the protocol but if it is we should be set to default if it is not provided, like in the project scope
I think if you are using v3 auth you are expected to provide a domain. Its a while since I looked at this so my memory is hazy!
When migrating from OVH Keystone API v2.0 to v3 the
Authenticate
method returnBad Request
which isn't very explicit. After debugging it, I see that the server respond with a json error message with the reason but is discarded by the client. We should maybe extend the error type to add the return messages and/or add an error field inv3AuthResponse
. I can try to do a PR to add it if it make sens for the project but I have not a good knowledge of this code base.Reading https://docs.openstack.org/keystone/pike/contributor/http-api.html and the server response :
I resolve my issue by setting
swift.Connection.Domain
todefault
.I can't find if the user domain is mandatory in the protocol but if it is we should be set to
default
if it is not provided, like in the project scope https://github.com/ncw/swift/blob/017f012e58fa8f056707eb85ce9f794ba9beec6c/auth_v3.go#L225-L227 adding an else seems sufficient https://github.com/ncw/swift/blob/017f012e58fa8f056707eb85ce9f794ba9beec6c/auth_v3.go#L197-L201I can make a PR too.