Create SMTP channel with DSS API

GuillaumeDubois
GuillaumeDubois Registered Posts: 5 ✭✭✭

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

Tagged:

Best Answer

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,113 Neuron
    Answer ✓

    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
    JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 296 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
    GuillaumeDubois Registered Posts: 5 ✭✭✭

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

  • GuillaumeDubois
    GuillaumeDubois Registered Posts: 5 ✭✭✭

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

  • GuillaumeDubois
    GuillaumeDubois Registered Posts: 5 ✭✭✭

    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
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,113 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:

    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...

Setup Info
    Tags
      Help me…