Sync: add ses and networking notes
This commit is contained in:
40
wiki/concepts/DKIM-Email-Authentication.md
Normal file
40
wiki/concepts/DKIM-Email-Authentication.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: "DKIM Email Authentication"
|
||||
type: concept
|
||||
tags:
|
||||
- Email
|
||||
- Security
|
||||
- AWS
|
||||
date: 2026-04-14
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
DKIM(DomainKeys Identified Mail)是一种电子邮件验证标准,通过在邮件头部添加数字签名来验证邮件确实由声称的域名授权发送,防止邮件被篡改和伪造。
|
||||
|
||||
## How DKIM Works
|
||||
|
||||
1. **域名所有者**在 DNS 中发布 DKIM 公钥
|
||||
2. **发送邮件服务器**使用私钥对邮件头和正文生成数字签名
|
||||
3. **接收服务器**通过 DNS 查询获取公钥,验证签名有效性
|
||||
4. 签名包含在邮件头的 `DKIM-Signature` 字段中
|
||||
|
||||
## DKIM in AWS SES
|
||||
|
||||
AWS SES 支持 DKIM 验证:
|
||||
- SES 自动为域名生成 DKIM 签名密钥
|
||||
- 域名所有者需要在 DNS 中添加三条 CNAME 记录
|
||||
- 启用 DKIM 后,SES 自动对所有出站邮件进行签名
|
||||
|
||||
## Related Concepts
|
||||
- [[SPF]](Sender Policy Framework):另一种 DNS ベースの邮件验证方法
|
||||
- [[DMARC]](Domain-based Message Authentication, Reporting & Conformance):综合 SPF 和 DKIM 的邮件验证框架
|
||||
- [[Email-Security]]:邮件安全的整体方法论
|
||||
|
||||
## DKIM vs SPF vs DMARC
|
||||
|
||||
| 机制 | 验证内容 | 实施难度 |
|
||||
|------|----------|----------|
|
||||
| SPF | 验证发送服务器 IP 是否被域名授权 | 低 |
|
||||
| DKIM | 验证邮件内容未被篡改 | 中 |
|
||||
| DMARC | 基于 SPF + DKIM 验证 | 中高 |
|
||||
46
wiki/concepts/SES-Sandbox-Mode.md
Normal file
46
wiki/concepts/SES-Sandbox-Mode.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: "SES Sandbox Mode"
|
||||
type: concept
|
||||
tags:
|
||||
- AWS
|
||||
- SES
|
||||
- Email
|
||||
- Security
|
||||
date: 2026-04-14
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
SES Sandbox Mode 是 AWS SES(Simple Email Service)的默认限制状态,新注册的 SES 账户在此状态下仅能向经过验证的收件人地址发送少量邮件,无法向外部地址自由发信。
|
||||
|
||||
## Sandbox Mode Restrictions
|
||||
|
||||
- **仅限验证地址**:只能向已在 SES 中验证过的邮箱地址发送邮件
|
||||
- **发送限额低**:默认每日发送限额为 200 封/天
|
||||
- **无外部发信能力**:无法向普通外部邮箱地址(gmail.com、outlook.com 等)发送邮件
|
||||
- **申请审批制**:需通过 AWS Support 工单申请脱离沙箱
|
||||
|
||||
## How to Exit Sandbox Mode
|
||||
|
||||
1. 在 SES 控制台确认已完成域名验证(已完成 DKIM 配置)
|
||||
2. 提交 AWS Support 工单申请"生产访问权限"
|
||||
3. 在工单中说明使用场景和预计发送量
|
||||
4. AWS 审批通过后,账户升级至生产模式
|
||||
|
||||
## Production Mode Capabilities
|
||||
|
||||
脱离 Sandbox Mode 后:
|
||||
- 可向任意外部邮箱地址发送邮件
|
||||
- 发送限额大幅提升(可申请更高配额)
|
||||
- 可用于生产环境邮件发送
|
||||
|
||||
## Important Notes
|
||||
|
||||
- 即使在生产模式下,仍需遵守 AWS SES 发送策略和最佳实践
|
||||
- 建议申请脱离 Sandbox Mode 后,同步配置 DMARC 策略保护域名声誉
|
||||
- 持续监控退回率(bounce rate)和投诉率(complaint rate),避免账户被封禁
|
||||
|
||||
## Related Concepts
|
||||
- [[AWS-SES]]:Amazon Simple Email Service
|
||||
- [[DKIM-Email-Authentication]]:邮件域名验证
|
||||
- [[Email-Security]]:邮件安全最佳实践
|
||||
42
wiki/concepts/VPC-Endpoint.md
Normal file
42
wiki/concepts/VPC-Endpoint.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "VPC Endpoint"
|
||||
type: concept
|
||||
tags:
|
||||
- AWS
|
||||
- Networking
|
||||
- Security
|
||||
date: 2026-04-14
|
||||
---
|
||||
|
||||
## Definition
|
||||
|
||||
VPC Endpoint 是 AWS 提供的一项功能,允许在 VPC 内部通过私有 IP 地址安全地访问 AWS 服务,而无需经过公网、互联网网关、NAT 设备或 VPN 连接。
|
||||
|
||||
## Two Types
|
||||
|
||||
### Interface Endpoint
|
||||
- 使用 AWS PrivateLink 技术,在 VPC 中作为弹性网络接口(ENI)部署
|
||||
- 为 AWS 服务(如 S3、DynamoDB、SES SMTP 等)提供私有连接
|
||||
- 支持通过安全组控制访问
|
||||
|
||||
### Gateway Endpoint
|
||||
- 用于 S3 和 DynamoDB
|
||||
- 通过路由表中的目标条目将流量路由到 AWS 服务
|
||||
- 免费使用
|
||||
|
||||
## Key Use Cases
|
||||
|
||||
- **SES SMTP 集成**:在应用 VPC 中配置 VPC Endpoint,使应用程序可以在不访问公网的情况下通过私有连接与 SES SMTP 服务通信
|
||||
- **S3 访问**:在私有子网中的 EC2 实例通过 Gateway Endpoint 安全访问 S3,避免流量经公网
|
||||
- **Secrets Manager 访问**:通过 Interface Endpoint 安全地访问 Secrets Manager,无需公网连接
|
||||
|
||||
## Why Use VPC Endpoints
|
||||
|
||||
1. **安全**:流量不经过公网,消除互联网暴露面
|
||||
2. **低延迟**:私有 IP 直连,减少网络跳数
|
||||
3. **合规**:满足严格的网络隔离和合规要求
|
||||
4. **成本**:Gateway Endpoint 免费,Interface Endpoint 费用低于 NAT Gateway
|
||||
|
||||
## Related Concepts
|
||||
- [[AWS-PrivateLink]]:VPC Endpoint 背后使用的核心技术
|
||||
- [[Infrastructure-as-Code]]:Terraform 模块可自动化 VPC Endpoint 的创建
|
||||
Reference in New Issue
Block a user