CloudFront签名URL与签名Cookie治理
概览
- 使用签名 URL 或签名 Cookie 控制资源访问时间窗口、IP 范围与路径匹配。
- 通过密钥组(Key Group)管理公钥并在分配中引用,实现密钥轮换与多应用隔离。
- 与源鉴权(OAC/OAI)协同,防止绕过 CDN 直接访问源站。
技术参数(已验证)
- URL/Cookie:策略包含
Resource、DateLessThan、可选 IPRange 与路径通配;客户端携带 Key-Pair-Id 与签名。
- 密钥组:在分配中绑定 Key Group;轮换时保留新旧公钥的过渡期并更新生成端私钥。
- 源鉴权:优先使用 OAC;旧方案为 OAI;在 S3 源上限制公开访问并只允许来自分配的请求。
- 缓存:签名维度影响缓存键;在分配与源配置中治理缓存与授权头传递。
- 审计:记录签名验证失败、过期与来源 IP;建立告警与轮换台账。
实战清单
- 为私有内容选择 URL 或 Cookie 方案;定义策略窗口与范围并生成签名。
- 绑定密钥组并实施轮换;与 OAC/OAI 配合防止源绕过。
- 观测验证失败与过期情况;调整缓存与授权头策略。
- Importance: 以签名与源鉴权联合治理私有内容访问的安全与体验。
基本
文件
流程
错误
SQL
调试
- 请求信息 : 2026-09-28 07:25:06 HTTP/2.0 GET : www.ybb.press/devops/1577.html
- 运行时间 : 0.493262s [ 吞吐率:2.03req/s ] 内存消耗:5,316.95kb 文件加载:115
- 查询信息 : 19 queries 2 writes
- 缓存信息 : 36 reads,3 writes
- 配置加载 : 80
- 会话信息 : SESSION_ID=fjqc31lokrl63j3j8f1bb9vs26
- [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000089s ]
- [ CACHE ] INIT File
- [ BEHAVIOR ] Run \addons\cms\Cms @app_init [ RunTime:0.009804s ]
- [ BEHAVIOR ] Run \addons\fastchat\Fastchat @app_init [ RunTime:0.000182s ]
- [ BEHAVIOR ] Run \addons\log\Log @app_init [ RunTime:0.000525s ]
- [ BEHAVIOR ] Run \addons\shop\Shop @app_init [ RunTime:0.003709s ]
- [ BEHAVIOR ] Run \addons\yunping\Yunping @app_init [ RunTime:0.000598s ]
- [ BEHAVIOR ] Run Closure @app_init [ RunTime:0.000764s ]
- [ BEHAVIOR ] Run app\common\behavior\Common @app_init [ RunTime:0.001711s ]
- [ LANG ] /www/wwwroot/yebinbing/thinkphp/lang/zh-cn.php
- [ BEHAVIOR ] Run app\common\behavior\Common @app_dispatch [ RunTime:0.000125s ]
- [ ROUTE ] array (
'type' => 'method',
'method' =>
array (
0 => '\\think\\addons\\Route',
1 => 'execute',
),
'var' =>
array (
'addon' => 'cms',
'controller' => 'archives',
'action' => 'index',
),
)
- [ HEADER ] array (
'x-forwarded-proto' => 'https',
'cf-visitor' => '{"scheme":"https"}',
'cf-ipcountry' => 'US',
'cf-connecting-ip' => '216.73.216.103',
'cdn-loop' => 'cloudflare; loops=1',
'user-agent' => 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])',
'accept-encoding' => 'gzip, br',
'accept' => '*/*',
'cf-ray' => 'a41e440b2d4c77be-CMH',
'x-forwarded-for' => '216.73.216.103',
'host' => 'www.ybb.press',
'content-length' => '',
'content-type' => '',
)
- [ PARAM ] array (
'catename' => 'devops',
'id' => '1577',
)
- [ RUN ] think\addons\Route->execute[ /www/wwwroot/yebinbing/vendor/fastadminnet/fastadmin-addons/src/addons/Route.php ]
- [ LANG ] /www/wwwroot/yebinbing/public/../application/common/lang/zh-cn/addon.php
- [ BEHAVIOR ] Run app\common\behavior\Common @addon_begin [ RunTime:0.004873s ]
- [ LANG ] /www/wwwroot/yebinbing/addons/cms/lang/zh-cn.php
- [ DB ] INIT mysql
- [ VIEW ] /www/wwwroot/yebinbing/addons/cms/view/default/show_article.html [ array (
0 => 'config',
1 => 'user',
2 => 'site',
3 => '__CHANNEL__',
4 => 'isWechat',
5 => 'canonical_url',
6 => '__ARCHIVES__',
7 => '__MODEL__',
) ]
- [ SESSION ] INIT array (
'id' => '',
'var_session_id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,
)
- [ BEHAVIOR ] Run \addons\cms\Cms @view_filter [ RunTime:0.000387s ]
- [ BEHAVIOR ] Run \addons\shop\Shop @view_filter [ RunTime:0.000105s ]

0.496695s
发表评论 取消回复