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

推荐订阅源

T
Threat Research - Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
Secure Thoughts
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
AWS News Blog
AWS News Blog
美团技术团队
G
Google Developers Blog
宝玉的分享
宝玉的分享
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
InfoQ
小众软件
小众软件
Google DeepMind News
Google DeepMind News
P
Privacy & Cybersecurity Law Blog
Stack Overflow Blog
Stack Overflow Blog
Webroot Blog
Webroot Blog
D
DataBreaches.Net
IT之家
IT之家
PCI Perspectives
PCI Perspectives
人人都是产品经理
人人都是产品经理
Hacker News: Ask HN
Hacker News: Ask HN
L
LangChain Blog
SecWiki News
SecWiki News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
T
Threatpost
P
Proofpoint News Feed
Y
Y Combinator Blog
Cloudbric
Cloudbric
T
Tor Project blog
量子位
博客园_首页
B
Blog
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
D
Darknet – Hacking Tools, Hacker News & Cyber Security

博客园 - jiekengxu

工厂方法模式(Factory Method Pattern) 生成器模式(Builder) 抽象工厂模式(Abstract Factory Pattern) asp.net 2.0 权限树的控制(多处转载) 中小型项目的权限管理的数据关系图 简陋的会计凭证金额输入控件(再加强) Web Services Enhancements 3.0 Quick Start(四) 初识HTC asp.net 2.0 缓存(页面输出缓存) asp.net 2.0 缓存(理论篇) 智能客户端概述 Web Services Enhancements 3.0 Quick Start(三) 简陋的会计凭证金额输入控件(加强) Web Services Enhancements 3.0 Quick Start(二) 简陋的会计凭证金额输入控件 利用AJAX.net设计现在执行运算的报表 单件模式在报表中的使用 Web Service Software Factory 构架 Web Service Software Factory 入门
Web Services Enhancements 3.0 Quick Start(一)
jiekengxu · 2006-10-25 · via 博客园 - jiekengxu

Web Services Enhancement的目的
      1、基于基本的Web Services
      2、满足企业级应用的需求Secure、reliable and transacted Web services
      3、保留Web Services得以成功的优点 Interoperability Ability to be implemented Add no more complexity than needed
这篇主要介绍WSE通过安全证书(Policy File)构建安全Web Service
     一、先定义安全证书(Policy File) 
     二、使用专有的Web service安全证书特性
具体步骤
     1、在vs2005中开一个Web Service项目
     2、运行WSE Settings 3.0 Tool
     3、通过WSE Settings 3.0 Tool打开Web Service项目的web.config
     4、选中Enable this project for web Service Enhancements

        5、选择Policy并Add,填写你证书的名字,我现在是使用ServicePolicy名称然后下一步
        6、然后的的向导界面就要重点讲述下在第一个选择项是标注你选择的服务还是客户,在第二个选择项中有四个选项

选项 说明
Anonymous 匿名访问
Username 需要包含用户名和密码的Usernametoken的安全令牌
Certificate 需要发送含有X509SecurityToken的安全令牌的X.509证书
Windows 需要发送含有KerberosToken的windows身份认证

    7、选择SOAP头的类型

选项 说明
None SOAP消息应当在传输层(SSL协议)提供保护,WSE在传输层(SSL协议)不提供保护。
Sign-Only SOAP消息必须签名
Sign and Encrypt SOAP消息必须签名和SOAP消息体加密
Sign, Encrypt, Encrypt Signature SOAP消息必须签名、消息体签名加密

8、完成
就能根据您的配置生成以下配置文件

<policies>
  
<extensions>
    
<extension name="kerberosSecurity"
               type
="Microsoft.Web.Services3.Design.KerberosAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    
<extension name="kerberos"
               type
="Microsoft.Web.Services3.Design.KerberosTokenProvider, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    
<extension name="requireActionHeader"
               type
="Microsoft.Web.Services3.Design.RequireActionHeaderAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  
</extensions>
  
<policy name="ServicePolicy">
    
<kerberosSecurity establishSecurityContext="false" signatureConfirmation="false" protectionOrder="SignBeforeEncrypting" deriveKeys="false">
      
<protection>
        
<request signatureOptions="IncludeAddressing, IncludeTimestamp, IncludeSoapBody" 
                 encryptBody
="true" />
        
<response signatureOptions="IncludeAddressing, IncludeTimestamp, IncludeSoapBody" 
                 encryptBody
="true" />
        
<fault signatureOptions="IncludeAddressing, IncludeTimestamp, IncludeSoapBody" 
                 encryptBody
="false" />
      
</protection>
    
</kerberosSecurity>
    
<requireActionHeader />
  
</policy>
</policies>

9、应用在Web Service

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Design;

[WebService(Namespace 
= "http://www.contoso.com/")]
[WebServiceBinding(ConformsTo 
= WsiProfiles.BasicProfile1_1)]
[Policy(
"ServicePolicy")] 
public class Service : System.Web.Services.WebService
{
    
public Service () {

    }


    [WebMethod]
    
public string SayHello() {
        
return "Hello World";
    }

    
}

小结
现在主要是建立服务器端的Policy File,以及使用,下次就介绍关于客户端建立Policy File以及使用