CompTIA DataSys+ (DS0-002) free question 8 / 10 · Domain 4: Data and Database Security
A security policy says database users must present a certificate when they log in over TLS. Where does the database let the DBA enforce that requirement?
- In the application code, through a query that reads the certificate
- In the main server settings, through the connection limit
- In the client access rules, through the certificate method or option
- In the table definition, through a check constraint on the user column
Show the answer and explanation
Answer: C
Why this is correct
The Using Client Certificates section says that to require a client certificate the server is given a CA file, and that there are two approaches to enforce that users provide a certificate during login. The first uses the cert authentication method for hostssl entries in pg_hba.conf, so the certificate itself is used for authentication, and the second uses the clientcert option on entries with another method. The source reads: "There are two approaches to enforce that users provide a certificate during login." The page continues: "The first approach makes use of the cert authentication method for hostssl entries in pg_hba.conf, such that the certificate itself is used for authentication while also providing ssl connection security." Source page: 18.9. Secure TCP/IP Connections with SSL, section "18.9.3. Using Client Certificates".
Why the other options are wrong
"In the main server settings, through the connection limit" … max_connections limits sessions and has nothing to do with certificates.
"In the table definition, through a check constraint on the user column" … Constraints validate row values. Login rules live in the client authentication file.
"In the application code, through a query that reads the certificate" … The server enforces authentication before a session exists, so it is configured on the server.
Key points
Client certificate requirements are set per rule in pg_hba.conf.