Cloud-Native Application Security – DZone Refcardz

The cloud-native architecture enables organizations to build and run scalable applications in a dynamic environment. However, it does come with several challenges — security, cost, governance, observability, and more. Let us look at some of the best practices every development team working in the cloud-native space needs to embrace to secure their applications.

ZeroTrust Architecture

Zero trust is a strategic approach to rebuild and modernize security by enforcing strict access controls to protect data, applications, and networks. By inspecting and monitoring network traffic to catch any malicious activity, the zero-trust architecture helps reduce the blast radius in case of a compromise. In a cloud-native architecture that uses a combination of microservices and containers, service mesh helps reduce the surface area of ​​attack and implement the zero-trust security model.


Every entity must authenticate itself, and implicit trust in data and applications is denied even within a network perimeter.


Workloads are not monitored for misconfigurations and vulnerabilities. A least-privilege access strategy between components is not implemented.

Identity and Access Management

IAM is a core component of the security management posture within an organization that enables the proper entities to access the right resources. IAM protects against compromised access, safeguards resources within the network, and provides comprehensive security against phishing and ransomware attacks.


Following the zero-trust model, each entity is authenticated and authorized when logging in or accessing resources.


Not visualizing IAM as a framework of policies and processes — like single sign-on, multi-factor authentication — to help mitigate risk.

Principle of Least Privilege

The least-privilege policy grants permissions to only the resources required to perform the task; no other access gets assigned. Having overprivileged users and roles in an organization increases the risk factor. With an increasing number of security breaches caused by privileged credentials, it is best to always validate policies and adopt the least-privilege principle by default.


As a security best practice, when you create your IAM policies, start with a minimum set of permissions and grant additional permissions as needed.


Providing broad permissions increases the blast radius and risk factor.

Secrets Management

Cloud secrets management refers to tools and methods to securely manage secrets — passwords, certificates, SSH keys, encryption keys, and API tokens. You should have a strategy to rotate your passwords periodically. Public cloud providers offer managed services to handle secrets and their management.


Policies and procedures for secret management are established, documented, and communicated across the development teams in your organization.


Storing sensitive credentials in code repositories.

Incident Response

Building incident response and triaging strategies are challenging when you have microservices running in a Kubernetes cluster in a cloud-native landscape. When you treat your workloads running in containers as cattle and not pets, performing post-mortem analysis and gathering audit trail events become difficult.

Containers spin up and down frequently, and so, responding to security threats in a transient environment requires a different strategy. Incident response is critical to resolving security issues efficiency and spreading awareness within your organization about operational duties.


As you start creating an incident response playbook, it is crucial to have access to proper observability tools, including logs, metrics, and traces.


There is no proper audit trail or monitoring to support troubleshooting activities.

Data Protection

Cloud-native microservices support polyglot persistence, and therefore, development teams have flexibility in choosing the appropriate database technology, as seen in Figure 3, for developing their services. These datastores can store both structured and unstructured data to support a variety of functions like search, reporting, time-series, caching, transactional, etc.


Support critical data management functions like backup and recovery, archival, data replication, data encryption at rest, and motion. When it comes to data auditing, be aware of regulatory compliance laws set by the government like HIPAA, GDPR, and FedRAMP to protect consumer rights.


Excluding data from your automated CI/CD pipeline.

Figure 3: Polyglot persistence in cloud-native applications

Container Image Security

Many organizations are running containerized workloads in production. Containers make it easy to package, deploy and run your code, thereby increasing the speed and portability of your application. It is necessary to secure the container image to secure containers.


Images in popular container registries are not guaranteed to be free from vulnerabilities; hence, you should have a process for vulnerability scanning of your container images before deploying them to production.


No automated strategy to periodically scan container images.

Threat Modeling

Developing services in the public cloud can trigger new security threats like malware and ransomware. You can leverage managed services provided by cloud providers or third-party vendors that use machine learning and artificial intelligence to identify security threats and vulnerabilities across your organization.


Continuously monitor your cloud resources, have unified visibility into security incidents, and develop a strategy to detect unauthorized activities.


No policies have been created to detect malicious activities like suspicious user actions, unsuccessful login attempts, network anomalies, and unusual activities that indicate credential compromise.

Using Infrastructure as Code

Cloud-native architectures leverage the principle of immutability to manage infrastructure resources. If you need to make any configuration changes, you don’t modify the server; Instead, build a new server with the updated configuration. IaC ensures consistency between environments and enables better DevOps practices by deploying infrastructure code in an automated and repeatable manner.


Development and security teams can use IaC tools like Terraform, Chef, Puppet, and Ansible to create guardrails, implement policies, patch vulnerabilities, and fix configuration issues seamlessly across environments without worrying about drifts. With IaC, all your infrastructure changes are peer-reviewed and stored via source control for increased visibility.


Making infrastructure changes manually, which creates configuration drifts across environments.

Runtime Observability

With enterprises growing their workloads rapidly and adapting multi-cluster/multi-cloud environments, it becomes crucial to have a centralized view of your systems. Furthermore, to have a sound observability strategy, you need to continuously profile your applications and collect a considerable volume of data round the clock.


Provide observability to the teams as a platform offering — and not something they have to build and maintain for individual services.


Lack of robust security tooling to make sense of the high volume of logs, metrics, and trace data produced by your applications.


Leave a Comment