Permalink
Browse files

[COOK-2163] - remove "helpful" commentary per David

  • Loading branch information...
1 parent 561f91d commit 605877049c1abf259b317a535fb8b2d3871872aa @jtimberman jtimberman committed Feb 22, 2013
Showing with 1 addition and 147 deletions.
  1. +1 −147 templates/default/pg_hba.conf.erb
View
148 templates/default/pg_hba.conf.erb
@@ -4,114 +4,7 @@
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
-# documentation for a complete description of this file. A short
-# synopsis follows.
-#
-# This file controls: which hosts are allowed to connect, how clients
-# are authenticated, which PostgreSQL user names they can use, which
-# databases they can access. Records take one of these forms:
-#
-# local DATABASE USER METHOD [OPTIONS]
-<% if node['postgresql']['version'].to_f < 9.1 -%>
-# host DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
-# hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
-# hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
-<% elsif node['postgresql']['version'].to_f >= 9.1 -%>
-# host DATABASE USER ADDRESS METHOD [OPTIONS]
-# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
-# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
-<% end -%>
-#
-# (The uppercase items must be replaced by actual values.)
-#
-# The first field is the connection type: "local" is a Unix-domain
-# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
-# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
-# plain TCP/IP socket.
-#
-<% if node['postgresql']['version'].to_f < 9.0 -%>
-# DATABASE can be "all", "sameuser", "samerole", a
-<% elsif node['postgresql']['version'].to_f >= 9.0 -%>
-# DATABASE can be "all", "sameuser", "samerole", "replication", a
-<% end -%>
-<% if node['postgresql']['version'].to_f < 9.1 -%>
-# database name, or a comma-separated list thereof.
-<% elsif node['postgresql']['version'].to_f >= 9.1 -%>
-# database name, or a comma-separated list thereof. The "all"
-# keyword does not match "replication". Access to replication
-# must be enabled in a separate record (see example below).
-<% end -%>
-#
-# USER can be "all", a user name, a group name prefixed with "+", or a
-# comma-separated list thereof. In both the DATABASE and USER fields
-# you can also write a file name prefixed with "@" to include names
-# from a separate file.
-#
-<% if node['postgresql']['version'].to_f < 9.1 -%>
-# CIDR-ADDRESS specifies the set of hosts the record matches.
-# It is made up of an IP address and a CIDR mask that is
-<% elsif node['postgresql']['version'].to_f >= 9.1 -%>
-# ADDRESS specifies the set of hosts the record matches. It can be a
-# host name, or it is made up of an IP address and a CIDR mask that is
-<% end -%>
-# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
-<% if node['postgresql']['version'].to_f < 9.1 -%>
-# specifies the number of significant bits in the mask.
-<% elsif node['postgresql']['version'].to_f >= 9.1 -%>
-# specifies the number of significant bits in the mask. A host name
-# that starts with a dot (.) matches a suffix of the actual host name.
-<% end -%>
-# Alternatively, you can write an IP address and netmask in separate
-<% if node['postgresql']['version'].to_f < 9.0 -%>
-# columns to specify the set of hosts.
-<% elsif node['postgresql']['version'].to_f >= 9.0 -%>
-# columns to specify the set of hosts. Instead of a CIDR-address, you
-# can write "samehost" to match any of the server's own IP addresses,
-# or "samenet" to match any address in any subnet that the server is
-# directly connected to.
-<% end -%>
-#
-# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
-<% if node['postgresql']['version'].to_f < 9.0 -%>
-# "krb5", "ident", "pam", "ldap" or "cert". Note that
-<% elsif node['postgresql']['version'].to_f < 9.1 -%>
-# "krb5", "ident", "pam", "ldap", "radius" or "cert". Note that
-<% elsif node['postgresql']['version'].to_f >= 9.1 -%>
-# "krb5", "ident", "peer", "pam", "ldap", "radius" or "cert". Note that
-<% end -%>
-# "password" sends passwords in clear text; "md5" is preferred since
-# it sends encrypted passwords.
-#
-# OPTIONS are a set of options for the authentication in the format
-# NAME=VALUE. The available options depend on the different
-# authentication methods -- refer to the "Client Authentication"
-# section in the documentation for a list of which options are
-# available for which authentication methods.
-#
-# Database and user names containing spaces, commas, quotes and other
-# special characters must be quoted. Quoting one of the keywords
-<% if node['postgresql']['version'].to_f < 9.0 -%>
-# "all", "sameuser" or "samerole" makes the name lose
-<% elsif node['postgresql']['version'].to_f >= 9.0 -%>
-# "all", "sameuser", "samerole" or "replication" makes the name lose
-<% end -%>
-# its special character, and just match a database or username with
-# that name.
-#
-# This file is read on server startup and when the postmaster receives
-# a SIGHUP signal. If you edit the file on a running system, you have
-# to SIGHUP the postmaster for the changes to take effect. You can
-# use "pg_ctl reload" to do that.
-
-# Put your actual configuration here
-# ----------------------------------
-#
-# If you want to allow non-local connections, you need to add more
-# "host" records. In that case you will also need to make PostgreSQL
-# listen on a non-local interface via the listen_addresses
-# configuration parameter, or via the -i or -h command line switches.
-
-
+# documentation for a complete description of this file.
<% if node['postgresql']['version'].to_f < 9.1 -%>
# TYPE DATABASE USER CIDR-ADDRESS METHOD
@@ -125,45 +18,6 @@ local all all ident
<% elsif node['postgresql']['version'].to_f >= 9.1 -%>
local all all peer
<% end -%>
-# IPv4 local connections:
-#host all all 127.0.0.1/32 ident
-# IPv6 local connections:
-#host all all ::1/128 ident
-<% if node['postgresql']['version'].to_f >= 9.1 -%>
-# Allow replication connections from localhost, by a user with the
-# replication privilege.
-#local replication postgres peer
-#host replication postgres 127.0.0.1/32 ident
-#host replication postgres ::1/128 ident
-<% end -%>
-
-###########
-# The preceeding rule for local login by Unix-domain socket connections
-# was in the pg_hba.conf released by the Postgres Development Group.
-# It was left here as a hard-coded authentication configuration since
-# it is needed by the chef postgresql cookbook recipes.
-#
-# Effectively, it lets postgresql rely on OS account authentication.
-# It allows an OS user to login as the same-named postgresql database
-# user without a password challenge via the Unix-domain socket, but only
-# for same host/no network connections.
-#
-# Specifically, this allows the 'postgres' user to run the psql command
-# on the local host with no -h hostname, with no password. This allows
-# chef recipes to build resources such as the following:
-#
-# bash "some-database-administration-task" do
-# user 'postgres'
-# code <<-EOH
-# echo "-- put sql statement here" | psql
-# EOH
-# action :run
-# end
-#
-# Note that the chef cookbook cannot use the md5 method (password),
-# since chef only has the encrypted password through a node attribute
-# and the plain text password cannot be derived.
-###########
###########
# Other authentication configurations taken from chef node defaults:

0 comments on commit 6058770

Please sign in to comment.