<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to configure PostgreSQL connectivity over SSL? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323954#M10955</link>
    <description>&lt;P&gt;For me it worked well. change in nuxeo.conf nuxeo.db.name=nuxeo?ssl=true
And then add certificate to java where you run nuxeo server.&lt;/P&gt;
&lt;P&gt;C:\Program Files\Java\jdk1.8.0_40\jre\lib\security&amp;gt;keytool -import -trustcacerts
-keystore cacerts -storepass changeit -noprompt -alias postgresql -file C:\open
ssl\bin\client\postgresql.crt&lt;/P&gt;
&lt;P&gt;Configuration of the pg_hba.conf
should be:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;hostssl         nuxeo           nuxeo           127.0.0.1/32       md5
hostssl    all             all             ::1/128                 md5

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In the file postgresql.conf&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ssl = on				# (change requires restart)
ssl_ciphers = 'DEFAULT:!LOW:!EXP:!MD5:@STRENGTH'	# allowed SSL ciphers
					# (change requires restart)
ssl_renegotiation_limit = 0		# amount of data between renegotiations
ssl_key_file = 'server.key'		# (change requires restart)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Use openssl for generating certificates.&lt;/P&gt;
&lt;P&gt;It works fine for me in windows and it should not be a problem at all in linux.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2016 14:18:06 GMT</pubDate>
    <dc:creator>Amir_Buzo</dc:creator>
    <dc:date>2016-09-14T14:18:06Z</dc:date>
    <item>
      <title>How to configure PostgreSQL connectivity over SSL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323950#M10951</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I'm attempting to configure a Nuxeo 5.6 VM to access an external PostgreSQL 9.1 database over SSL. Non-encrypted connections work fine, but I'm stumped as to how to tell Nuxeo to use SSL.&lt;/P&gt;
&lt;P&gt;First, in my PostgreSQL database, I've generated an SSL certificate and key pair, performed the necessary PostgreSQL configuration to enable SSL, and made the appropriate entries in my pg_hba.conf file, for example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;hostssl         nuxeo           nuxeo           127.0.0.1/32       md5
hostssl         nuxeo           nuxeo           192.168.1.1/32       md5
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I've tested that SSL is working by connecting to the database from localhost:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;# psql -h 127.0.0.1 -U nuxeo nuxeo
Password for user nuxeo: 
psql (9.1.8)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

nuxeo=&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I've copied the PostgreSQL server certificate to the Nuxeo 5.6 VM and imported it into the system Java keystore:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeo@nuxeovm:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/security$ keytool -list -alias "postgresql91" -keystore ./cacerts
Enter keystore password:  
postgresql91, Sep 9, 2013, trustedCertEntry, 
Certificate fingerprint (SHA1):
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The $64,000 question is - how does one now tell Nuxeo to use encrypted connections? I've tried using the advanced settings at "Admin Center -&amp;gt; Setup -&amp;gt; Advanced setup" to specify SSL in my JDBC URL as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeo.db.jdbc.url  jdbc:postgresql://${nuxeo.db.host}:${nuxeo.db.port}/${nuxeo.db.name}?ssl=true
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But on restarting the Nuxeo server I get this in a stacktrace when Nuxeo clearly can't connect to the database over SSL (and looks instead for an unencrypted connection):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Caused by: org.nuxeo.ecm.core.storage.StorageException: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.1.1", user "nuxeo", database "nuxeo", SSL off
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can someone please share with me how to enable encrypted database connections for Nuxeo?&lt;/P&gt;
&lt;P&gt;Cheers,
Dave&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2013 11:28:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323950#M10951</guid>
      <dc:creator>davenz_</dc:creator>
      <dc:date>2013-09-09T11:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure PostgreSQL connectivity over SSL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323951#M10952</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;For me it works with a default PostgreSQL 9.1.9 (ubuntu) with ssl enable.&lt;/P&gt;
&lt;P&gt;I just had to change the template file &lt;CODE&gt;templates/postgresql/nuxeo.defaults&lt;/CODE&gt; to update the jdbc url:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;nuxeo.db.jdbc.url=jdbc:postgresql://${nuxeo.db.host}:${nuxeo.db.port}/${nuxeo.db.name}?ssl=true&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I can check with tcpdump that the communication is now ssl encrypted.&lt;/P&gt;
&lt;P&gt;Is the following command working for you ?&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;psql -h 192.168.1.1 -U nuxeo&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;ben&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2013 17:09:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323951#M10952</guid>
      <dc:creator>ben_</dc:creator>
      <dc:date>2013-09-09T17:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure PostgreSQL connectivity over SSL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323952#M10953</link>
      <description>&lt;P&gt;Hi Ben, thanks heaps for replying - I'll give that a shot and see&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2013 14:01:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323952#M10953</guid>
      <dc:creator>davenz_</dc:creator>
      <dc:date>2013-09-16T14:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure PostgreSQL connectivity over SSL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323953#M10954</link>
      <description>&lt;P&gt;Here is how I got it working with the Nuxeo 5.5 DM:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Appended the following text to the nuxeo.db.name property value in the nuxeo.conf file:&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;?ssl=true&amp;amp;sslfactory=org.postgresql.ssl.NonValidatingFactory&amp;amp;foo=true&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;nuxeo.db.name=nuxeo?ssl=true&amp;amp;sslfactory=org.postgresql.ssl.NonValidatingFactory&amp;amp;foo=true&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Set the following in nuxeo.conf to force config regeneration:&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;nuxeo.force.generation=true&lt;/P&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;Restart Nuxeo&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;It's not pretty, but it seems to work.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2014 20:09:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323953#M10954</guid>
      <dc:creator>remillet_</dc:creator>
      <dc:date>2014-08-28T20:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure PostgreSQL connectivity over SSL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323954#M10955</link>
      <description>&lt;P&gt;For me it worked well. change in nuxeo.conf nuxeo.db.name=nuxeo?ssl=true
And then add certificate to java where you run nuxeo server.&lt;/P&gt;
&lt;P&gt;C:\Program Files\Java\jdk1.8.0_40\jre\lib\security&amp;gt;keytool -import -trustcacerts
-keystore cacerts -storepass changeit -noprompt -alias postgresql -file C:\open
ssl\bin\client\postgresql.crt&lt;/P&gt;
&lt;P&gt;Configuration of the pg_hba.conf
should be:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;hostssl         nuxeo           nuxeo           127.0.0.1/32       md5
hostssl    all             all             ::1/128                 md5

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In the file postgresql.conf&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ssl = on				# (change requires restart)
ssl_ciphers = 'DEFAULT:!LOW:!EXP:!MD5:@STRENGTH'	# allowed SSL ciphers
					# (change requires restart)
ssl_renegotiation_limit = 0		# amount of data between renegotiations
ssl_key_file = 'server.key'		# (change requires restart)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Use openssl for generating certificates.&lt;/P&gt;
&lt;P&gt;It works fine for me in windows and it should not be a problem at all in linux.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 14:18:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-configure-postgresql-connectivity-over-ssl/m-p/323954#M10955</guid>
      <dc:creator>Amir_Buzo</dc:creator>
      <dc:date>2016-09-14T14:18:06Z</dc:date>
    </item>
  </channel>
</rss>

