Forum Discussion

PedroCSeq's avatar
PedroCSeq
Frequent Visitor
2 years ago
Solved

Passing SecureString Parameter Values in notebooks

Hey All,

I'm having a lot of trouble using securestring parameters on my pipelines, as I need to pass some credencials to multiple notebooks in a pipeline as parameters and, as we all know, using plain text for passwords/keys is not secure at all, so I tried using the SecureString parameter type for pipeline parameters as the name sounded just like what I needed.
Now, when runing the pipeline I got no errors on the notebook, but when looking at the notebook run the autentication was failing, and further experimentation revealed that the notebook was geting literally '********' as the string value, not whatever I wrote in the parameter value box. Is there a dynamic content method I should be using the pass the secured value to a notebook, a variable type I should initialize the parameter as in the notebook (using PySpark, btw)? 

  • Hi PedroCSeq 

     

    Thanks for using Microsoft Fabric Community.

    Apologies for the inconvenience that you are facing here.

    Secure string is a type of parameter that you can use in Fabric pipelines to pass sensitive information, such as passwords or keys, to your notebooks. However, secure string parameters are masked with asterisks, so you cannot access their actual values in your notebook code. This is why your authentication may fail if you try to use a secure string parameter as a plain string.

    One possible way to use secure string parameters in your notebooks to use Azure Key Vault secrets this might help you.

    Azure Key Vault is a service that allows you to securely store and access secrets, such as passwords, keys, certificates, etc. You can create a secret in Azure Key Vault and then reference it in your pipeline activity using the Web activity and the Secure Output option. This way, you can pass the secret value to your notebook without exposing it in plain text.

    Please refer to the document for more details.

     

    I hope this information helps. Please do let us know If you have any further questions.

     

    Thanks.

  • v-cboorla-msft's avatar
    v-cboorla-msft
    2 years ago

    Hi PedroCSeq 

     

    We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others.
    If you have any question relating to the current thread, please do let us know and we will try out best to help you.
    In case if you have any other question on a different issue, we request you to open a new thread.


    Thanks.

6 Replies

  • v-cboorla-msft's avatar
    v-cboorla-msft
    Microsoft Employee

    Hi PedroCSeq 

     

    Thanks for using Microsoft Fabric Community.

    Apologies for the inconvenience that you are facing here.

    Secure string is a type of parameter that you can use in Fabric pipelines to pass sensitive information, such as passwords or keys, to your notebooks. However, secure string parameters are masked with asterisks, so you cannot access their actual values in your notebook code. This is why your authentication may fail if you try to use a secure string parameter as a plain string.

    One possible way to use secure string parameters in your notebooks to use Azure Key Vault secrets this might help you.

    Azure Key Vault is a service that allows you to securely store and access secrets, such as passwords, keys, certificates, etc. You can create a secret in Azure Key Vault and then reference it in your pipeline activity using the Web activity and the Secure Output option. This way, you can pass the secret value to your notebook without exposing it in plain text.

    Please refer to the document for more details.

     

    I hope this information helps. Please do let us know If you have any further questions.

     

    Thanks.

    • v-cboorla-msft's avatar
      v-cboorla-msft
      Microsoft Employee

      Hi PedroCSeq 

       

      We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
      In case if you have any resolution please do share that same with the community as it can be helpful to others.
      Otherwise, will respond back with the more details and we will try to help.


      Thanks.

      • v-cboorla-msft's avatar
        v-cboorla-msft
        Microsoft Employee

        Hi PedroCSeq 

         

        We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others.
        If you have any question relating to the current thread, please do let us know and we will try out best to help you.
        In case if you have any other question on a different issue, we request you to open a new thread.


        Thanks.

    • SwatiBabber's avatar
      SwatiBabber
      New Member

      Hello Team, 

       

      I have tried using the secure output option but when using the param in the notebook activity , 

      "activity('Read_KV_Secret').output.value" this string is passed as is in the Notebook instead of the actual value of the secret
  • PedroCSeq's avatar
    PedroCSeq
    Frequent Visitor

    Yes, doing things in through the method sugested worked for my usecase, thank you for the help

    • v-cboorla-msft's avatar
      v-cboorla-msft
      Microsoft Employee

      Hi PedroCSeq 

       

      Glad that your query got resolved.

      Please continue using Fabric Community for any help regarding your queries.

       

      Thanks.