FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    TLS/SSL conncetion to postgressDB

    Scheduled Pinned Locked Moved
    Q&A
    0
    3
    699
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      luke.fishman
      last edited by

      How do i connect Fusionauth to Postgress DB using a secure (TLS/SSL) connection?

      I ran FusionAuth using dokcer-compose file :

      version: '3'
      
      services:
        fusionauth:
          image: funzacr.azurecr.io/fusionauth:v1.27
      
          environment:
            DATABASE_URL: jdbc:postgresql://<DB_NAME>.postgres.database.azure.com:5432/<DB_TABLE>
      
            DATABASE_USERNAME: <username>@<DB_NAME>
            DATABASE_PASSWORD: <PASSWORD>
            FUSIONAUTH_APP_MEMORY: 1024M
            FUSIONAUTH_APP_RUNTIME_MODE: production
            FUSIONAUTH_APP_URL: http://fusionauth:9011
            SEARCH_SERVERS: <elasticsearch_url>
            SEARCH_TYPE: elasticsearch
      
          networks:
            - search
          restart: unless-stopped
          ports:
            - 9011:9011
          volumes:
            - fa_config:/usr/local/fusionauth/config
      
      networks:
        search:
          driver: bridge
      
      volumes:
        fa_config:
      
      
      
      1 Reply Last reply Reply Quote 0
      • joshuaJ
        joshua
        last edited by

        @luke-fishman

        I am checking on this for you and will let you know what I find out. One good place to start might be here

        https://www.postgresql.org/docs/9.1/libpq-ssl.html

        Thanks,
        Josh

        1 Reply Last reply Reply Quote 0
        • M
          michael.schramm
          last edited by

          you can add to the database_url: ?ssl=true&sslmode=require (pick the mode you actually require)

          if your server supports tls1.3+ you should force 1.2 on the client:
          FUSIONAUTH_APP_ADDITIONAL_JAVA_ARGS="-Djdk.tls.client.protocols=TLSv1.2"
          (https://fusionauth.io/community/forum/topic/938/secure-db-connection-with-tls-1-3/4?_=1629097757303)

          1 Reply Last reply Reply Quote 1
          • First post
            Last post