-
Notifications
You must be signed in to change notification settings - Fork 71
Investigate adding ListClients and DeleteClient operations #293
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
Comments
Some questions:
|
My answers to your questions
One more questionIf we have at some point in the future the possibility of multiple authenticators being supported in parallel (see #271), we might not be able to select a client in the The design indicates:
"according to the endpoint's currently-configured auth/identity mechanism" works nicely if only one authentication method is currently used at the endpoint. If multiple are used, we can precise the design by saying that |
Would this rely on the further partitioning that we'll do within the providers? This sounds like a neat idea, it would allow different admins to manage different authentication mechanisms or endpoints (actually yeah, we have to think about service endpoints too 😬 ) |
I think that it would. If we support only one authentication method per endpoint and multiple endpoint then that's not needed. Maybe it does not harm anyway to check that the auth type in the |
About atomicity, since our key info managers are accessed in parallel, they must be guarded by locking mechanisms and hence are protected against data races. I believe that |
I'm not so sure, unless you design it like that - I was thinking the core provider would just issue a series of |
Design proposal of operationsThey would both be core operations, adressed to provider ID ListClientsLists all clients currently having keys in the service. Opcode: 27 ( ParametersNo parameters are needed for this operation. Results
Specific response status codesNo specific response status codes returned. DescriptionThis operation lists all clients that are currently storing keys in the Parsec service. The This operation necessitates admin privilege. Only the clients using the same authentication method as this request will be listed. It has no impact currently as only one authentication method in the service is supported but might do if the service supports multiple. ContractNo contract yet. DeleteClientDelete all keys a client has in the service. Opcode: 28 ( Parameters
ResultsNo values are returned by this operation. Specific response status codesNo specific response status codes returned. DescriptionThis operation deletes all keys a client owns in all Parsec providers. The This operation necessitates admin privilege. Only the clients using the same authentication method as this request will be deleted. It has no impact currently as only one authentication method in the service is supported but might do if the service supports multiple. ContractNo contract yet. Design proposal of implementationThey would need an implementation in the interface as well, which would be straightforward as other operations. We can let the filtering per provider to a future operation if that's needed, to keep those one simple. In the serviceImplemented similarly as other operations (before the provider level), but they would require admin privilege.
In the future this would also contain as parameter the authentication type to only return clients of that type. The operation would be implemented in the core provider. The core For In the Rust clientAdmin operations can only be executed by the admins. But clients can not know if they are admin or not 😔 I guess that would be a reason why adding a new response status is needed so that clients can return the appropriate error and the user can know if either their auth token is wrong or if they are not admin? The rest of the implementation is straightforward. TestingWe can test this in the all-providers multitenancy tests. Making sure that the admin can see all clients and that he can delete all keys of the other one 💯 DocumentationWe need to add in the book the new operations. As far as I know, no more threat model updates are needed than the ones already done in the admin feature PR. QuestionThis relies on the fact that "only clients created with the same auth method as the request will be listed/destroyed". Is this good? Should we already think about the multiple authenticators scenario and make the |
I don't think you can do that. For TPM it works out because we store the keys themselves in the KIM, but for Mbed Crypto and PKCS11 it means the keys would never be deleted. |
Ah yes you are totally right, forgot about that 🤕 In that case I can propose the following: For For This will break the atomicity of these operations but they will still be safe. |
I'd rather leave that question to @paulhowardarm 😁 I'm not sure about how to implement |
Ah check this
Seems like I forgot to add that check somewhere! We should probably add it with a test. |
Summary
There is a use case for Parsec to be able to eliminate and forget all keys/resources associated with a particular client application identity. This can be achieved by introducing new admin-level operations to enumerate and delete clients. This issue is a request to break down the work into individual issues in all required repos.
Requirements
ListClients
Parsec opcode will be introduced. This opcode will be an admin-level operation, and must fail with an appropriate permission denied error if any call is attempted from a non-admin client, subject to the design for admin-level operations. This opcode will take no inputs. It will return as its output an unordered set of strings that are application identities according to the endpoint's currently-configured auth/identity mechanism. Each identity returned should be one for which at least one key (or other object/resource) has been stored within the Parsec service,DeleteClient
Parsec opcode will be introduced. This opcode will be an admin-level operation, and must fail with an appropriate permission denied error if any call is attempted from a non-admin client, subject to the design for admin-level operations. This opcode will take a single string as its input. The string must be an application identity according to the endpoint's currently-configured auth/identity mechanism. The string should be a string that was previously returned by a call toListClients
, since the intention is that callers would callListClients
first to determine the set of clients for which keys exist, and would then callDeleteClient
one or more times to delete the resources of some subset of those clients. The Parsec service must be robust against the possibility that the string is either invalid or corresponds to a client identity for which no keys or other resources currently exist. It should return a suitable status code and take no other action for such cases.DeleteClient
operation should be absolute in terms of all keys or other resources that might be stored within Parsec. When Parsec is expanded to include things such as secure blob storage, thenDeleteClient
would apply to these as well, not just keys that were provisioned through PSA Crypto operations.DeleteClient
is called at times when the system is appropriately quiesced.ListClients
andDeleteClient
operations must be accessible at least through the Rust client library and theparsec-tool
. Access via other client libraries is optional, and can be supported later on an as-needed basis.Definition of Done
There should be an open PR into
parsec-book
indicating theListClients
andDeleteClient
opcodes and their contracts. There should also be GitHub issues for the individual work items needed to implement and plumb these through all of the layers, including e2e tests andparsec-tool
integration.The text was updated successfully, but these errors were encountered: