Force ssl database connection with ACE

When using ACE, the configuration is usually done in config.json:

     "store": {
            "type": "postgres",
            "url": "$DATABASE_URL"

as described in the README.md in Bitbucket

Is it possible to specify that connections to postgres must require SSL? I’m asking because on heroku, my app occasionally connects without SSL, leading to errors.

Related to the above, is there documentation available for the store.js and sequelize.js implementation in ACE?

At @acalantog : is the store implementation a “leftover” from jugglingdb?

Thanks for tagging me here @marc, I’ll look into this today. Cheers

1 Like

Thanks @acalantog !
Meanwhile I found a potential workaround: use an environment variable https://github.com/brianc/node-postgres/blob/master/lib/connection-parameters.js#L24

PGSSLMODE=require

Testing this at the moment. However would be really good if this could be set in config.json.

Thanks @marc for the workaround! Let me create a product issue for me to get back to.

Please see for feature request: [ACEJS-141] - Ecosystem Jira

With newest ACE, I had to put following options in config.json

"production": {
    "port": "$PORT",
    "errorTemplate": true,
    "localBaseUrl": "https://example.herokuapp.com",
    "store": {
      "dialect": "postgres",
      "url": "$DATABASE_URL",
      "dialectOptions": {
        "ssl": {
          "require": true,
          "rejectUnauthorized": false
        }
      }
    },
    "whitelist": [
      "*.jira-dev.com",
      "*.atlassian.net",
      "*.atlassian.com",
      "*.jira.com"
    ]
  },