- create a well-known clientId
anonymouswith a well-known accessKey (in the sense that it's in cleartext on the client side of tools.taskcluster.net); when not using some other credential, that's the credential tools uses.
- Allow user-driven creation of new clients (limited to some suffix by a scope that's defined in assume:client-id:anonymous)
- Allow association and dissociation of credentials with individual external users (GitHub, Mozillians, LDAP, Persona)
- Most users will only create one clientId, and just leave it in localStorage
- Those who can edit roles can also create clientIds that are not associated with a user and thus not at risk of being disabled if that user leaves
Morgan has suggested the ability to link TC credentials to an arbitrary service. That is, it should be possible to use some other app than tools.taskcluster.net to associate some external userid with taskcluster credentials. If that app wants to also handle automatic revocation, then it will need to run some kind of service and revoke credentials that way.
Internally, that could be implemented with an extra layer of indirection: a Client has a set of links, each named with the link type ("github", "moz-ldap", etc.). Each Link has a set of roles (names). The Client's roles are, then, the set of all linked roles. Each link service would have scopes to view and update Links with its name.
We can incorporate a few of these link services into tools, but not preclude the others. So we can have a GitHub service that handles OAuth to create a new link, and periodically polls GitHub to determine a user's access, adjusting the linked roles apprporiately. And a "moz-ldap" service. And the Apache foundation can run an "apache-ldap" service similar to ours, having only requested from us a credential that can edit "apache-ldap" links and with the scopes we are comfortable with Apache issuing to its users.
Best of all, we can have links that never expire that we can use for infrastructure -- so infra clients don't expire if Jonas's LDAP account gets disabled.
@djmitche, My initial approach is a bit more naive... I like not having state that we need to synchronize with external sources... Granted I fear we might need to support this... Well it depends...
There is a lot of power to only giving users temporary credentials... (not saying they can't be allowed to create permanent clients either). But for the default flow I like temporaries, because we can force expire them in say 3 days, and not have people putting permanent credentials in the browser.
I don't want to reinvent user management, then we have to add things like 2FA, synchronize with external databases... etc.. It's a lot of pain and work that's been done before. Goal is for TC credentials to put APIs before users with an identify. That said I see two short comings of the current approach:
clientId: <clientId>/<id>, so we append clientId with/<id>when creating temp credentials...With respect to making fine-grains scopes, we would need the parameterized roles, I don't think we should want this, as it's better to make team based roles. I understand that a service may have a single owner, but the services should be coupled to a team that can take over when that guy moves on...
I think (1) and (2) needs to be solved at some point. (3) and (4) would be really nice to solve. Neither of them have to be solved now... Well, we can see... We'll certainly get much further with what I just filed a PR for... but yeah, it won't solve all problems.
Note: I would prefer it if TC creds were focused on protecting scoped resources, and not authenticating people. Hence, making it suitable for APIs as oppose to users... But IMO the goal is to optimize for automation :)