跳到正文
Skillpedia
安全41k · #6661

mtls-configuration

它能做什么

这个技能用于设置一种名为 mTLS 的特殊安全机制,让计算机服务之间能够安全地通信。它就像给每个服务发放一张工作证,确保只有获得授权的服务才能互相通信。

适用场景

  • ✓在搭建一个服务之间需要互相证明身份的网络时。
  • ✓需要保护系统不同部分之间的通信安全时。
  • ✓需要管理和续期服务安全证书时。

技能链接

https://github.com/wshobson/agents/blob/main/plugins/cloud-infrastructure/skills/mtls-configuration/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/wshobson/agents/blob/main/plugins/cloud-infrastructure/skills/mtls-configuration/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该如何设置 mTLS,让我的服务之间安全通信?”

每周 5 个新技能,1 分钟读完。

工作原理

它采用一种称为“握手”的过程:服务之间交换数字证书,以验证彼此的身份,从而建立起一条安全的加密通信通道。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

mTLS Configuration

Comprehensive guide to implementing mutual TLS for zero-trust service mesh communication.

When to Use This Skill

  • Implementing zero-trust networking
  • Securing service-to-service communication
  • Certificate rotation and management
  • Debugging TLS handshake issues
  • Compliance requirements (PCI-DSS, HIPAA)
  • Multi-cluster secure communication

Core Concepts

1. mTLS Flow

┌─────────┐                              ┌─────────┐
│ Service │                              │ Service │
│    A    │                              │    B    │
└────┬────┘                              └────┬────┘
     │                                        │
┌────┴────┐      TLS Handshake          ┌────┴────┐
│  Proxy  │◄───────────────────────────►│  Proxy  │
│(Sidecar)│  1. ClientHello             │(Sidecar)│
│         │  2. ServerHello + Cert      │         │
│         │  3. Client Cert             │         │
│         │  4. Verify Both Certs       │         │
│         │  5. Encrypted Channel       │         │
└─────────┘                              └─────────┘

2. Certificate Hierarchy

Root CA (Self-signed, long-lived)
    │
    ├── Intermediate CA (Cluster-level)
    │       │
    │       ├── Workload Cert (Service A)
    │       └── Workload Cert (Service B)
    │
    └── Intermediate CA (Multi-cluster)
            │
            └── Cross-cluster certs

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's

  • Start with PERMISSIVE - Migrate gradually to STRICT
  • Monitor certificate expiry - Set up alerts
  • Use short-lived certs - 24h or less for workloads
  • Rotate CA periodically - Plan for CA rotation
  • Log TLS errors - For debugging and audit

Don'ts

  • Don't disable mTLS - For convenience in production
  • Don't ignore cert expiry - Automate rotation
  • Don't use self-signed certs - Use proper CA hierarchy
  • Don't skip verification - Verify the full chain
常见问题

什么是 mTLS?

mTLS 是 Mutual Transport Layer Security 的缩写,中文可译为“双向传输层安全”。它确保通信双方在建立连接之前,都能向对方证明自己的身份。

为什么要使用 mTLS?

为了增强安全性,尤其是在服务之间需要相互通信的环境中,比如微服务架构或“零信任”网络。

什么是 Root CA?

它是颁发和签署证书的最高权威机构。你可以把它理解为一个总公证机构,负责验证所有已颁发的证书。

详情

作者的原始描述

Configure mutual TLS (mTLS) for zero-trust service-to-service communication. Use when implementing zero-trust networking, certificate management, or securing internal service communication.

repo: wshobson/agents

热度

GitHub 星标
41k
排名
#6661
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能