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

推荐订阅源

B
Blog
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
C
Check Point Blog
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
博客园 - Franky
Vercel News
Vercel News
月光博客
月光博客
罗磊的独立博客
博客园 - 叶小钗
腾讯CDC
A
About on SuperTechFans
P
Privacy International News Feed
V
V2EX
L
LINUX DO - 最新话题
K
Kaspersky official blog
P
Privacy & Cybersecurity Law Blog
D
DataBreaches.Net
D
Darknet – Hacking Tools, Hacker News & Cyber Security
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Stack Overflow Blog
Stack Overflow Blog
T
Tor Project blog
MyScale Blog
MyScale Blog
Y
Y Combinator Blog
G
GRAHAM CLULEY
V
Vulnerabilities – Threatpost
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
L
LangChain Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
雷峰网
雷峰网
Project Zero
Project Zero
G
Google Developers Blog
博客园 - 【当耐特】
C
Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
The GitHub Blog
The GitHub Blog

博客园 - 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以及使用