Skip to content

Insights

Modern Compliance in a Hybrid World: Cloud, Containers and Bare Metal

Published · Updated

Configuration and policy enforcement work very differently across infrastructure types. This article looks at bare-metal servers, cloud VMs and containers in turn, then at how to keep one consistent compliance view across all of them.

The hybrid infrastructure challenge

Ask most organizations where their infrastructure runs and the answer is complicated. Some workloads sit on bare-metal servers in a colocation facility. Others are EC2 instances in AWS. There is a Kubernetes cluster in Azure, a data-science team on GCP, and containers running on-premises.

Few teams chose this on purpose. It's the result of years of technology change, mergers and acquisitions, shadow IT, and pragmatic decisions about where to run what. The problem is that each environment has its own ideas about security, configuration and compliance.

Why it gets messy

Bare-metal servers need one set of configuration tools, cloud VMs another, containers a different approach again. Before long there are several scanning tools, several configuration-management systems and separate teams that rarely talk to each other.

Proving compliance in that setup is hard for audit teams. "Show me your SSH hardening policy across all systems" sounds simple until it means pulling data from five tools that don't speak the same language.

The question isn't whether to run hybrid infrastructure; for most organizations that is already decided. The question is how to keep security and compliance consistent when every environment plays by different rules.

Bare-metal servers: traditional configuration management

Bare-metal servers give direct hardware access and maximum performance, but they're long-lived and stateful, so they need thorough configuration management.

Enforcement approach

  • Persistent agents: agents that run continuously and check configuration on a regular cycle.
  • OS-level controls: kernel-level security (SELinux, AppArmor, auditd) for deep enforcement.
  • File integrity monitoring: track changes to critical system files and configuration.
  • Patch management: update packages and the kernel regularly to fix known vulnerabilities.

Compliance considerations

  • Strengths: full control over configuration, deep visibility into system state, mature tools.
  • Weaknesses: manual drift over time, longer remediation cycles, hard to scale enforcement across large fleets.

Example: hardening-benchmark checks

On bare-metal Linux servers, hardening benchmarks such as CIS cover settings across dozens of files. An agent-based tool such as LEA Platform checks these settings on every check cycle, reports drift and, for rules where you have enabled a remedy, puts the setting back and checks again.

Cloud VMs: immutable infrastructure patterns

Cloud VMs combine traditional OS-level configuration with cloud features such as auto-scaling, infrastructure as code and API-driven management.

Enforcement approach

  • Immutable images: bake compliant configuration into VM images; replace VMs instead of patching them in place.
  • Infrastructure as code: define VM configuration in Terraform or CloudFormation so it's reproducible.
  • Cloud-provider controls: use security groups, IAM roles and the provider's encryption services.
  • Combined monitoring: pair the provider's monitoring (CloudWatch, Azure Monitor) with OS-level agents.

Compliance considerations

  • Strengths: immutable images limit drift, API-driven compliance checks, remediation by replacing the VM.
  • Weaknesses: the shared-responsibility model leaves gaps, cloud-specific requirements (for example storage bucket policies), and consistency across clouds is hard.

Example: consistency across clouds

An organization with workloads on AWS, Azure and GCP wants the same security baseline everywhere. That needs:

  • A common policy definition that abstracts provider-specific details
  • A central compliance view that aggregates results from every environment
  • Remediation workflows that understand each provider's tools

Inside the VM, the operating system is the same whichever cloud it runs in, so an OS-level agent can apply one baseline across providers. Cloud-resource settings (security groups, bucket policies, disk encryption flags) are managed through the provider's APIs and tools.

Containers: ephemeral workloads

Containers are short-lived, immutable and orchestrated at scale. Traditional configuration management doesn't translate directly.

Enforcement approach

  • Image scanning: scan images for known vulnerabilities and misconfiguration before deployment.
  • Runtime security: watch container behavior at runtime for unusual activity.
  • Pod security standards: enforce Kubernetes Pod Security Admission (or a policy engine) to restrict container privileges.
  • Network policies: control traffic between workloads with explicit rules.
  • Admission controllers: stop non-compliant workloads from being scheduled.

Compliance challenges specific to containers

  • Short lifetimes: containers are created and destroyed constantly. Classic file integrity monitoring doesn't fit; validate images before deployment and watch behavior at runtime.
  • Orchestration complexity: Kubernetes adds layers of configuration (namespaces, deployments, services) that all affect security.
  • Supply-chain risk: containers pull from external registries. Base images and libraries must be verified.

Compliance considerations

  • Strengths: immutable by design, declarative configuration, version control for every change.
  • Weaknesses: needs container-specific tools, policy at several layers (image, pod, network), complex credential management.

Example: Kubernetes policy for PCI workloads

A payments team running PCI DSS workloads in Kubernetes needs to ensure that:

  • No container runs as root
  • Traffic between pods is encrypted
  • Sensitive data volumes are encrypted at rest
  • Container images are signed and scanned
  • Network policies restrict access to the cardholder data environment

Policy engines such as Open Policy Agent can enforce these at the Kubernetes API, so non-compliant workloads are never scheduled. The nodes those clusters run on are still hosts, and their OS configuration still needs checking.

A unified approach: dynamic grouping and policy abstraction

Managing compliance across different infrastructure needs a layer that turns high-level policy into environment-specific checks.

Dynamic grouping

Instead of maintaining lists of which systems need which policies by hand, group systems by their attributes. In LEA, a dynamic group uses a JSONPath expression evaluated against the facts each host reports through its rules (for example its OS release or an environment label you collect).

Example: production hosts in PCI scope

$ ? (@.environment == "production" && @.pci_scope == "true")

Hosts that match join the group automatically, whether they're bare metal, a VM in your data center or a cloud instance. When a host's facts change, its membership changes with them. Groups can also be static or nested.

Policy abstraction

Define the requirement once at a high level (for example "data at rest must be encrypted"), then enforce it per environment:

  • Bare metal: check that LUKS encryption is enabled on data volumes.
  • Cloud VM: check that EBS or Azure Disk encryption is enabled through the provider's API, and enforce it in IaC templates.
  • Containers: make sure persistent volume claims use encrypted storage classes, validated by admission controllers.

In LEA, one rule can hold a separate validation command, expected result and optional remedy for each OS and distribution, so one requirement can be checked across distributions and operating systems even though the commands differ.

Cross-environment challenges

Inconsistent logs and audit trails

  • Problem: bare-metal servers log to syslog, cloud VMs to CloudWatch, containers to stdout/stderr. Aggregating audit data is complex.
  • Approach: use a central SIEM that normalizes formats and correlates events, with lightweight forwarders (Fluent Bit, Vector) that add metadata from each environment.

Identity and access management

  • Problem: authentication differs: SSH keys on bare metal, IAM roles in the cloud, service accounts in Kubernetes. Consistent access policy is hard.
  • Approach: federate identity through a central identity provider (for example Active Directory or Okta) and map it to each environment's mechanism. Apply the same principles everywhere: least privilege, MFA.

Network policy consistency

  • Problem: bare metal uses iptables or nftables, the cloud uses security groups, Kubernetes uses network policies. "Block SSH from the internet" needs three implementations.
  • Approach: define network policy declaratively in infrastructure as code and generate the environment-specific rules from one definition.

Drift detection across paradigms

  • Problem: drift means different things: file changes on bare metal, resource changes in the cloud, image changes in containers.
  • Approach: use environment-appropriate drift detection but report to one view. Define the desired state per environment (file checksums, IaC state, image digests) while presenting one consistent compliance picture.

Building a hybrid compliance strategy

  1. Common policy definitions: describe requirements in environment-neutral terms, then translate them into specific checks.
  2. Attribute-based grouping: classify systems by tags and reported facts, not hand-kept lists.
  3. The right tool for each layer: use host agents for operating systems, cloud tools for cloud resources and admission control for Kubernetes, instead of forcing one tool everywhere.
  4. One compliance view: bring results from every environment together.
  5. Consistent remediation: fix drift in an environment-appropriate way with the same outcome.
  6. Continuous validation: check on a regular cycle instead of relying on periodic audits.

The path forward

Hybrid infrastructure is the reality of modern IT. Treat it as a reason to build a compliance program that doesn't depend on any single platform:

  • Use environment-specific tools while keeping policy outcomes consistent
  • Use dynamic grouping and automation to manage the complexity
  • Build a layer that translates business requirements into technical controls
  • Validate continuously instead of relying on periodic audits

LEA checks operating-system configuration on Linux, macOS and Windows hosts, wherever they run, and is self-hosted on your own servers.

LEA Platform produces evidence; certification is granted only by an accredited auditor.

Try LEA Platform on your own servers:

Start a free POC

Try it on your own servers.

30 days, up to 25 endpoints, every feature. We help you install it and agree on success criteria first.