diff mbox series

[bug#36191] gnu: postgres service: More secure defaultpermissions.

Message ID 20190613135037.10645-1-rob@vllmrt.net
State Accepted
Headers show
Series [bug#36191] gnu: postgres service: More secure defaultpermissions. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Robert Vollmert June 13, 2019, 1:50 p.m. UTC
This changes to 'peer' authentication for local socket connections,
and password-based authentication for local network connections.

* gnu/services/databases.scm (%default-postgres-hba): Change
authentication method.
---
 gnu/services/databases.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Ludovic Courtès June 25, 2019, 3:40 p.m. UTC | #1
Hello,

Robert Vollmert <rob@vllmrt.net> skribis:

> This changes to 'peer' authentication for local socket connections,
> and password-based authentication for local network connections.
>
> * gnu/services/databases.scm (%default-postgres-hba): Change
> authentication method.

That sounds reasonable to me.  Chris, WDYT?

Thanks,
Ludo’.
Giovanni Biscuolo June 26, 2019, 6:37 a.m. UTC | #2
Ludovic Courtès <ludo@gnu.org> writes:

> Robert Vollmert <rob@vllmrt.net> skribis:
>
>> This changes to 'peer' authentication for local socket connections,
>> and password-based authentication for local network connections.
>>
>> * gnu/services/databases.scm (%default-postgres-hba): Change
>> authentication method.
>
> That sounds reasonable to me.  Chris, WDYT?

It's very reasonable to have such default auth methods for PostgresSQL:
we should apply this patch

Thanks Robert!

[...]
Christopher Baines June 28, 2019, 10:25 p.m. UTC | #3
Ludovic Courtès <ludo@gnu.org> writes:

> Hello,
>
> Robert Vollmert <rob@vllmrt.net> skribis:
>
>> This changes to 'peer' authentication for local socket connections,
>> and password-based authentication for local network connections.
>>
>> * gnu/services/databases.scm (%default-postgres-hba): Change
>> authentication method.
>
> That sounds reasonable to me.  Chris, WDYT?

I'm definitely no authority on PostgreSQL authentication, but this
sounds sensible to me.
Ludovic Courtès July 2, 2019, 3:11 p.m. UTC | #4
Hello,

Giovanni Biscuolo <g@xelera.eu> skribis:

> It's very reasonable to have such default auth methods for PostgresSQL:
> we should apply this patch

Christopher Baines <mail@cbaines.net> skribis:

> I'm definitely no authority on PostgreSQL authentication, but this
> sounds sensible to me.

Alright, applied, thanks for your feedback!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 7113f1f2a1..ec31489d48 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -5,6 +5,7 @@ 
 ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -91,9 +92,9 @@ 
 (define %default-postgres-hba
   (plain-file "pg_hba.conf"
               "
-local	all	all			trust
-host	all	all	127.0.0.1/32 	trust
-host	all	all	::1/128 	trust"))
+local	all	all			peer
+host	all	all	127.0.0.1/32 	md5
+host	all	all	::1/128 	md5"))
 
 (define %default-postgres-ident
   (plain-file "pg_ident.conf"