Qiskit / qiskit-serverless

A programming model for leveraging quantum and classical resources
https://qiskit.github.io/qiskit-serverless/
Apache License 2.0
67 stars 27 forks source link

Admin panel #1464

Closed Tansito closed 1 month ago

Tansito commented 1 month ago

Summary

This PR introduces a BackOffice for the project to help us with the management of the different resources running in the cluster.

Tansito commented 1 month ago

Btw, the good news is that as soon as this is merged we will be able to remove the tasks that we created to fill data 🎉

akihikokuroda commented 1 month ago

I'm not familiar this this admin module. It looks useful. Is it safe to enable this? How is the user activated and the credentials are saved?

Tansito commented 1 month ago

I need to admit that I'm not an expert either so I was basically reading a lot of documentation and asking: https://docs.djangoproject.com/en/4.2/ref/contrib/admin/

Is it safe to enable this?

I would say yes. It would be as safe as any UI that requires authentication that we could have.

How is the user activated and the credentials are saved?

This is the process that I commented to you Aki, I don't know if you remember. Basically we can create an admin user with our current environment variables configuration: https://github.com/Qiskit/qiskit-serverless/blob/main/charts/qiskit-serverless/values.yaml#L93

This user is what we can use to access to the admin panel. I need to check how to create a secret in our Secrets-Manager for the initial password to use it in the environment variable. And with that we can create users for each of us.

Those admin users are saved the same as we are saving our current users. The only difference is that those users will have a password that django encrypts in database without problem.

akihikokuroda commented 1 month ago

The secret manger is not installed in the cluster. For now, we need to get console access (kubectl) and create the secret using it.

akihikokuroda commented 1 month ago

As far as it safe. I approve this PR.

Tansito commented 1 month ago

As far as it safe. I approve this PR.

Thanks @akihikokuroda , I will wait for @IceKhan13 in case he would have any recommendation too 👍

The secret manger is not installed in the cluster.

I confirm that we have connected the secrets-manager to our clusters, Aki. I learned today how it works in the new account, I can ping you tomorrow and show it to you.

Tansito commented 1 month ago

Merging by now to move forward. Feel free to check it whenever you want @IceKhan13 👍