@lc We should be able to get at least one of your proposed solutions working.
User Parameter
- Add your reader (or writer) with the full JDBC Connection String in an Embedded Connection
- In the Navigator Pane on the left, open the Connection String parameter and erase the contents
- The Connection String will have been auto-published as a User Parameter that you can use to set it externally
Attribute Value
- Use FeatureReader and FeatureWriter transformers instead of adding readers and writers directly
- Choose Embed Connection Parameters when picking a connection
- Now the JDBC Connection String can be retrieved from an incoming attribute (or built dynamically if you want to store each of the different passwords in their own attributes)
Note that no matter how you pass in the connection string we will currently log it in plain text! That is what we will improve in PR#82990.
Also note that if you store your JDBC Connection String in a Database Connection (rather than an Embedded Connection) it will actually be quite secure in terms of storage. The connection string will not exist anywhere on disk in plain text, and will not travel with your workspace if you share it.