Cis Azure Database 6.10
DevOps & Securitycis-azure-database-6.10Cis Azure Database 6.10 is an Agent Skill for devops & security published in the CyberStrikeus/CyberStrike repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Ensure server parameter 'require_secure_transport' is set to 'ON' for PostgreSQL server
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.10/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cis-azure-database-6-10, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
6.10 Ensure server parameter 'require_secure_transport' is set to 'ON' for PostgreSQL server (Automated)
Profile Applicability
- Level 1
Description
Enable require_secure_transport on PostgreSQL flexible servers.
Rationale
SSL connectivity helps to provide a new layer of security by connecting database server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between database server and client applications helps protect against "man in the middle" attacks by encrypting the data stream between the server and application.
Impact
None documented.
Audit Procedure
Audit from Azure Portal
- Login to Azure Portal using https://portal.azure.com.
- Go to
Azure Database for PostgreSQL servers. - For each server, under
Settings, clickServer parameters. - In the filter bar, type
require_secure_transport. - Ensure that the
VALUEforrequire_secure_transportis set toON.
Audit from Azure CLI
Ensure the below command returns a value of on:
az postgres flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name require_secure_transport
Audit from PowerShell
Ensure the below command returns a Value of on:
Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name require_secure_transport
Audit from Azure Policy
Policy ID: c29c38cb-74a7-4505-9a06-e588ab86620a
Name: 'Enforce SSL connection should be enabled for PostgreSQL flexible servers'
Expected Result
The require_secure_transport server parameter should be set to ON.
Remediation
Remediate from Azure Portal
- Login to Azure Portal using https://portal.azure.com.
- Go to
Azure Database for PostgreSQL servers. - For each server, under
Settings, clickServer parameters. - In the filter bar, type
require_secure_transport. - Set
VALUEforrequire_secure_transporttoON. - Click
Save.
Remediate from Azure CLI
Use the below command to enable require_secure_transport:
az postgres flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name require_secure_transport --value on
Remediate from PowerShell
Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name require_secure_transport -Value on
Default Value
By default, secure connectivity is enforced, but some application frameworks may not enable it during deployment.
References
- https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking-ssl-tls
- https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-connect-tls-ssl
- https://learn.microsoft.com/en-us/powershell/module/az.postgresql/get-azpostgresqlflexibleserverconfiguration
- https://learn.microsoft.com/en-us/powershell/module/az.postgresql/update-azpostgresqlflexibleserverconfiguration
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit
Profile
- Level 1