contrast

module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: AGPL-3.0

README ΒΆ

Contrast

Contrast

Contrast runs confidential container deployments on Kubernetes at scale.

Contrast is based on the Kata Containers and Confidential Containers projects. Confidential Containers are Kubernetes pods that are executed inside a confidential micro-VM and provide strong hardware-based isolation from the surrounding environment. This works with unmodified containers in a lift-and-shift approach. Contrast currently targets the CoCo preview on AKS.

Goal

Contrast is designed to keep all data always encrypted and to prevent access from the infrastructure layer. It removes the infrastructure provider from the trusted computing base (TCB). This includes access from datacenter employees, privileged cloud admins, own cluster administrators, and attackers coming through the infrastructure, for example, malicious co-tenants escalating their privileges.

Contrast integrates fluently with the existing Kubernetes workflows. It's compatible with managed Kubernetes, can be installed as a day-2 operation and imposes only minimal changes to your deployment flow.

Use Cases

  • Increasing the security of your containers
  • Moving sensitive workloads from on-prem to the cloud with Confidential Computing
  • Shielding the code and data even from the own cluster administrators
  • Increasing the trustworthiness of your SaaS offerings
  • Simplifying regulatory compliance
  • Multi-party computation for data collaboration

Features

πŸ”’ Everything always encrypted
  • Runtime encryption: All Pods run inside AMD SEV-based Confidential VMs (CVMs). Support for Intel TDX will be added in the future.
  • PKI and mTLS: All pod-to-pod traffic can be encrypted and authenticated with Contrast's workload certificates.
πŸ” Everything verifiable
  • Workload attestation based on the identity of your container and the remote-attestation feature of Confidential Containers
  • "Whole deployment" attestation based on Contrast's Coordinator attestation service
  • Runtime environment integrity verification based runtime policies
  • Kata micro-VMs and single workload isolation provide a minimal Trusted Computing Base (TCB)
🏝️ Everything isolated
  • Runtime policies enforce strict isolation of your containers from the Kubernetes layer and the infrastructure.
  • Pod isolation: Pods are isolated from each other.
  • Namespace isolation: Contrast can be deployed independently in multiple namespaces.
🧩 Lightweight and easy to use
  • Install in Kubernetes cluster as a day-2 operation.
  • Compatible with managed Kubernetes.
  • Minimal DevOps involvement.
  • Simple CLI tool to get started.

Documentation

To learn more, see the documentation. You may want to start with one of the following sections.

Current limitations

Contrast is in an early preview stage, and most underlying projects are still under development as well. As a result, there are currently certain limitations from which we try to document the most significant ones here:

  • Only available on AKS with CoCo preview (AMD SEV-SNP)
  • Persistent volumes currently not supported in CoCo
  • While workload policies are functional in general, but not covering all edge cases
  • Port-forwarding isn't supported by Kata Containers yet
  • CLI is only available for Linux (mostly because upstream dependencies aren't available for other platforms)
  • Known bugs and limitations on AKS CoCo
    • The total amount of container image layers per pod is restricted to 32.
    • Container memory limits are wrongly applied. Workaround: only use memory requests.
    • Directories with a large number of files may cause applications to hang. Workarounds:
      • During image build, try to keep directories under 4096 bytes (~200 files).
      • At runtime, touch a file in the affected directory to force it into the overlayfs working directory.

Upcoming Contrast features

  • Plugin for a key management service (KMS) for attestation/coordinator certificate-based key release
  • High availability (distributed Contrast Coordinator)

Contributing

See the contributing guide. Please follow the Code of Conduct.

Support

Directories ΒΆ

Path Synopsis
cli
cmd
e2e
internal/kubeclient
The kubeclient package provides a simple wrapper around Kubernetes interactions commonly used in the e2e tests.
The kubeclient package provides a simple wrapper around Kubernetes interactions commonly used in the e2e tests.
imagepuller module
internal
atls
aTLS provides config generation functions to bootstrap attested TLS connections.
aTLS provides config generation functions to bootstrap attested TLS connections.
ca
crypto
Package crypto provides functions to for cryptography and random numbers.
Package crypto provides functions to for cryptography and random numbers.
embedbin
Package embedbin provides a portable way to install embedded binaries.
Package embedbin provides a portable way to install embedded binaries.
grpc/atlscredentials
Package atlscredentials handles creation of TLS credentials for attested TLS (ATLS).
Package atlscredentials handles creation of TLS credentials for attested TLS (ATLS).
grpc/dialer
Package dialer provides a grpc dialer that can be used to create grpc client connections with different levels of ATLS encryption / verification.
Package dialer provides a grpc dialer that can be used to create grpc client connections with different levels of ATLS encryption / verification.
grpc/retry
Package retry provides functions to check if a gRPC error is retryable.
Package retry provides functions to check if a gRPC error is retryable.
logger
Package logger provides a slog.Logger that can be configured via environment variables.
Package logger provides a slog.Logger that can be configured via environment variables.
oid
retry
Package retry provides a simple interface for retrying operations.
Package retry provides a simple interface for retrying operations.
service-mesh module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL