question about encryption and decryption in VB.net script

Hello Team,

 We are using basic auth to connect to API and script running via job server is working when ZMBBPassword is not encrypted

 when I encrypt the PWD script is failing 

 How can I fix this error?

 Please advise.

   Public Function CCC_ReserveMail(uidperson As String) As String
    Dim baseUrl As String = Session.Config.GetConfigParm("Custom\EmailGeneration\BaseAPIURL")
    Dim username As String = Session.Config.GetConfigParm("Custom\EmailGeneration\UserName")
    Dim password As String = Session.Config.GetConfigParm("Custom\EmailGeneration\Password")

 ' Encode credentials


  Dim credentials As String = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"))

Parents
  • You should move the fetch of the configuration parameter into the process parameters, mark the parameters as secret and hidden, and change the script to get these parameters as input parameters.

    Public Function CCC_ReserveMail(uidperson As String, password as String) As String
        Dim baseUrl As String = Session.Config.GetConfigParm("Custom\EmailGeneration\BaseAPIURL")
        Dim username As String = Session.Config.GetConfigParm("Custom\EmailGeneration\UserName")
    ...

Reply
  • You should move the fetch of the configuration parameter into the process parameters, mark the parameters as secret and hidden, and change the script to get these parameters as input parameters.

    Public Function CCC_ReserveMail(uidperson As String, password as String) As String
        Dim baseUrl As String = Session.Config.GetConfigParm("Custom\EmailGeneration\BaseAPIURL")
        Dim username As String = Session.Config.GetConfigParm("Custom\EmailGeneration\UserName")
    ...

Children
No Data