Re: Review:Patch: SSL: prefer server cipher order

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review:Patch: SSL: prefer server cipher order
Date: 2013-11-16 14:24:15
Message-ID: 20131116142415.GA28285@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 15, 2013 at 02:16:52PM -0800, Adrian Klaver wrote:
> On 11/15/2013 11:49 AM, Marko Kreen wrote:
> >On Fri, Nov 15, 2013 at 11:16:25AM -0800, Adrian Klaver wrote:
> >>The description of the GUCs show up in the documentation but I am
> >>not seeing the GUCs themselves in postgresql.conf, so I could test
> >>no further. It is entirely possible I am missing a step and would
> >>appreciate enlightenment.
> >
> >Sorry, I forgot to update sample config.
> >
> >ssl-prefer-server-cipher-order-v2.patch
> >- Add GUC to sample config
> >- Change default value to 'true', per comments from Alvaro and Magnus.
> >
> >ssl-ecdh-v2.patch
> >- Add GUC to sample config
> >
>
> Well that worked.
> I made ssl connections to the server using psql and verified it
> respected the order of ssl_ciphers. I do not have a client available
> with a different view of cipher order so I cannot test that.

Well, these are GUC patches so the thing to test is whether the GUCs work.

ssl-prefer-server-cipher-order:
Use non-standard cipher order in server, eg: RC4-SHA:DHE-RSA-AES128-SHA,
see if on/off works. You can see OpenSSL default order with
"openssl ciphers -v".

ssl-ecdh:
It should start using ECDHE-RSA immediately. Also see if adding
!ECDH to ciphers will fall back to DHE. It's kind of hard to test
the ssl_ecdh_curve as you can't see it anywhere. I tested it by
measuring if bigger curve slowed connecting down...

Bonus - test EC keys:
$ openssl ecparam -name prime256v1 -out ecparam.pem
$ openssl req -x509 -newkey ec:ecparam.pem -days 9000 -nodes \
-subj '/C=US/ST=Somewhere/L=Test/CN=localhost' \
-keyout server.key -out server.crt

ssl-better-default:
SSL should stay working, openssl ciphers -v 'value' should not contain
any weak suites (RC4, SEED, DES-CBC, EXP, NULL) and no non-authenticated
suites (ADH/AECDH).

--
marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2013-11-16 19:24:19 CREATE TABLE IF NOT EXISTS AS
Previous Message Haribabu kommi 2013-11-16 11:05:04 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])