Files
nexus/wiki/sources/ctp-topic-49-container-lifecycle-hardening-standards.md

61 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "CTP Topic 49 Container Lifecycle Hardening Standards"
type: source
tags:
- Container
- Security
- Hardening
- Kubernetes
- CTP
date: 2026-04-14
---
## Source File
- [[Cloud & DevOps/Public-Cloud-Learning-Sessions/07_Security/ctp-topic-49-container-lifecycle-hardening-standards]]
## Summary用中文描述
- 核心主题Micro Focus 容器镜像构建安全加固标准聚焦容器生命周期的构建Build阶段
- 问题域:企业级 Kubernetes 容器环境的安全基线配置
- 方法/机制11 项安全标准,涵盖基础镜像选择、文件系统权限、进程管理、网络隔离、身份认证等
- 结论/价值:提供可落地的容器安全加固实践,配合 Demo 演示验证风险缓解效果
## Key Claims用中文描述
- 使用 Micro Focus 基础镜像可避免开源默认镜像的安全漏洞(配置为安全模式,无可信/非可信组件混合)
- 集成 Init 系统(如 tini/teeny可防止僵尸进程耗尽资源影响容器稳定性
- 设置 readOnlyRootFilesystem=true 可阻止恶意攻击者向容器写入文件
- 使用 emptyDir 卷替代 hostPath 可确保 Pod 删除时敏感数据自动清理
- 禁用 automountServiceAccountToken 可限制容器被攻破后访问 Kubernetes API 的风险
- 每个容器只运行单一应用可防止进程间相互干扰,一个应用被攻破不会影响其他应用
- 避免使用 host 网络和 host 端口可维护网络隔离,防止端口冲突
## Key Quotes
> "Use Micro Focus base image which are configured to be secure with non and trust weighted components." — Micro Focus 基础镜像安全配置原则
> "If one application is compromised process in one application can interfere with the process of other application in the same container." — 单应用容器化原则的原因
> "Setting automountServiceAccountToken to false can limit the impact of potential compromises." — Kubernetes API 访问控制
## Key Concepts
- [[Container Hardening]]:通过配置和策略提升容器安全性的一组最佳实践
- [[Read-Only Root Filesystem]]:将容器根文件系统设为只读,防止运行时写入恶意文件
- [[Init System in Containers]]:容器内的初始化进程(如 tini/teeny负责处理信号和回收僵尸进程
- [[Kubernetes Security Context]]Pod/容器级别的安全配置,包括 readOnlyRootFilesystem、automountServiceAccountToken 等
- [[Container Image Scanning]]使用扫描工具识别镜像中的已知漏洞CVE
- [[Principle of Least Privilege]]:最小权限原则——使用私有服务账号而非默认账号
- [[Network Isolation]]:避免 host 网络/端口以维持容器的网络边界隔离
## Key Entities
- [[Ashish]]Product Security Group 成员,本主题演讲者
- [[Micro Focus]]:容器加固标准的制定者,提供安全配置的基础镜像
- [[Product Security Group]]:负责制定和维护 Micro Focus 容器安全标准的团队
- [[Kubernetes]]:容器编排平台,相关的安全配置包括 ServiceAccount、RBAC、NetworkPolicy
## Connections
- [[CTP Topic 21 Supply Chain Security in Micro Focus]] ← related_to ← [[CTP Topic 49 Container Lifecycle Hardening Standards]]
- [[CTP Topic 37 Secrets Certificates Management]] ← extends ← [[CTP Topic 49 Container Lifecycle Hardening Standards]](密钥管理是容器安全的一部分)
- [[CTP Topic 64 Scaling out with Amazon EKS]] ← depends_on ← [[CTP Topic 49 Container Lifecycle Hardening Standards]]EKS 运行需要遵循容器加固标准)
## Contradictions
- 与 [[Public Cloud Learning Sessions - EKS Optimization Part 2 of 3 - Running Containers with Bottlerocket OS]] 可能的冲突:
- 冲突点Bottlerocket OS 使用自己的安全模型CTP Topic 49 推荐 Micro Focus 基础镜像
- 当前观点:企业内使用 Micro Focus 基础镜像进行统一安全管理
- 对方观点Bottlerocket OS 提供原生硬化hardened操作系统层两种方案各有适用场景