Closed tveastman closed 6 years ago
Authentication works fine when using coreapi-cli and CoreAPI version 2.2.4
, so the breaking change is somewhere between 2.2.4 and 2.3.0
Same bug on coreapi
2.3.1, I also reverted to 2.2.4 and it instantly worked. coreapi-cli
is version 1.0.6.
I degraded coreapi to 2.2.4, and coreapi-cli is 1.0.6. But I still get error of "TypeError: init() missing 1 required positional argument: 'enum'". Any idea? Thanks.
I degraded coreapi to 2.0.0, it works
coreapi-cli
is using the deprecated credentials
argument for HTTPTransport
instead of auth
. As you can see from the code here, coreapi
2.3.1 is ingesting that deprecated argument, but then doing nothing with it. This is why this library won't send auth headers anymore.
@blueyed Thanks! @tomchristie It would be awesome if you could have a look into this... atm any coreapi-generated doc will point to use the coreapi client and this is broken :package:
I can confirm this happens with:
coreapi==2.3.3 coreapi-cli==1.0.6
@blueyed @tomchristie any chance we can get this fixed?
@pau-minoves IIRC https://github.com/core-api/python-client/pull/146 should fix it?! Have you tried it?
hi @blueyed I just tried and I still have the problem. I see that pull request fixes some warnings but not actual logic. Am I right?
@pau-minoves The first two commits are fixes.
Make sure to actually use the branch/PR with coreapi-cli when testing it.
@blueyed right, I can confirm that branch works. Thanks!
Any change it gets merged into a regular coreapi release?
Waiting for the fix on the coreapi credentials add <username>:<password> --auth basic
command.
For now, downgrading coreapi worked for me:
@bradleyglen Thanks, I can confirm that. With 2.2.4
I'm getting TypeError: __init__() missing 1 required positional argument: 'enum'
, and with a higher version (2.3.x
) it just doesn't work. It adds credential, but does not authenticate. I've only tested it with coreapi credentials add 127.0.0.1 <username>:<password> --auth basic
command.
There is a pending fix already at https://github.com/core-api/python-client/pull/146 - no need to confirm this over and over again.
@tomchristie Thank you ++
The CLI doesn't seem to correctly use coreapi's authentication anymore with the latest coreapi libary.
If I use coreapi cli 1.0.6 and coreapi 2.0.0, the authentication header is being sent (Not my real creds or domain):
But if I switch to the latest coreapi 2.3.0, it doesn't get sent:
For the moment, I'm just reverting to coreapi 2.0.0 as a workaround.