devops icon indicating copy to clipboard operation
devops copied to clipboard

SSL connection support for DB's

Open ziadkiwan opened this issue 3 years ago • 2 comments

Hello, we are trying to setup mainflux on a managed Database service and we are wondering if there is SSL support for database connection if yes, then how to enable and path the SSL certificate for the database connection ?

  ## If you want to use an external database, set this to false and change postgresqlHost
  enabled: false
  name: postgresql-users
  postgresqlHost: localhost
  postgresqlUsername: postgres
  postgresqlPassword: mainflux
  postgresqlDatabase: users
  resources:
    requests:
      cpu: 25m
  persistence:
    size: 1Gi```

ziadkiwan avatar Feb 28 '22 19:02 ziadkiwan

Hello @ziadkiwan The short answer is currently this chart doesn't support SSL connection to DB But, if you look at core services, for example users, you will see that this is supported with environment variables MF_USERS_DB_SSL_MODE, MF_USERS_DB_SSL_CERT, MF_USERS_DB_SSL_KEY and MF_USERS_DB_SSL_ROOT_CERT I haven't tried SSL connection to external db, but with some modification of this chart maybe you can try. You can try adding this env vars into users deployment template and test it

blokovi avatar Mar 01 '22 04:03 blokovi

Hello @blokovi,

Thank you for the informative answer, i will edit the template and the helm chart and provide a PR request.

ziadkiwan avatar Mar 02 '22 07:03 ziadkiwan