Skip to content

Security Recommendations

Protect credentials, restrict network access, and control access to sensitive files.

The default configuration supports local demonstrations and development on a trusted intranet. If other hosts can reach the deployment, examine the credentials, network access, and sensitive files.

For production, also review the Security Model, Compliance, and Security Considerations.

Passwords

Pigsty publishes its default credentials in the source code and documentation. Do not use these credentials in production.

Run the configuration wizard with -g to generate random passwords:

./configure -g

The wizard replaces the built-in parameters and example credentials that it recognizes. It does not replace these credentials:

  • The pgBackRest cipher_pass.
  • Silo user passwords and selected example passwords in ha/safe.
  • Database, object-storage, or application credentials that you added yourself.

After generation, examine pigsty.yml. Replace every credential that the wizard did not change.

The wizard prints generated passwords to the terminal. Protect terminal records and automation logs that contain these passwords. See the Default Credentials Checklist for the complete scope.

Firewall

The default value of node_firewall_mode is zone. This mode trusts the intranet defined by node_firewall_intranet. It restricts access to ports from public networks.

PortServicePublic by Default
22SSHYes
80Nginx HTTPYes
443Nginx HTTPSYes
5432PostgreSQLNot in the base default; exposed additionally by the demo pigsty.yml

For production, normally remove port 5432 from the demonstration configuration. If applications require direct database access, permit only their source addresses. Apply these restrictions in the cloud security group, host firewall, and PostgreSQL HBA rules.

Make sure that the intranet definition matches your trusted network. The default RFC 1918 address ranges can include networks that you do not trust. Do not automatically trust office networks, container networks, or other tenant networks.

Files

These files and directories contain sensitive information:

File or directoryContents
pigsty.ymlSystem and application credentials, node definitions, and service configuration
files/pki/ca/ca.keyLocal CA private key
Administration account SSH private keyAccess credentials for managed nodes
files/pki/misc/*.keyClient-certificate private keys
/pg/tmp/pg-user-*.sqlSQL files with plaintext passwords from user creation

Restrict access to the administration node and configuration repository. Do not commit complete inventories or private keys to public repositories. Keep controlled backups of the CA private key and required configuration.

Was this page helpful?