Pass user credentials to other workflows

Hi,

Hope everyone is doing well!

Is there a way to pass user name and password to other workflows in a bit secure way?
I am using those credentials in “Send Email” node. But due to our company policies, we have to change the email passwords once a month. Therefore I want to avoid entering same credentials to all the workflows one by one that use same node.

For the secure way part; the nodes like Credentials Configuration masks the password which is enough for this case. But since it creates a variable for the credentials, I couldn’t find a way to pass it to other workflows. I did some tests with using Container Input/Output and used Workflow Call (Row) but it seems it doesn’t pass the variable. Maybe I am doing something wrong.

By the way, I’m using KNIME 4.3

Thanks in advance.
Nezir

Helloo @ngonenc,

give it a try with Call Workflow (Table Based) together with Container Input (Credentials) node in called workflow.

Br,
Ivan

Hi @ipazin ,

I couldn’t find any examples. I still can’t receive the flow credential variables with Call Workflow (Table Based). I can see the variable name under advanced setting of the Call Workflow, however, once it runs, I don’t see the variable at the output.

Thanks,
Nezir

I managed to get the credentials. Probably I was setting up in the wrong way.

Workflow 1 for the email credentials - Credentials Configuration, Dummy table and Call Workflow (Table)

Workflow 2 for main workflow - Container Input (Credentials), Send Email

I need to run Workflow 1 once to pass the credentials to Workflow 2 which triggers sending emails as well since it works as a container I assume. However, triggering Workflow 1 will end up triggering whole Workflow 2. Considering I have 4 main workflows with email messaging, it will run all those to inject the credentials. I prefer the other way to be honest (main workflows call for the credential)

Is this the only way or are there any other options?

Thanks,
Nezir

Hello @ngonenc,

but then for each main workflow you can have dedicated Call Workflow node in workflow 1,can’t you? And then you can control which workflow of 4 workflows gets executed. Would that work?

I see and this probably makes sense but don’t think there’s a way for such design with above mentioned nodes at the moment. However you can always create Shared Component with Credentials Configuration node and then when it’s time to change password you only do it in one place. This way you avoid entering same credentials to all the workflows that are in need of these credentials. You should find all information about Component sharing here:

https://docs.knime.com/latest/analytics_platform_components_guide/index.html#sharing-components

Br,
Ivan

I could think of setting those as environ variables and then call them via python. Then you got a “single point” to call from
br

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.