1

In an Anypoint project I have a Database Config which uses secure property placeholders. In the Secure Properties Config I have key set to ${key}, and then define the key variable in the environment of the run configuration for the project. This works just fine for decrypting the secure properties when running the project in Studio or when deploying it, and since the value of key is in my Studio preferences rather than in the project it doesn't get included in the project's Git repository.

However, I encounter a problem when I want to use "Test Connection" in the Database Config. Since "Test Connection" isn't running in an app launched by Studio it doesn't have access to the run configuration environment, and without the key it can't decrypt the properties for the DB connection. This means Studio can't connection to the DB to get the schema for metadata propagation.

I've found two workarounds:

  1. Paste the actual key into the key field, hit okay, test the DB connection, then go back and replace the actual key with ${key}.
  2. Launch Studio with the environmental variable key set to the actual key.

However, both of these methods are clunky. Is there any way so that instead a "Test Connection" can somehow get the key value from a run configuration?

Matthew Cline
  • 2,312
  • 1
  • 19
  • 36

1 Answers1

0

I use both workarounds myself. To my knowledge "Test Connection..." requires "plain text". Without digging into Anypoint Studio source code, perhaps opening a MuleSoft ticket is your best bet. Not much of an answer, just confirming that there's nothing less clunky. In my opinion, using plain text extracts a layer of debugging if you're having issues with connectivity.

utechtzs
  • 1,013
  • 5
  • 12