Generate encrypted passwords manually
![DrissiReda](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar1.png)
I'm trying to set up automatic configuration in my dataiku instance. I can do that through overwriting the files in "dss_dir/config".
One issue I'm currently having is how to generate encrypted passwords, for example in the connections file we have:
This is "password"
What algorithm/binary can I use to generate this? Ideally I'd like to do it in python because it's what dss uses.
For users.json for example it would be a different one:
This is "password"
Best Answer
-
Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts Posts: 365 Dataiker
Hi @DrissiReda
We don't have a binary that has the functionality to encrypt using pbkdf2. That is done internally in DSS only.
For user creation you might want to have a look at python APIs:
https://doc.dataiku.com/dss/latest/python-api/users-groups.html#a-local-user-with-a-password
or dsscli utility:
https://doc.dataiku.com/dss/latest/operations/dsscli.html#user-create
Hope this can cover your needs. Thanks.
Answers
-
Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts Posts: 365 Dataiker
Hi @DrissiReda
You can use dku utility for that:
./bin/dku encrypt-password <password>
The encrypted password will be output as the line started by "e:AES:........"
What about the algorithm, you can find more info here: https://doc.dataiku.com/dss/latest/security/passwords-security.html
-
Thanks but I can't see how to do that for pbkdf2
-
Thank you very much that works perfectly for me. One last point, any possible way I can "Install Jupyter Kernels" from cli? It's an option inside the containerized execution plugin.
-
Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts Posts: 365 Dataiker
hi @DrissiReda
I am not sure about what option you are talking about in EKS/AKS/GKE plugins, but there is a high chance as this is going to work only from UI as plugins don't usually have APIs.
-
It's not a plugin, but thanks to logs I realized how to do what I wanted. It just creates a kernel.json file under dss/jupyter-run/kernels/py-dku-containerized-venv--<containerized_exec_conf_name>/