Hi @lc, this looks like an unusual JDBC driver. My searching indicates it is for a product called "PowerHub", but I can't find much more information than that.
I see three interesting things in your connection string:
- It doesn't include //, for example jdbc:scwapl://<server_name>/<name value pairs>
- It contains two pairs of username/passwords
- None of the parameters are name value pairs, for example username=myusername;password=mypassword
JDBC usernames and passwords are normally sent as name value pair properties, which are for the most part equivalent to a connection string that contains the example in point 3 . If the PowerHub JDBC driver doesn't support name value pairs in any form it would explain why you are only having success directly embedding them in the connection string.
In short, I don't think we have an immediate solution for you to avoid having your passwords logged in plaintext. I have proposed a solution to this that might make it into FME 2018.1. Please raise an issue and reference PR#82990 if you want progress updates.
Thanks @ravenkopelman. I'm not sure it doesn't supports name value pairs, this is an example of a path:
jdbc:scwapi://amr-phpr.americas.comp.com/prod-server;user;pass;SAP_BW;SAP_PRODUCTIONL_TESTS
I tried to leave the user and pass parts empty, and put those values in the paramters, which results in error. How do I let FME know to use the Username and Password I entered as parameters?
This could also be easily solved if i can set this field dynamically through as User Param or Attribute value. But I don't have that option.
@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.
@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.
Update: The flag to control connection string logging in the generic JDBC format will appear in FME beta 18454.