Skip to content
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

Implement ListClients and DeleteClient in the core provider #311

Closed
hug-dev opened this issue Jan 8, 2021 · 0 comments · Fixed by #318
Closed

Implement ListClients and DeleteClient in the core provider #311

hug-dev opened this issue Jan 8, 2021 · 0 comments · Fixed by #318
Labels
multitenancy Getting Parsec to provide isolated key stores for multiple clients based on an identity mechanism

Comments

@hug-dev
Copy link
Member

hug-dev commented Jan 8, 2021

Implemented similarly as other operations (before the provider level), but they would require admin privilege.

Provide trait method:

    fn list_clients(
        &self,
        op: list_clients::Operation,
    ) -> Result<list_clients::Result> {

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.

For ListClients to do something similar than ListKeys: have the list_clients method be implemented by all providers to use the key info manager implementation they are using to return a list of client. The Core provider would call list_clients on all of its Provide implementations (which it already has) and merge them.
ListClients should only be callable on the Core Provider, see #310 .

For DeleteClient, we can use a mix of existing methods: list_keys on the application name given as parameter and then psa_destroy_key on each one of them.

Testing

We 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 💯

@hug-dev hug-dev added the multitenancy Getting Parsec to provide isolated key stores for multiple clients based on an identity mechanism label Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multitenancy Getting Parsec to provide isolated key stores for multiple clients based on an identity mechanism
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant