Open Bug 1593808 Opened 6 years ago Updated 6 years ago

Python client: add functionality similar to the CLI tool’s `taskcluster signin`

Categories

(Taskcluster :: Services, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: SimonSapin, Unassigned)

References

(Depends on 1 open bug)

Details

taskcluster signin (CC https://github.com/taskcluster/taskcluster/issues/1758) allows creating a client ID for use in a local scripts.

It would be nice if the Python client library had similar functionality that could be invoked programatically. My scripts at https://github.com/servo/taskcluster-config already use that library and bootstrap it using virtualenv. This would allow users not to require another tool they need to install separately.

I’ve implemented this in https://github.com/servo/taskcluster-config/pull/3, copying from https://github.com/taskcluster/taskcluster/blob/master/clients/client-shell/cmds/signin/signin.go.

Dustin, do you feel something this would belong in tc-admin? Or (without the command-line parsing bits) in the Python client library?

Flags: needinfo?(dustin)

It might make some sense in tc-admin, as a way of avoiding the need for a second tool. Maybe it would make sense to create a very short-lived client (1 hour?) on every run of apply, in cases where credentials are not supplied?

Note that we have discussed eventually switching to PKCE for this sign-in process, and that the interface is considered "undocumented". So, I'd rather not spread client-side implementations of it too far and wide.

Flags: needinfo?(dustin)

I don’t know what PKCE means or how it affects the “click in the browser where you’re logged in with GitHub” workflow. But if the implementation is centralized in https://github.com/taskcluster/taskcluster/tree/master/clients/client-py then both tc-admin and Servo’s scripts could use it from there and you could still easily change the implementation, right?

That makes a lot of sense. So, the python client is a good place for it!

Depends on: 1596529
You need to log in before you can comment on or make changes to this bug.