Loading topic
psql as a superuser, edit files on a Linux server with sudo, and read basic SQL. You don't need to know the rule syntax yet. The next chapter covers it. Here you learn where the file lives, how to change it safely, and how to confirm that PostgreSQL is using your6 min read10.0.0.0/24. It also assumes you know the difference between a PostgreSQL role and a database. You should already know where pg_hba.conf lives and how to reload it. This chapter take7 min readpg_hba.conf record (type, database, user, address, method) and that you know CIDR notation. The first field of every record is the connection type. It decides which kinds of connections the rest of the record can match, so a wrong type is a common reason a5 min readpg_hba.conf record (type, database, user, address, method) and that you know basic CIDR notation. It covers how the server chooses one record for each incoming connection. Most surprising authentication behavior comes from this selection process, not from the me6 min readpg_hba.conf record (type, database, user, address, method), you know that the first matching rule wins, and you are comfortable with PostgreSQL roles and basic psql usage. Here you will learn what each common authentication method does, what it trusts, and how t7 min readpg_hba.conf rules and authentication methods. Here you will see what PostgreSQL keeps on disk when you give a role a password, and which setting controls its form. The next chapters build on th6 min readscram-sha-256. It assumes you know how pg_hba.conf rules select a method, how password_encryption controls what is stored in pg_authid, and what a hash function and an HMAC are at a basic le6 min readpg_hba.conf rules that require it. You will then confirm that the rules and the stored hashes agree.6 min readpg_hba.conf with the record format and first-match ordering from the earlier chapters. It also assumes you can run SQL as a superuser in psql. Here you will learn how a change reaches the running server and how to check it before and after it takes effect. Getti6 min readpg_hba.conf records, know that first match wins, and have used ALTER ROLE and psql. You should also know that password_encryption controls how new passwords are hashed. It covers moving existing roles from MD5 password hashes to SCRAM-SHA-256 verifiers witho6 min readpg_hba.conf record, know how first-match ordering works, and understand that SCRAM-SHA-256 is the password method you want. It also assumes you can edit postgresql.conf and restart a server. Here you add TLS (Transport Layer Security) on top of SCRAM, use `hos7 min readpg_hba.conf record, know that the first matching rule wins, and have set up SCRAM passwords as in the earlier chapters. You also need shell access to the server, or at least permission to read its log. It teaches a repeatable way to diagnose a failed connection,6 min readpg_hba.conf record, you know first-match-wins ordering, and you know what peer and cert authentication do. You should also be able to reload the server and query pg_hba_file_rules. Earlier chapters covered all of these.6 min readpg_hba.conf records and know that the first matching rule wins. It also assumes you have met password_encryption, SCRAM-SHA-256, and pg_hba_file_rules. Each item below names a risk, a way to check for it, a6 min read