Skip to content

Commit b816d95

Browse files
authored
Remove upstream-breaking REVOKE CONNECT * FROM public
The default installation of Pg allows public to connect - given proper pg_hba entries. The REVOKE subltely breaks expected usage.
1 parent d4b252b commit b816d95

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

manifests/server/database.pp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
undef => '',
5353
default => "LC_COLLATE = '${locale}' LC_CTYPE = '${locale}'",
5454
}
55-
$public_revoke_privilege = 'CONNECT'
5655

5756
$template_option = $template ? {
5857
undef => '',
@@ -75,12 +74,6 @@
7574
require => Postgresql::Server::Instance::Service[$instance],
7675
}
7776

78-
# This will prevent users from connecting to the database unless they've been
79-
# granted privileges.
80-
~> postgresql_psql { "REVOKE ${public_revoke_privilege} ON DATABASE \"${dbname}\" FROM public":
81-
refreshonly => true,
82-
}
83-
8477
Postgresql_psql["CREATE DATABASE \"${dbname}\""]
8578
-> postgresql_psql { "UPDATE pg_database SET datistemplate = ${istemplate} WHERE datname = '${dbname}'":
8679
unless => "SELECT 1 FROM pg_database WHERE datname = '${dbname}' AND datistemplate = ${istemplate}",

0 commit comments

Comments
 (0)