# Using workflow credentials inside components

**URL:** <https://forum.knime.com/t/using-workflow-credentials-inside-components/26088>\
**Category:** KNIME Analytics Platform\
**Created:** [August 13, 2020, 4:09pm UTC](https://forum.knime.com/t/using-workflow-credentials-inside-components/26088 "2020-08-13T16:09:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [August 13, 2020, 4:09pm UTC](https://forum.knime.com/t/using-workflow-credentials-inside-components/26088/1 "2020-08-13T16:09:41Z")

</div>

Hey everyone,

How can I use workflow credentials inside components?

I need to specify database username and password in workflow credentials or workflow variables. The problem is that workflow credentials are not accessible inside components. Also it is not possible to overwrite passwords with flow variables.

Any solution?

😊

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [August 13, 2020, 4:31pm UTC](https://forum.knime.com/t/using-workflow-credentials-inside-components/26088/2 "2020-08-13T16:31:00Z")

</div>

One workaround would be setting username and password as workflow variables and then using the [Credentials Configuration](https://nodepit.com/node/org.knime.js.base.node.configuration.input.credentials.CredentialsDialogNodeFactory) node to create the credentials by setting default username and password using flow variables.

But I’m still wondering how to set workflow credentials and use them inside components.

😊

---

<div class="post-metadata">

**Author:** ![Iris](https://forum-cdn.knime.com/user_avatar/forum.knime.com/iris/32/14_2.png) [@Iris](https://forum.knime.com/u/Iris)\
**Post date:** [August 14, 2020, 6:57am UTC](https://forum.knime.com/t/using-workflow-credentials-inside-components/26088/3 "2020-08-14T06:57:10Z")

</div>

Hi @armingrudd

the workflow credentials are a quite old concept of us, which we are no longer recommending. We are now having the Credential Configuration node for this purpose or the Widget depending where you want to deploy your workflow to.

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [August 14, 2020, 8:27am UTC](https://forum.knime.com/t/using-workflow-credentials-inside-components/26088/4 "2020-08-14T08:27:05Z")

</div>

Thank you @Iris,

How about running the workflow in batch mode? Then How should the credentials be sent?  
For now I’m doing what I suggested as a workaround. Credentials are sent as workflow variables and then the Credentials Configuration node generates the credential.

Is there a better approach?

😊

---

<div class="post-metadata">

**Author:** ![jan\_lender](https://forum-cdn.knime.com/user_avatar/forum.knime.com/jan_lender/32/11438_2.png) [@jan\_lender](https://forum.knime.com/u/jan_lender)\
**Post date:** [August 14, 2020, 8:51am UTC](https://forum.knime.com/t/using-workflow-credentials-inside-components/26088/5 "2020-08-14T08:51:11Z")

</div>

HI,

This is very vital for me. Before “new” db nodes lost their “lab” marker and “old” db nodes get “legacy” mark at the same time, I had a reliable way of configuring DB nodes. Yes, I used to have the configuration within components, I used to load connection parameters (including a type of a particular database) from external configuration file. Since I introduced new DB nodes to my workflows, I’m struggling almost continually.

Let me point some older topics addressing this issue

> [@Recommended way of configuring a database connectors](https://forum.knime.com/t/recommended-way-of-configuring-a-database-connectors/18040):
>
> In my project, I connect to a number of databases at many places in my workflows. The decision which database to connect is in many cases made in dependency on a particular context. My workflows at some points figure out the source of the data to work with is in a particular database. Also, they figure out which is a target database, where to write the result data. I hope I’m clear. In KNIME 3.7, I solved this by introducing a Wrapped Metanode Template. The Metanode has got a single input - an …

> [@DB nodes - can't continue with workflow after it is re-loaded](https://forum.knime.com/t/db-nodes-cant-continue-with-workflow-after-it-is-re-loaded/20440):
>
> I love new DB nodes. At least, they perform far much faster than the legacy ones. They brought some limitations too. I used to employ a configurable Wrapped Metanode in my workflows, which was responsible for providing DB connection to a particular database I need to work with, in a particular part of the workflow. With new DB nodes, it stopped working as I described in my [[Recommended way of configuring a database connectors](https://forum.knime.com/t/recommended-way-of-configuring-a-database-connectors/18040)]([http://Recommended](http://Recommended) way of configuring a database connectors) forum t…

And finally:

> [@DB Connector - Give the password flow variable configuration option back.](https://forum.knime.com/t/db-connector-give-the-password-flow-variable-configuration-option-back/20672/4):
>
> May I hope this KNIME Team will address this?

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [February 12, 2021, 8:51pm UTC](https://forum.knime.com/t/using-workflow-credentials-inside-components/26088/6 "2021-02-12T20:51:43Z")

</div>

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