Create SMTP channel with DSS API
![GuillaumeDubois](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar18.png)
Hi all,
Is it possible to set up a SMTP channel using the DSS API instead of setting it up in the UI, in settings -> Notifications & Integrations -> Messaging Channels ?
I could not find it, though it would be practical to be able to automate all kinds of config initializations for DSS instances. Just like it is possible to create users, groups...
Regards,
Operating system used: CentOS
Best Answer
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,876 Neuron
While there is no API nothing will stop you from deploying you own config file or modifying it via another script. This is where the Messaging Channels config file lives:
[DATA_DIR]/config/messaging-channels.json
Answers
-
JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 295 Dataiker
Hi @GuillaumeDubois
,There are no APIs for that but we have already logged this with engineering to add them in the future releases.
Thanks!
Jordan
-
Hi @JordanB
, thank you for your anwser, that is good to know, that would be handy. -
Hi @Turribeach
, thank you for the tips, I will look into this. -
Hello,
@Turribeach, it is working fine with a non hashed password. However is there a way to create a hashed password recognized by DSS ? -
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,876 Neuron
Interesting. Well my educated guess is that Dataiku uses an internal hash function/encription method that they won't share with you. Having said that nothing stops you from adding the password manually through the UI and then looking at the encrypted value so you can deploy it via a script when needed. The interesting bit for me was to know if the encrypted value changes from DSS to DSS installation or will be the same. In other words will the same password in different DSS nodes result in the same encrypted value. I did a test and it does change so again my guess is that they are using some sort of salting/initialization vector which is dependant on something on the machine, like the hostname, IP, network MAC address, etc.
So in order of preference these are your choices:
- Get Dataiku to provide you with API to create Notification channels
- Get Dataiku to provide you with API to encrypt values on config files
- Get Dataiku to provide you with documentation on how to encrypt values on config files
- Encrypt your SMTP password via the UI on all the DSS nodes you want to deploy to. Then build a mapping table between DSS nodes and the encrypted password so you can deploy it programatically
BTW if you are building DSS environments from scratch it will good to understand which environment difference is the one that triggers a different encrypted value. Just because I am curious...