๐ก๏ธ Cloud Security
Cloud Security Best Practices are a set of principles and controls used to protect cloud-hosted applications, data, identities, and infrastructure from cyber threats. Modern cloud security is built around the concepts of Zero Trust, least privilege, continuous monitoring, and defence in depth.
According to NIST, organisations should focus on understanding cloud security responsibilities, managing risk, and implementing controls that protect data, applications, and infrastructure.
NIST - Cloud Security | NIST Guidelines on Security and Privacy
Microsoftโs Well-Architected Framework highlights identity protection, infrastructure security, data protection, governance, and incident response as key security areas.
Microsoftโs Well-Architected Framework - Security overview | Security design principles
1. Adopt a Zero Trust Security Model
Section titled โ1. Adopt a Zero Trust Security ModelโNever automatically trust any user, device, or service. In other words, never assume that a user, device, or workload is trustworthy simply because it is inside your network.
Best practices:
- Verify explicitly every access request.
- Enforce least-privilege permissions.
- Continuously validate identity and device health.
- Assume breach and limit the impact of a compromise.
- Segment applications and services to limit lateral movement.
This approach reduces the likelihood of attackers moving freely inside your environment.
Example:
- A developer should only have access to development resources, not production databases.
2. Strengthen Identity and Access Management (IAM)
Section titled โ2. Strengthen Identity and Access Management (IAM)โIdentity is the new security perimeter in cloud environments.
Best practices:
- Enable Multi-Factor Authentication (MFA) for all users.
- Enforce strong password policies.
- Use Role-Based Access Control (RBAC).
- Apply the principle of least privilege.
- Grant only the permissions users actually need.
- Regularly review and remove unused accounts and permissions.
- Use Privileged Identity Management (PIM) for administrative accounts.
Microsoft identifies identity and access management as the foundation of secure cloud computing.
Common mistake:
- Granting users โOwnerโ or โAdministratorโ permissions when only read access is required.
3. Apply the Principle of Least Privilege
Section titled โ3. Apply the Principle of Least PrivilegeโUsers, applications, and services should have only the minimum permissions required.
Examples:
- Developers should not have production administrator rights.
- Applications should access only the databases they need.
- Temporary elevation should be used for administrative tasks.
Benefits:
- Reduces attack surface.
- Limits damage from compromised accounts.
4. Protect / Encrypt Data Everywhere
Section titled โ4. Protect / Encrypt Data EverywhereโProtect data both when it is stored and when it is transmitted.
Best practices:
- Encrypt data at rest.
- Encrypt data in transit using TLS.
- Use customer-managed encryption keys when appropriate.
- Rotate encryption keys regularly.
Areas to secure:
- Databases
- Object storage
- Backups
- Application secrets
Data must be protected:
At Rest
Section titled โAt RestโEncrypt stored data using strong encryption algorithms.
In Transit
Section titled โIn TransitโUse:
- HTTPS
- TLS
- VPNs
- Private connectivity where appropriate
Protect sensitive processing environments and credentials.
Data encryption, classification, and retention policies are specifically recommended cloud security controls.
5. Secure Network Architecture
Section titled โ5. Secure Network ArchitectureโEven in the cloud, network security remains important.
Best practices:
- Use private endpoints.
- Restrict public exposure.
- Implement Web Application Firewalls (WAF).
- Use DDoS protection services.
- Separate environments:
- Development
- Test
- Staging
- Production
Use multiple layers of network protection:
- Firewalls
- Network segmentation
- Private subnets
- DDoS protection
- Web Application Firewalls (WAF)
- Network Security Groups
A compromised system should not automatically gain access to the entire network.
Example architecture:
Internet | VWAF |Load Balancer |Application Tier |Private Database6. Secure the CI/CD Pipeline
Section titled โ6. Secure the CI/CD PipelineโModern attacks increasingly target build systems.
Best practices:
- Sign application artefacts.
- Scan dependencies.
- Scan container images.
- Protect build agents.
- Restrict access to deployment pipelines.
For DevSecOps:
- SAST (Static Application Security Testing)
- DAST (Dynamic Application Security Testing)
- Dependency scanning
- Container scanning
7. Continuously Monitor and Log Activity
Section titled โ7. Continuously Monitor and Log ActivityโYou cannot protect what you cannot see.
Best practices:
- Enable centralised logging.
- Collect security events.
- Monitor access patterns.
- Create alerts for suspicious activities.
- Integrate logs into a SIEM platform.
Examples:
- Microsoft Sentinel
- Splunk
- Elastic Security
Monitor:
- Login attempts / Failed logins
- API calls
- Administrative actions
- Configuration changes
- Suspicious network traffic
- Privilege escalation
- Data exfiltration attempts
Maintain:
- Centralized logging
- Security alerts
- Security Information and Event Management (SIEM)
Monitoring and logging are core security governance recommendations.
8. Implement Continuous Vulnerability Management
Section titled โ8. Implement Continuous Vulnerability ManagementโKeep Systems Updated. Cloud environments change constantly.
Best practices:
- Scan containers regularly.
- Patch operating systems promptly.
- Patch application frameworks and libraries.
- Maintain an accurate asset inventory.
- Prioritise critical vulnerabilities.
- Remove unsupported software
Do not rely solely on annual penetration tests.
Many breaches occur because known vulnerabilities remain unpatched.
9. Protect Secrets and Credentials
Section titled โ9. Protect Secrets and CredentialsโHardcoded credentials remain one of the most common cloud security weaknesses.
Best practices:
- Store secrets in:
- Azure Key Vault
- AWS Secrets Manager
- Google Secret Manager
- Rotate secrets automatically.
- Use Managed Identities whenever possible.
- Avoid storing credentials in source control.
Never store secrets in:
- Source code
- Configuration files
- Public repositories
Use:
- Secret management services
- Managed identities
- Key vaults
- Credential rotation policies
Bad:
string password = "SuperSecret123";Better:
string password = await keyVault.GetSecretAsync("DatabasePassword");10. Establish Backup and Disaster Recovery Plans
Section titled โ10. Establish Backup and Disaster Recovery PlansโBackups are part of security.
Prepare for:
- Ransomware attacks
- Data corruption
- Accidental deletion
- Regional outages
Best practices:
-
Follow the 3-2-1 backup strategy.
-
Encrypt backups.
-
Store backups separately.
-
Automated backups
-
Geographic replication
-
Regular recovery testing - Test restoration procedures regularly
-
Defined Recovery Time Objectives (RTO)
Many organisations discover recovery issues only after a real incident.
11. Automate Security Compliance
Section titled โ11. Automate Security ComplianceโUse Infrastructure as Code (IaC) Securely.
Security should be built into deployment pipelines.
Best practices:
- Use Infrastructure as Code (IaC).
- Scan infrastructure before deployment.
- Enforce security policies automatically.
- Prevent non-compliant resources from being created.
Tools:
- Terraform
- Bicep
- AWS CloudFormation
- Azure Policy
For cloud platforms such as Azure, AWS, and Google Cloud:
- Store infrastructure definitions in source control.
- Scan templates for security issues.
- Review changes through pull requests.
- Automate security checks in CI/CD pipelines.
12. Perform Regular Security Assessments
Section titled โ12. Perform Regular Security AssessmentsโConduct:
- Vulnerability scanning
- Penetration testing
- Compliance audits
- Security architecture reviews
Security should be treated as a continuous improvement process, not a one-time project.
13. Prepare an Incident Response Plan
Section titled โ13. Prepare an Incident Response PlanโSecurity incidents are not a matter of if, but when.
Best practices:
- Create incident response playbooks.
- Detection procedures
- Communication plans
- Define escalation paths.
- Recovery steps
- Practice tabletop exercises.
- Automate containment where possible.
- Maintain forensic logging.
- Post-incident reviews
Example incidents:
- Credential theft
- Ransomware
- Data breach
- Misconfigured storage account
Organisations should regularly test and improve their incident response plans.
14. Understand the Shared Responsibility Model
Section titled โ14. Understand the Shared Responsibility ModelโOne of the most important cloud security concepts is that security responsibilities are shared between the cloud provider and the customer. NIST highlights the importance of understanding these responsibilities when moving data and services to the cloud.
Typical responsibility:
| Area | Cloud Provider | Customer |
|---|---|---|
| Physical Datacentres | โ | |
| Hardware | โ | |
| Operating Systems (PaaS) | โ | |
| Applications | โ | |
| User Accounts | โ | |
| Data | โ | |
| Permissions | โ |
A Practical Cloud Security Checklist
Section titled โA Practical Cloud Security Checklistโโ MFA enforced everywhere
โ Implement Zero Trust
โ Apply least-privilege access
โ Encrypt data at rest and in transit
โ Secure secrets and credentials (stored in a vault)
โ Centralised logging and monitoring
โ Automated compliance policies
โ CI/CD security scanning
โ Vulnerability management programme (Patch vulnerabilities quickly)
โ Incident response plan tested
โ Backups regularly restored and verified
โ Network segmentation implemented
โ Monitor and log continuously (Continuously assess and improve security)
โ Shared responsibility clearly documented
These practices help maintain the three core security objectives: Confidentiality, Integrity, and Availability (CIA Triad), while reducing the risk and impact of security incidents.