PostgreSQL for ISO 27001 Annex A controls

PostgreSQL can supply configuration and records for several ISO/IEC 27001:2022 Annex A controls, but the ISMS, risk decisions and certification remain with your organization and a certification body. This page shows which parts map to which controls.

On this page

How PostgreSQL supports ISO 27001 Annex A controls

If your PostgreSQL estate sits inside an ISO/IEC 27001:2022 scope, PostgreSQL can supply configuration and records for several technological controls, but it does not make your organization compliant or certified. ISO does not certify organizations; accredited certification bodies do that, and they assess the whole information security management system, not a database. Annex A is normative and lists 93 controls in four themes taken from ISO/IEC 27002:2022: organizational controls (37), people controls (8), physical controls (14) and technological controls (34). This page covers the database-facing parts of access rights, authentication, logging, backup and cryptography. It does not cover organizational policy, supplier governance, people controls or physical controls, which sit with your policies, HR processes and data center operators.

Start by mapping each control you claim to the PostgreSQL setting, role or process that evidences it. For access rights, that means group roles, the privileges granted to them and the review records that show who holds them. For authentication, the relevant question is which methods your pg_hba.conf permits, whether MD5 password authentication is disabled in favor of SCRAM, and whether your identity provider handles administrator sign-in. PostgreSQL documents methods such as GSSAPI, LDAP, certificate and OAuth, and the right choice depends on the directory you already run. Confirm the method list against the PostgreSQL client authentication documentation for the exact major version you run, because support differs between releases.

Logging, backup and cryptography need the same discipline. Auditors ask for evidence that logs are produced, protected and retained, so decide where connection and statement logs go, who can alter them and how long they are kept. For backup, a configured schedule is not enough: keep the records of restore tests and the recovery time measured in them. For cryptography, confirm TLS settings for client connections and how encryption at rest is provided at the storage or operating system layer, since PostgreSQL itself does not encrypt data files. Ask your certification body early which evidence they expect for each control, and confirm the edition and transition status of your certificate under IAF MD 26:2023 before you scope the work.

Mapping Annex A technological controls to PostgreSQL capabilities

This table maps the Annex A technological control areas that usually touch PostgreSQL to the configuration that addresses each one, with the record an assessor is likely to ask for. Read each row as a starting design, then confirm the control wording and scope with your certification body and your own environment.

Control area (Annex A, clause 8)PostgreSQL configurationEvidence to keep
Access rights and privileged accessUse pg_hba.conf to limit which hosts, users and databases may connect. Grant privileges through group roles, with named login roles for each person and no shared superuser accounts.Exported pg_hba.conf under change control, role and grant listings, and periodic access review sign-off
AuthenticationUse SCRAM-SHA-256 password hashing, since MD5 password authentication is deprecated in PostgreSQL 18. Where the identity provider is the source of truth, consider GSSAPI, LDAP, or certificate authentication, and confirm which method your identity platform supports.pg_hba.conf entries, password encryption setting, and the directory or certificate mapping used for each account
Secure logon and session limitsSet connection limits per role and database, and set idle session timeouts where your workload allows. Use a pooler such as PgBouncer to control client connection counts, and confirm its current release before deployment.Role connection limits, timeout settings, and pooler configuration files
Logging and monitoringEnable server logging for connections, disconnections and failed authentication, and add pgAudit for statement-level activity on sensitive schemas. Ship logs to a store the database administrators cannot edit.Logging configuration, sample log entries showing timestamp, user and client address, and log retention settings
Information backupTake base backups, archive WAL continuously for point-in-time recovery, and use incremental backups with pg_combinebackup where the backup volume justifies it. Store copies separately from the primary.Backup schedule, archive command status, and dated restore test records showing the recovered database was checked
Cryptography and key managementRequire TLS for client connections (hostssl entries in pg_hba.conf) and certificates signed by your internal CA. Keep private keys outside the data directory, and document how encryption at rest is provided by the storage layer.Certificate inventory, hostssl rules, key storage location, and key rotation records
Secure configurationRestrict file permissions on the data directory and configuration files, disable unused extensions, and pin the PostgreSQL version to a supported release. Plan major upgrades before the current version leaves support.Configuration baseline, installed version and support end date, and upgrade plan with change records

Configuring access rights and authentication for auditable PostgreSQL

Start by making every connection path answerable to a named person or service. In PostgreSQL, the pg_hba.conf file decides which hosts, databases and roles may connect and which authentication method each rule uses, so a reviewer can read that file and trace who is allowed in. Keep the rules short, put the most specific entries first, and remove any broad rule that lets a whole subnet or the all keyword reach production databases. Pair the file with role design: use individual login roles for people, separate roles for applications, and group roles that carry privileges, so that an access review can compare each login against the directory and the privilege it holds. Keep the pg_hba.conf file, role definitions and the change history under version control so the evidence for ISO/IEC 27001 Annex A access control points at a single source.

Choose the authentication method with the identity source the organization already reviews. PostgreSQL documents password, GSSAPI, SSPI, LDAP, RADIUS, certificate, PAM and OAuth methods, and the right choice depends on where accounts are created, disabled and recertified. Directory-backed methods let a leaver's access be removed at the source, while certificate authentication moves identity into a certificate lifecycle that must also be managed. PostgreSQL 18 deprecated MD5 password authentication in favor of SCRAM, so any remaining md5 entries are a finding to plan out, and the scram-sha-256 method should be the baseline for password logins. Whether an identity provider or directory integration is appropriate is a decision to confirm against your own directory, joiner and leaver process and periodic access review cadence, not something this page can settle for you. Ask your team to document which method applies to each role class and how that method's accounts are reviewed.

Evidence an auditor expects for each database control

Each ISO/IEC 27001:2022 Annex A control on a PostgreSQL estate leaves a trail. The cards below cover the records that usually connect access, authentication, logging, backup, cryptography and change control, and how to keep them current. Confirm the format and sampling expectations with your certification body before the audit window opens.

Role and privilege inventories

A dated export of every login role, group membership, and object privilege across clusters, showing who can connect and what each role can change. Auditors use it to test whether access rights match the approved access model and whether privileged roles are limited to named administrators. Generate it from the catalog with a scripted query, store it under version control or a write-once location, and record who reviewed it and which exceptions were removed. Compare each review against the previous one so that unexplained additions stand out.

Authentication configuration history

The current pg_hba.conf and related settings such as password_encryption, together with the commit history showing every change, author and approval. The record shows which methods, networks and databases are allowed and that weak methods were retired. Keep the file under change control, deploy it from the repository, and confirm that the running server matches the committed file. Note that PostgreSQL 18 deprecated MD5 password authentication in favor of SCRAM, so older entries deserve review.

Authentication methods docs

Authentication and privileged activity logs

Server log and audit extension output recording login attempts, failures, role changes, and DDL or privileged statements performed by administrators. These entries show that access is attributable to individuals and that failed attempts were noticed. Decide which events are logged before go-live, ship logs to storage outside the database host, and define a retention period and a periodic review that produces a signed record. Test that a sample login and a sample privilege change both appear in the central store.

Backup job records and restore test results

Scheduler output for each base backup and archived WAL segment, plus a dated record of restore tests that prove the copy can be recovered to a chosen point in time. Auditors look for evidence that backups run, that failures are alerted and resolved, and that restores were actually performed. Keep the restore test write-up with the recovered row counts, the target time, the measured duration, and the person who signed off. Point-in-time recovery depends on archived WAL, so retain those logs for as long as the backup set is kept.

Continuous archiving docs

TLS configuration and certificate inventory

The ssl settings in postgresql.conf, the hostssl rules in pg_hba.conf, and an inventory of every server and client certificate with its issuer, subject, and expiry date. This shows that data in transit is encrypted and that certificates are tracked for renewal and revocation. Record the TLS protocol versions and cipher policy in use, document where private keys are stored, and capture a scan of each endpoint on a schedule. Confirm with your certificate authority and your cryptography policy which algorithms are approved.

Change records for schema and upgrade work

Tickets, merge requests, and deployment logs for schema migrations, extension changes, minor restarts, and major version upgrades. Each entry should link the change to a request, a tested rollback path, the approver, and the result. Major upgrades need their own record covering the upgrade method, the rehearsal in a non-production copy, and the post-upgrade checks. Support lifecycle dates matter here, because a database on an unsupported major version has no vendor security fixes, so track the end-of-support date for each cluster.

Logging and backup records by environment

The production primary is where user activity happens, so it is the main source of access and change records. Server logging, connection and authentication logging, and configuration files define what is recorded and where it is kept. The primary also generates the write-ahead log (WAL) that point-in-time recovery depends on, so its archiving settings are part of the recovery control as well as the logging control.

  • Server logs: Set the logging destination, rotation and retention in postgresql.conf so that connection, authentication and error events are written somewhere the security team can read. Confirm the exact settings for your PostgreSQL version in the server documentation.
  • Authentication records: Keep pg_hba.conf under version control so that each change to who can connect, and by which method, has a reviewable history.
  • Archive settings: Enable archive_mode and archive_command (or an equivalent archive tool) so every completed WAL segment is copied off the server.
  • Base backup records: Record the time, label and destination of each base backup taken with pg_basebackup, along with its success or failure.
  • Privileged activity: Where the organization needs object-level or statement-level records, decide whether pgAudit or a similar extension is in scope, and state that decision in the control narrative.

Check that the log files, WAL archive and backup catalog are all retained for the period your control design states, and that someone can produce them on request.

What PostgreSQL and the implementation do not cover

A PostgreSQL deployment can support many Annex A controls, but it does not make an organization conform to ISO/IEC 27001:2022. The cards below cover the parts of the ISMS, the people and physical controls, the certification process and the technical gaps that remain with your team or other tools.

The ISMS itself

The standard requires an information security management system built around a defined scope, a risk assessment and risk treatment, a Statement of Applicability that justifies which Annex A controls apply, and management review. A database cannot write these records for you. Confirm who owns the scope decision, which databases fall inside it, and how the Statement of Applicability references the PostgreSQL controls you implement.

ISO/IEC 27001 page

Organizational and people controls

Many Annex A controls in the organizational and people themes cover policies, roles, onboarding and offboarding, awareness training and supplier relationships. Your database team may run the access model, but the HR process that removes a leaver's account and the policy that defines who may request a production role sit outside PostgreSQL. Ask who signs off role requests and how departures reach the database administrators.

Physical controls

Physical controls cover the premises, equipment siting, secure disposal and off-site storage of media. If PostgreSQL runs in a data center, a cloud region or a colocated rack, the provider's physical security evidence and your disposal records for retired disks and backup media need to be collected. Confirm which of these the hosting contract covers and which fall to your own facilities team.

The certification audit

Only an accredited certification body can issue an ISO/IEC 27001 certificate, and the ISMS must run for a period before the audit can test it. Your PostgreSQL records give the auditor evidence to sample, but the auditor decides conformity. Check that the certification body you choose is accredited for ISO/IEC 27001:2022 and that its certificate can be verified in the IAF CertSearch database.

ISO certification page

Automatic failover

PostgreSQL provides hot standbys and synchronous or asynchronous replication, but it does not detect a failed primary or promote a standby on its own. Automatic failover requires an external tool, and that tool becomes part of your availability and change records. Confirm which tool you use, how its promotion events are logged, and how the recovery time it achieves is documented for the auditor.

PostgreSQL failover docs

Detailed audit log content

PostgreSQL's built-in logging records connections and errors, but capturing which statements each user ran on sensitive tables often needs an extension such as pgAudit. Decide which events the logging control must capture, where the entries go and how long they are kept before the design is built. Confirm the extension and its version against your PostgreSQL major version during design, not after the first audit sample is requested.

Configuration sequence for an ISO 27001 database scope

This sequence turns a PostgreSQL estate into a set of controlled, evidenced database records that an ISMS auditor can sample against Annex A. Each step closes with a record the organization can produce on request, so the work is done in the order the evidence depends on.

  1. Define the database scope within the ISMS

    Start by listing every PostgreSQL cluster that holds or processes information within the ISMS scope, including primaries, standbys, backup repositories, pooler hosts and administrative workstations. Assign each cluster an owner and classify the data it holds against your own information classification scheme. Confirm which clusters are in scope with your certification body before configuration begins, because the boundary drives every later record. The output is a scope statement and an asset inventory entry for each cluster, linked to the risk assessment that justifies it.

  2. Set up roles and authentication

    Create named database roles tied to individual people or defined service accounts, and remove shared logins and default superuser use for daily work. Use SCRAM password authentication, and where your identity provider can issue credentials for administrators, document how those credentials are used for database access. Restrict entries in pg_hba.conf to the networks and methods you have approved. The closing record is an exported role list, the pg_hba.conf file under version control, and an approval for each privileged role.

  3. Enable and retain database logs

    Configure PostgreSQL logging for connections, disconnections, authentication failures, privilege changes and the DDL and role events your risk assessment selects, then decide whether pgAudit or another extension is needed for object-level activity. Forward logs to a store that the database administrators cannot silently edit, and set a retention period defined by your own policy. Test by generating a failed login and a role change, then confirming both appear in the central store. The record is a logging standard, a sample of retained entries, and the retention setting approved by the owner.

  4. Decide encryption in transit and at rest

    Require TLS for client and replication connections, and decide whether the server certificates come from your internal CA or a public one. Record the decision for storage encryption, whether at the volume, filesystem or backup layer, and where the keys live, since the key store is itself a controlled asset. Confirm how backups and archived WAL files are protected, because they hold the same data as the live cluster. The records are the TLS configuration, the cryptography decision with its rationale, and the key custody procedure.

  5. Configure backup and prove restore

    Set up base backups and continuous WAL archiving to a location separate from the primary, and document the recovery point your business owners accept. Run a point-in-time restore into a non-production environment on a schedule your policy sets, and record the start and end times, the target time used and the data checks performed afterward. Keep the restore log and any failures with their corrective actions. The auditor will ask for the most recent successful restore record, not the backup job history alone.

  6. Plan upgrades within supported versions

    Record the PostgreSQL major version in production against the published support dates, and confirm that it is still in the supported range at each review. Plan minor updates as change requests with a test on a copy before production, since minor releases do not change the storage format and only require replacing executables and a restart. For major upgrades, document the chosen method, pg_upgrade or logical replication, and the rollback plan. The records are the version register, change tickets for each update, and test evidence before each change.

  7. Assemble the evidence register

    Build a single register that maps each Annex A control you claim for the database to the records it relies on: role reviews, pg_hba.conf history, log samples, TLS settings, restore test logs, upgrade change tickets and asset entries. Assign an owner and review date to each record, and state where it is stored. Ask your certification body which evidence format they accept before the audit window opens. The register is complete when a reviewer can pick any control and find its evidence without asking the database team.

Questions buyers ask about PostgreSQL and ISO 27001

Does running PostgreSQL make an organization ISO 27001 certified?

No. PostgreSQL is software, and it cannot make an organization certified. ISO does not certify organizations either. Accredited certification bodies audit the whole information security management system against ISO/IEC 27001:2022, including people, processes, suppliers and physical controls, and they issue the certificate. A well-configured database supplies evidence for some Annex A controls, but the organization still needs its own policies, risk assessment, statement of applicability and records. Ask your certification body which evidence it expects for database-related controls before you build anything.

How long does mapping a PostgreSQL estate to Annex A take, and what drives it?

No fixed duration applies, because the effort depends on the estate. The main drivers are the number of database clusters and databases, how many of them hold regulated or sensitive data, whether authentication, logging and backup are already documented, how many teams administer the systems, and where the certification scope ends. A single cluster with existing runbooks is a much smaller exercise than a fleet across several environments. Ask any provider for a written scope listing the systems, controls and records covered, and a timeline tied to that list. Your certification body's audit cycle also sets deadlines: under ISO/IEC 17021-1, a management system certification cycle lasts three years, with at least one audit in every calendar year.

What does the work need from our team?

The mapping depends on access and decisions from your side. Expect to provide read access to database configuration, authentication rules, logging settings, backup jobs and restore records, plus access to the identity provider where database logins are managed. You also need named control owners who can explain how each control operates in practice, and an accountable person who signs off risk treatment decisions, such as accepting a gap or choosing a compensating control. Without those owners, the records will describe what the team intended rather than what happens. Agree these responsibilities in the written scope before work starts.

Can our in-house team map PostgreSQL to ISO 27001 without a partner?

Often yes, if the team already knows the standard and the database well. The work needs someone who can read the Annex A controls, which are normative and grouped into organizational, people, physical and technological themes, and translate them into database settings and evidence. ISO/IEC 27002:2022 gives guidance on each control, and it is a useful reference for the mapping itself, though it cannot be certified to. Check whether your team has capacity to keep records current between audits, since the evidence must reflect how systems run over time, not only on the day of the review.

Which Annex A controls sit outside the database?

Many of the controls that auditors test most closely are outside PostgreSQL. Organizational controls cover policies, supplier relationships, asset inventory, incident management and risk treatment. People controls cover screening, awareness training and responsibilities at termination. Physical controls cover the data center or cloud facility, equipment disposal and secure areas. Technological controls that sit around the database include endpoint protection, network segmentation, vulnerability management, change management for the operating system and secure development. The database mapping feeds these controls but does not replace them, so the statement of applicability must reflect the whole estate.

Which database records should we expect an auditor to ask for?

Auditors usually ask for records that show a control works over time, not only its design. For access rights, expect role lists, privilege reviews and evidence of periodic access reviews. For authentication, expect the pg_hba.conf rules, the password or certificate policy, and the identity provider configuration. For logging, expect audit log settings and samples of retained entries with a documented retention period. For backup and cryptography, expect backup schedules, restore test results and TLS configuration. Confirm the exact sample sizes and evidence formats with your certification body, because they vary by auditor and scope.

Does the PostgreSQL version affect the audit?

Yes, the version affects both security and evidence. PostgreSQL supports each major version for 5 years after its initial release, and 13 and earlier are unsupported. Supported versions listed in the PostgreSQL versioning policy run to different dates, with version 14 ending November 12, 2026. Auditors often ask whether vulnerable or unsupported software is still in use, so a documented upgrade plan is part of the evidence. Confirm the support dates against the PostgreSQL versioning policy when you set your plan.

What to ask your certification body before the audit

Before the audit starts, ask your certification body which evidence formats it accepts and how it samples. The certification body, not ISO, certifies your organization. Accredited ISMS certification bodies work to ISO/IEC 17021-1:2015 together with ISO/IEC 27006-1:2024, and IAF MD 29:2024 required them to apply that combination to all clients by 31 March 2026. Confirm that your body has made that transition and ask how it applies the requirements to a database-heavy scope such as your PostgreSQL estate.

Plan around the certification cycle. Under ISO/IEC 17021-1, a management system certification cycle lasts three years, and the body must carry out at least one audit, either surveillance or recertification, in every calendar year. Ask for the dates of the planned audits in each year, and ask which of your Annex A evidence items (role reviews, backup restore tests, log samples and change records for pg_hba.conf and schema migrations) the auditor expects to see at each visit. Ask whether sampling is done by system, by role, by time period or by a mix, and whether the auditor will review PostgreSQL logs directly or only exported summaries.

Verify the certificate before you rely on it. Check the certificate holder and its scope through the IAF CertSearch database, which ISO still points to for accredited certificates, even though Global ACI has taken over the roles of the IAF and ILAC since 1 January 2026. Ask your body to confirm in writing which ISO/IEC 27001:2022 Annex A controls and which PostgreSQL hosts fall inside the scope statement. Treat any statement that a certificate is guaranteed or that a particular outcome is assured as a warning sign, since accredited bodies decide the result only after the audit.

How DeployOpen scopes and delivers ISO 27001 database evidence

DeployOpen plans, implements, hardens, documents and supports self-hosted PostgreSQL inside your own infrastructure, so the access rights, authentication, logging, backup and cryptography settings are built to be reviewed. We prepare the systems, controls and evidence for your assessment, while the certification body performs the audit and issues any certificate.

How we scope

  • Engagements are fixed-scope, with the database inventory, Annex A controls and deliverables agreed in writing before work starts.
  • The written scope lists which PostgreSQL clusters, environments and backup targets fall inside the ISMS boundary.
  • Confirm with your certification body which control evidence it will sample, so the scope matches what the auditor will ask for.

How we build

  • Role design maps named administrators and application accounts to documented access rights, with privileged access separated from daily use.
  • Authentication settings, TLS configuration and audit logging are set in configuration files and tested against the agreed control mapping.
  • Backup and point-in-time recovery are configured, then restores are run and recorded so the evidence shows the process actually works.

How we hand over

  • Deliverables include a control-to-evidence map that names the configuration, log or test record behind each database-related Annex A control.
  • Runbooks cover access reviews, restore tests, major version upgrades and change handling for schema and configuration changes.
  • Handover sessions walk your security, compliance and platform teams through where each record is kept and how to produce it on request.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, so evidence stays current between assessment cycles.
  • Retainer work can refresh the control-to-evidence map when PostgreSQL versions, backup tooling or access models change.
  • Confirm with your organization which evidence owners are responsible for each record, since DeployOpen supports but does not replace internal ownership.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.