-
Notifications
You must be signed in to change notification settings - Fork 20
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
Github-related roles on login #16
Comments
This is a great idea. Just to be explicit (as it kind of goes without saying) this should include repo-specific cancellation scopes. See e.g. bug 1354067 where this came up recently. |
This will be more practical after #9, but will need some further development and discussion on exactly how we do it. We have discussed creating short-term clients, rather than temporary credentials, since those clients can contain more scopes than can be fitted into an HTTP header. Even so, enumerating all of the repos to which a user has access may be a herculean task, and we need to think about security too. |
#9 turned out to not really help this along at all. We can support logins with github, but not linked logins so you can have one session with both LDAP-related and github-related scopes. |
Brian, should we leave this open for @owlishDeveloper to make a proposal from? |
Yep, but of course we will help through the whole process! |
imma read through this tonight or tomorrow morning! |
The docs for
I think this is rather overloaded, but the third bullet point seems to me to be the most valuable use of The range of values allowed for Tasks created by taskcluster-github currently all have If tasks created for repo Similarly, we could apply a similar principle to other task generation services, such as mozilla-taskcluster, or whatever we use these days for generating tasks for hg pushes. I believe at the moment we already do this with gecko repositories ( Edit: this comment has been moved to issue #143 |
Good thinking! BTW, extension to 40 chars is #139. You (@petemoore) mentioned "authority vs. identity" in irc, too -- and I think that's a good thing to think of here. A schedulerId should identify a class of tasks that some clients have authority to create or manipulate, rather than the "identity" of the thing that "scheduled" the task. It'd be nice to have a way to issue "arbitrary" schedulerIds, too. For example, maybe the NSS team want to be able to schedule and cancel NSS-related jobs, not all of which come from the same github repo. So we should have some role-based way of creating and granting to them scopes for schedulerId I think we'll need to find some options for handling github repo names that are too long. It might be something ugly -- perhaps if |
We (@owlishDeveloper, @imbstack, and me) had a lot of discussions about this in the process of building a GSoC project which did not end up happening. Notes are in this googly doc but to summarize: LoginsGitHub hosts both "OAuth Apps" and "Github Apps", and either can support user login. We already have a GitHub app. However, that app has lots of permissions and is too powerful when used for logins -- for example, a user logging in via that GitHub App allows the app to make comments on issues as that user. So, we should use a distinct OAuth App to support logins. That has a better UI for allowing access to different orgs, too. The login process is a normal OAuth2 process, and ends with an access token which can be used to make some API calls on behalf of the user. In particular, it allows "get all my teams" and "get all my org memberships". From those, we can make a Taskcluster client with roles for each team and for each org of which the user is an admin. CancellationWe didn't reach any conclusions on this Third-Party LoginsWe have a few options
|
When users login with a github(-associated) account, they should get scopes accorded to the repos to which they have access.
The text was updated successfully, but these errors were encountered: