Cloud Pak for Data

 View Only
Expand all | Collapse all

Hiding string database connections and API credentials in Watson Studio Jupiter Notebooks

  • 1.  Hiding string database connections and API credentials in Watson Studio Jupiter Notebooks

    Posted Tue August 09, 2022 10:26 AM
    Hi Team,

    One of my customer is asking how hiding string database connections and API credentials in Watson Studio Jupiter Notebooks. I read about 
    getpass library (https://www.compose.com/articles/securing-notebooks-on-ibms-data-science-experience/), but I do not it is the only option. Could anyone tell me any hint?

    Thanks

    Best Regards

    Álvaro


    ------------------------------
    Alvaro Arias
    ------------------------------

    #CloudPakforDataGroup


  • 2.  RE: Hiding string database connections and API credentials in Watson Studio Jupiter Notebooks

    Posted Thu August 25, 2022 01:56 PM
    Hi Alvaro, it depends on the situation. If the string is written on the code you can use de "@hidden"​  parameter on a cell, so when someone opens it from outside jupyter, the content will be hidden, but nothing can be done(that I'm aware of) if someone opens it from inside jupyterlab. If you include the credential via env, the CP4D version 4 and onwards automatically hide that sensitive information. Another option is the import of connection, but like the former, if someone enters jupyterlab and runs the code the credentials can be printed. I usually leave those data in an env when creating a job.

    ------------------------------
    Walter Pereira Lima Neto
    ------------------------------