惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

博客园 - 数码幽灵

[转贴] 网络硬盘“G宝盘”使用体验 - 数码幽灵 - 博客园 个人拼图 有关Web项目使用EnterpriseLibrary的Sercurity问题 - 数码幽灵 - 博客园 关于使用VS.Net2003调试器出现的问题及相关解决方法 关于JavaScript一次提交多个Form出现的问题 看到关于Zope的一些东西 关于SmartClient 与 游戏开发的一点想法 关于Alex 的 ProcessContext 今天看到AppForge的产品 Base4.Net 即将推出 V1.0 使用Base4.Net进行项目开发中的问题 发现了C-Omega Essential ASP.NET 读书笔记--Configuration Essential ASP.NET 读书笔记--WebForm Essential ASP.NET 读书笔记--基础 Visual Studio 2005 Express Download Test Driven C# 读书笔记(下) Test Driven C# 读书笔记(上) 每个.Net开发者现在应该下载的十个必备工具!
WS-Security学习
数码幽灵 · 2005-04-26 · via 博客园 - 数码幽灵

This specification provides three main mechanisms: security token propagation, message integrity, and message confidentiality

一个典型的符合WS-Security标准的Soap消息

插入代码好像不能用了

(001) <?xml version="1.0" encoding="utf-8"?>
(002)  <S:Envelope xmlns:S="http://www.w3.org/2001/12/soap-envelope"
            xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
(003)    <S:Header>
(004)       <m:path xmlns:m="http://schemas.xmlsoap.org/rp/">
(005)         <m:action>http://fabrikam123.com/getQuote</m:action>
(006)         <m:to>http://fabrikam123.com/stocks</m:to>
(007)          <m:id>uuid:84b9f5d0-33fb-4a81-b02b-5b760641c1d6</m:id>
(008)       </m:path>
(009)       <wsse:Security
             xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
(010)         wsse:UsernameToken Id="MyID">
(011)             <wsse:Username>Zoe</wsse:Username> 
(012)         </wsse:UsernameToken>
(013)         <ds:Signature>
(014)            <ds:SignedInfo>
(015)               <ds:CanonicalizationMethod
                   Algorithm=
                          "http://www.w3.org/2001/10/xml-exc-c14n#"/>
(016)               <ds:SignatureMethod 
                        Algorithm=
                        "http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
(017)               <ds:Reference URI="#MsgBody">
(018)                  <ds:DigestMethod 
                          Algorithm=
                        "http://www.w3.org/2000/09/xmldsig#sha1"/>
(019)                  <ds:DigestValue>LyLsF0Pi4wPU...</ds:DigestValue>
(020)               </ds:Reference>
(021)            </ds:SignedInfo>
(022)            <ds:SignatureValue>DJbchm5gK...</ds:SignatureValue>
(023)            <ds:KeyInfo>
(024)                <wsse:SecurityTokenReference>
(025)                 <wsse:Reference URI="#MyID"/>
(026)                </wsse:SecurityTokenReference>
(027)            </ds:KeyInfo>
(028)         </ds:Signature>
(029)      </wsse:Security>
(030)   </S:Header>
(031)   <S:Body Id="MsgBody">
(032)     <tru:StockSymbol xmlns:tru="http://fabrikam123.com/payloads">
              QQQ
          </tru:StockSymbol>
(033)   </S:Body>
(034) </S:Envelope>

很多Sercurity的东西都在SoapHeader中体现!
9-29行是标准中的Security Header,其包含了预定接收者所需的Security Infomation
10-12行是分配给该消息的Security Token,在本例中,客户端使用UsernameToken,并且没有在Soap消息中传送密码,所以我们可以假定通讯双方早先已经确定了认证的密码(It's a shared secret)
13-28行是对数字签名的完整描述,这个签名保证签名元素的完整性,该签名使用了

XML Signature specification.在本例中,这个签名基于一个从User Password生成的Key当中
15行 specifies how to canonicalize (normalize) the data that is being signed
17-20行选择北签名的元素,17行指明了为<S:Body>的元素将被签名 
22行specifies the signature value of the canonicalized form of the data that is being signed as defined in the XML Signature specification.

23-27行提供一个到那里去寻找分配给security token的签名的Uri的暗示(hint) ;
31-33行包含了对我们有用的Soap消息体