Hide connection data (especially password)

I use an MS SQL Server connection on my website.
For greater security my client would not want the connection data in App_Data\ServerConnect\modules \Connections\filename.json to be readable because the pages are located on an IIS of a potentially reachable location from outside

I thought of two possibilities, but I can’t handle either:
-Use a DSN system connection on that Windows (but I don’t know how Wappler can interface with that type of connection)
-Ensure that the JSON file has encrypted data in it. I tried to tick the entry “Encrypt” in Database Connection, but then I have this error when I do the test and don’t know how to fix it.

errore_ENCRYPT

Can someone help me? Thank you

@Teodor @patrick it’s possible to do that?
(not to allow an attacker to extract data from the json file)

Not a 100% solution but

  1. create the settings in the server connect settings under environment.

image

define the env variables in Workflow globals

change the database settings to the ENV variables

.json file will then read a pretty useless…

{
  "name": "db",
  "module": "dbconnector",
  "action": "connect",
  "options": {
    "client": "mysql2",
    "connection": {
      "host": "{{$_ENV.host}}",
      "port": "{{$_ENV.port}}",
      "user": "{{$_ENV.user}}",
      "password": "{{$_ENV.password}}",
      "database": "{{$_ENV.database}}"
    }
  }
}

although that still just shifts the issue to config.json I suppose but makes it a bit harder

I don’t find the screenshot as you indicated in Step 1 (Server Connection Settings)
My situation is: