- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 JBOSS EAP 6.3.1 - 我不允许在生产中使用 wildfly。
CXF版本2.7.11
我正在尝试构建一个安全 token 服务,它可以处理 RequestSecurityToken 请求,同时使用 X509 证书进行身份验证。
来自第三方应用程序的示例请求 - 遗憾的是无法更改:
<SOAPENV:Envelope xmlns:SOAPENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAPENV:Header>
<wsse:Security xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>
<wsse:BinarySecurityToken EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary' ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3' wsu:Id='Token'>
MIIDMTCCApqgAwI....3aairt
93OqNtk=
</wsse:BinarySecurityToken>
<Signature xmlns='http://www.w3.org/2000/09/xmldsig#'>
<SignedInfo>
<CanonicalizationMethod Algorithm='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'/>
<SignatureMethod Algorithm='http://www.w3.org/2000/09/xmldsig#rsa-sha1'/>
<Reference URI='#body'>
<Transforms>
<Transform Algorithm='http://www.w3.org/2000/09/xmldsig#enveloped-signature'/>
</Transforms>
<DigestMethod Algorithm='http://www.w3.org/2000/09/xmldsig#sha1'/>
<DigestValue>WbLbIc...k=</DigestValue>
</Reference>
<Reference URI='#Timestamp'>
<Transforms>
<Transform Algorithm='http://www.w3.org/2000/09/xmldsig#enveloped-signature'/>
</Transforms>
<DigestMethod Algorithm='http://www.w3.org/2000/09/xmldsig#sha1'/>
<DigestValue>z3q....9w=</DigestValue>
</Reference>
<Reference URI='#Token'>
<Transforms>
<Transform Algorithm='http://www.w3.org/2000/09/xmldsig#enveloped-signature'/>
</Transforms>
<DigestMethod Algorithm='http://www.w3.org/2000/09/xmldsig#sha1'/>
<DigestValue>ypE6U....slo=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>lW1....Tc=</SignatureValue>
<KeyInfo>
<wsse:SecurityTokenReference>
<wsse:Reference URI='#Token' ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3'/>
</wsse:SecurityTokenReference>
</KeyInfo>
</Signature>
<wsu:Timestamp wsu:Id='Timestamp'>
<wsu:Created>2015-03-25T13:03:11Z</wsu:Created>
<wsu:Expires>2015-03-25T13:13:13Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</SOAPENV:Header>
<SOAPENV:Body wsu:Id='body' xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>
<wst:RequestSecurityToken xmlns:wst='http://schemas.xmlsoap.org/ws/2005/02/trust'>
<wst:TokenType>http://schemas.xmlsoap.org/ws/2005/02/sc/sct</wst:TokenType>
<wst:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</wst:RequestType>
</wst:RequestSecurityToken>
</SOAPENV:Body>
</SOAPENV:Envelope>
这些是我的策略设置:
<wsp:Policy wsu:Id="CertificateSecurityPolicy">
<wsp:ExactlyOne>
<wsp:All>
<sp:AsymmetricBinding>
<wsp:Policy>
<sp:RecipientToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:RequireIssuerSerialReference/>
<sp:WssX509V3Token10/>
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientToken>
<sp:InitiatorToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:RequireIssuerSerialReference/>
<sp:WssX509V3Token10/>
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256/>
<sp:InclusiveC14N/>
<!--<sp:InclusiveC14N11/>-->
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax/>
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp/>
</wsp:Policy>
</sp:AsymmetricBinding>
<sp:SignedParts>
<sp:Body/>
<sp:Header Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
</sp:SignedParts>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
每个请求都会引发以下错误:
Caused by: org.apache.ws.security.WSSecurityException: An error was discovered processing the header (A bad canonicalization algorithm was specified) at org.apache.ws.security.processor.SignatureProcessor.checkBSPCompliance(SignatureProcessor.java:721) [wss4j-1.6.15.redhat-1.jar:1.6.15.redhat-1] at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:405) [wss4j-1.6.15.redhat-1.jar:1.6.15.redhat-1]
这是一个后续问题: How to use CXF STS and X509v3 BinarySecurityToken
编辑 1
我需要将属性ws-security.is-bsp-complian设置为 false。然后我收到另一条错误消息:
Caused by: org.apache.ws.security.WSSecurityException: An error was discovered processing the <wsse:Security> header
at org.apache.ws.security.components.crypto.AlgorithmSuiteValidator.checkC14nAlgorithm(AlgorithmSuiteValidator.java:77) [wss4j-1.6.15.redhat-1.jar:1.6.15.redhat-1]
at org.apache.ws.security.components.crypto.AlgorithmSuiteValidator.checkSignatureAlgorithms(AlgorithmSuiteValidator.java:95) [wss4j-1.6.15.redhat-1.jar:1.6.15.redhat-1]
显然以下条件失败:
"http://www.w3.org/2001/10/xml-exc-c14n#" == "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315 "从消息中提取。现在,如果我可以将 REC-xml-c14n-20010315 添加到允许的算法列表中...
编辑2
再次阅读规范后,我相信 cxf 忽略了元素 sp:InclusiveC14N
。我需要将它放在 wsdl 中的其他位置
编辑3
org.apache.cxf.sts.SignatureProperties 类将默认算法定义为 http://www.w3.org/2001/10/xml-exc-c14n#
public class SignatureProperties {
...
private String c14nAlgorithm = WSConstants.C14N_EXCL_OMIT_COMMENTS;
private List<String> acceptedC14nAlgorithms = new ArrayList<String>();
public SignatureProperties() {
...
// Default c14n algorithms
acceptedC14nAlgorithms.add(c14nAlgorithm);
}
如果我只能覆盖它,它应该可以工作。怎么办。
最佳答案
实际上,CXF/WSS4J 到目前为止还不支持 InclusiveC14N 策略。我已在下一个版本 (3.0.5/3.1.0) 中修复了此问题:https://issues.apache.org/jira/browse/CXF-6333
科尔姆。
关于java - JBOSS:无效算法http://www.w3.org/TR/2001/REC-xml-c14n-20010315(InclusiveC14N),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29283218/
我正在使用 nginx on Rackspace cloud following a tutorial并且已经搜索了网络,但到目前为止无法对此进行排序。 出于 SEO 和其他原因,我希望 www.my
我到处搜索并尝试了各种 .htaccess 配置,但没有找到答案。 只访问 .htaccess 文件我想: 将 NON www 定向到 NON www SSL示例:http://example.com
下面的 htaccess 命令将所有非 www 转移到 http www RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^
我希望重定向所有内容: http:// http://www. https://www. to https:// 这可能已经在这里得到了回答,但是在浏览了看起来相关的问题后,它们都不完全是我想要的,并
我有一个全新的网站,最初是 http://然后我将网站重定向到 http://www它的工作就像一个魅力,但自从我安装了 SSL 我有两个版本的网站 http://www.example.com和 h
我必须将我的网站从 https://www.example.com/ 重定向到 https://website.com/。 SSL 已正确安装在我的服务器上。 我正在使用 Apache 并且必须使用
我有一个 SEO 人员让我很困惑。他提到在 Google 网站管理员工具中,我应该验证网站的 www 版本以及非 www(非 www 已经验证)。所以我告诉他没有必要,因为出于规范原因(如 Matt
-- 请参阅下面的 Tl;dr 以获得简短版本-- 在我的 ubuntu-16.04 droplet apache2 和 php7 上都使用用户 www-data。在某些时候,所有三个 wordpre
Tumblr 的文档 ' Using a custom domain name ' 非常有帮助,它清楚地说明我需要创建一个 A唱片为 example.com指向 66.6.44.4 ,以便我的网站可以
我有一个托管在谷歌云存储桶上的静态网站。 在我的存储桶前面,我有 cloudflare dns。 存储桶是 example.com Cloudflare 设置:CNAME > @ > c.storag
我正在使用以下代码编写 www 到非 www 重定向: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
我的一个 friend 目前正在修补 JpCap在 Java 中,我们发现了一些关于 Java 正则表达式的有趣(也许?)问题。 只有 HTTP 流量被捕获并随后进行分析。为此,他使用了如下模式: P
我目前在 htaccess 文件中使用以下代码,将我的服务器中托管的网站的所有非 www 网址重定向到 www 网址。 RewriteCond %{HTTP_HOST} !^www\. Rewrite
我有一个 wordpress 网站 www.domain.com,我们刚刚购买了一个 SSL 证书,但它只适用于 domain.com(没有 www)。我配置了 .htaccess 和站点 url R
我的 Apache 服务器上的虚拟主机中有以下内容, Redirect permanent / https://domain.com Options
我正在尝试将所有流量从 HTTP 站点重定向到 HTTPS 站点,并将所有 www 流量重定向到非 www 站点。我的设置包括 HTTP 站点的 nginx.conf 文件,我已将 301 重定向规则
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 12 年前。 Improve thi
我有一个域说 http://www.testexample.com .当我登录 http://www.testexample.com然后回到http://testexample.com在浏览器中;登录
我正在为我的 Web 应用程序使用 EC2 实例。我买了一个新的 SSL 并将其安装在 AWS 经典负载均衡器上,我的 SSL 工作正常。但从 SEO 的角度来看,我想将所有请求从 www 和非 ww
这是否受跨源策略限制? 最佳答案 你不能。您只能向 www.foo.com 发送请求。 关于javascript - 在页面 'www.foo.com' 上,从 'www.example.com' 加
我是一名优秀的程序员,十分优秀!