Survey banner
Share your feedback on the Dataiku documentation with this 5 min survey. Thanks! TAKE THE SURVEY

Create SMTP channel with DSS API

Solved!
GuillaumeDubois
Level 2
Create SMTP channel with DSS API

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

0 Kudos
1 Solution
Turribeach

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

View solution in original post

6 Replies
JordanB
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

GuillaumeDubois
Level 2
Author

Hi @JordanB , thank you for your anwser, that is good to know, that would be handy.

Turribeach

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

GuillaumeDubois
Level 2
Author

Hi @Turribeach, thank you for the tips, I will look into this. 

0 Kudos
GuillaumeDubois
Level 2
Author

Hello,
@Turribeach, it is working fine with a non hashed password. However is there a way to create a hashed password recognized by DSS ?

0 Kudos

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:

  1. Get Dataiku to provide you with API to create Notification channels
  2. Get Dataiku to provide you with API to encrypt values on config files
  3. Get Dataiku to provide you with documentation on how to encrypt values on config files
  4. 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... 🤓

0 Kudos