-
Notifications
You must be signed in to change notification settings - Fork 372
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
Credentials difficult for COs to expose #198
Comments
Slept on this, and realized the original proposal could block out the ability for plugins to choose which calls to accept which secrets on (the same secret may not be required in all calls and requiring it everywhere may mean having to give access to the secret in components the plugin may not want to). It may still be worth simplifying though. Proposal 2:
|
I like proposal 2 better than the original. It's unclear to me whether secrets are really needed for symmetric RPCs across the range. For example, I don't see a use case for node "unpublish secrets" or "unstage secrets". controller-oriented secrets make a little more sense to include across symmetric RPCs. can you provide interesting use cases for providing secrets to node-level teardown-oriented RPCs? |
I can't think of a good use case for So, proposal 3:
|
#200 implements proposal 3 |
@saad-ali I got a bit confused. I thought that it's CO's job to decide the mapping between the credentials in CO's API and the credentials used in the CSI calls. Why we need this change? As a CO, can I always map |
The way it is currently worded |
@saad-ali maybe just change that wording? I do like the flexibility in the current API, and leave to the CO to decide the mapping. For instance, the credentials used for |
Doing that could result in inconsistencies such that if one CO allows setting all secrets but another maps some subset, plugins will need to depend on the lowest common denominator and basically eliminate the benefit. |
@saad-ali I don't quite follow. I think the logic of dealing with credentials in those calls in a plugin should be largely the same, irrespective of how CO maps them. |
You're right, if a CO exposes the ability to set 4 secrets but internally maps those 4 secrets to 8 when passed to CSI. And another CO decides to expose all 8 secrets to the end user. It doesn't matter because as far as the CO is concerned, since it still gets the requested secret. I am fine with just changing the wording to allow for this. What are your thoughts on 1) credential to secret rename, and 2) removing credentials from node unpublish and node unstage? |
@saad-ali i don't have a strong opinion on 1). For 2), what's the motivation? if the motivation is that it is not needed, and we can add that later, then I am ok with that. |
Yes, just that. Ok, proposal 4:
|
One draw back of this approach (proposal 4 vs 3) is that if, for some reason, a plugin expects a secret with the same key but expects different values for different operations, but a CO decides to expose them as a single set of secrets, then there will be name collision. So I would have to add wording like: // CO SHALL permit passing through the required secrets. CO MAY expose
// secrets as a one or more map to its end users, therefore the keys
// for all unique secrets that a plugin expects, regardless of RPC,
// must be unique. #201 implements proposal 4. We can discuss at today's meeting which one to go with. |
@saad-ali I would vote for option 1 as it gives maximum flexibility to address any possible use cases which we cannot come up with at this moment. Even a corner case when one credential is needed to create volume but another must be used to delete it, can be addressed if option 1 is selected. |
Do you mean proposal 4? |
@saad-ali right, I was referring to point 1 of proposal 4. |
PR #168 attempted to fix issues with credentials in the CSI spec by introducing a unique credential per call:
controller_create_credentials
,controller_delete_credentials
,controller_publish_credentials
,controller_unpublish_credentials
,node_stage_credentials
,node_unstage_credentials
,node_publish_credentials
, andnode_unpublish_credentials
. Furthermore it requires thatCOs SHALL permit passing through the required credentials
.A few issues:
This implies the credentials for each of these calls could be different (even if the calls are for the same volume), and that COs must allow users to set them.Update: on rethinking this should be possible to allow plugins to control where secrets are exposed.credentials
implies identity, but it could be used to pass, for example, a decryption key (which is not really a credential).Proposal:Simplify by specifying a secret per use case instead of per operation (reducing 8 possibilities to 3):create_delete_volume_secrets
Grants ability to create and delete volume requests.Passed toCreateVolume()
andDeleteVolume()
.volume_secrets
Secrets required to access a volume, independent of any consumer.Example: an encryption key for volume.Passed toControllerPublishVolume()
,ControllerUnpublishVolume()
,NodeStageVolume()
,NodeUnstageVolume()
,NodePublishVolume()
,NodeUnpublishVolume()
.workload_secrets
Secrets required to auth a specific consumer of a volume.Example: A single NFS share that permits multiple users access via different credentials.Passed toNodePublishVolume()
,NodeUnpublishVolume()
As we add additional functionality to the spec (e.g. snapshots) we can add more use case specific secrets.Considering we want to minimize the breaking changes between 0.2 and 0.3, we should consider this for 0.2.
Update: see updated "Proposal 2" below.
The text was updated successfully, but these errors were encountered: