Home / Skills / wshobson/agents

mtls-configuration

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

skillLicense: MIT Source: wshobson/agents

Install

Copy this folder into your Claude Code project (needs Node.js):

npx degit wshobson/agents/plugins/cloud-infrastructure/skills/mtls-configuration .claude/skills/mtls-configuration

Or install it for every project:

npx degit wshobson/agents/plugins/cloud-infrastructure/skills/mtls-configuration ~/.claude/skills/mtls-configuration

File content

Made by its original authors and shared under MIT. We show it unchanged, with credit and a link to the source. Source β†—

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

# 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