Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Authentication behaviour is not trivial from docs/broken? #235

Open
RaananHadar opened this issue Mar 8, 2021 · 1 comment
Open

Authentication behaviour is not trivial from docs/broken? #235

RaananHadar opened this issue Mar 8, 2021 · 1 comment

Comments

@RaananHadar
Copy link

Assumming I get an otp via pachctl, I run the following in python:

client.authenticate_one_time_password('<valid otp>')

this returns a string. It is unclear where and how this string is used from the docs. The obvious behavior for the user would now be to run something like client.list_repo() thinking that they authenticated successfully. However it which will fail with:

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNKNOWN
	details = "error getting access level for "test": no authentication token (try logging in)"
	debug_error_string = "{"created":"@1615240761.537080145","description":"Error received from peer ipv6:[::1]:30650","file":"src/core/lib/surface/call.cc","file_line":1067,"grpc_message":"error getting access level for "test": no authentication token (try logging in)","grpc_status":2}"

I've managed to successfully login by doing:
client.auth_token = client.authenticate_one_time_password('<valid otp>')

This is not trivial from the docs, and i'm not sure that its the proper pythonic way to implement this...

@echohack
Copy link
Contributor

echohack commented Mar 8, 2021

Thanks for this feedback @RaananHadar This is something we'll consider when updating the python-pachyderm client in the future. Auth is going through some upcoming changes with Pachyderm 2.0, so we'll probably address this after 2.0 lands.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants