-
Notifications
You must be signed in to change notification settings - Fork 382
Enable user impersonation for brokers targeting k8s #462
Comments
@pmorie you probably want @jim-minter |
Why do we need to send the service account? and what service account would we send? The service catalog's service account? I agree the broker needs to be able to authenticate the service catalog's request, but that's distinct from impersonation. |
|
Service account would be the service account associated with user identity |
why would we assume that even exists? |
it doesn't make sense to require the service catalog to have credentials for the cluster the broker is talking to. The broker is the abstraction/bridge for the catalog. That said, it does raise interesting questions for when you have multiple brokers each talking to a different cluster. When the service catalog tells a broker "it's ok to impersonate Bob", that's bob in what cluster? How did the SC validate this is Bob, and this is bob in what cluster? |
@pmorie is this related? openservicebrokerapi/servicebroker#110 |
@duglin it is! |
Doesn't it make sense for the service catalog to pass opaque credentials through from the client? |
I don't think so. I wouldn't want the service catalog passing my credentials through to random brokers I may not trust. The broker needs the following:
Now where things get fuzzy is in 2+3 since "Bob" could refer to bob on clusterA, or bob on clusterB. Having the SC gather bob's cluster credentials and pass them straight to the broker certainly "solves" that problem, but i'm pretty sure it opens up bigger problems. |
@jmrodri @eriknelson @luksa @vaikas relevant to your interests |
@pmorie It is relevant. Though right now we're working wide open. At first I was thinking what @jim-minter was thinking that the service catalog would pass the credentials down to the broker, but @bparees definitely brings up some valid points. |
+1, I was working under the assumption we'd be given some kind of a permission-scoped token to act on the behalf of the user. Credentials don't feel in the spirit of params, makes sense for context.
Can a broker potentially act on more than one cluster? If so, we'll also need the targeted cluster as part of the context, if I understand this correctly? |
impersonation requires the broker to have all the information about the requesting user:
impersonation also requires the broker to be allowed to act as the user whenever it feels like it I agree that a permission-scoped token would be better, but kubernetes does not currently mint API tokens for end-users, or have a mechanism for scoping permissions per token. |
I don't think there's any restriction on what a broker could "potentially" do (it doesn't have to act on any cluster at all, for that matter). Now as for what simplifying assumptions we want to make for now, I'd defer that to @pmorie and maybe @smarterclayton (and I'm sure there are other key folks involved in that decision, i just don't know all the stakeholders). It seems like a reasonable assumption that for brokers that provision resources in the requester's name, there is only one cluster in play, and it's the cluster that the SC has already authenticated the requester against, but you're definitely relying on the template broker to understand and respect that. (Otherwise you're back to the case where the SC auth's bob against cluster1, tells the broker "here's bob" and the broker then proceeds to impersonate bob on cluster2, which is bad) |
What if we built an intersecting authorization check instead? A client could specify, "intersect my authorization with this other user.Info's power". A broker could then be granted more limited power like "admin" in most namespaces. Given the user information, the broker could be sure he didn't do anything the user couldn't have done, but compromise of the broker wouldn't allow cluster ending access. |
it sounds plausible to me, but we still have the aforementioned problems of making sure "this user" as provided by the SC is the same as "this user" in the cluster the broker is talking to. |
Not an 0.0.2 item |
Moving to 1.0.0, since that is a GA release, and this is unlikely to happen before then. |
This is now in the 'validating-through-implementation' phase in OSB: openservicebrokerapi/servicebroker#222, so we can implement it in the catalog in an alpha way. |
I'm adding this to the 0.1.0 milestone because it's extremely important for brokers that target kubernetes. |
The kubernetes information is described as " property from the Kubenernetes Is that supposed to be UserInfo ? |
We need to enable user impersonation for brokers that target k8s. The use case for this is that brokers that provision resources into Kubernetes should be able to do so using the identity of the requesting user, so that those resources:
This means that we need to send:
in the originating identity header per openservicebrokerapi/servicebroker#222
The text was updated successfully, but these errors were encountered: