Ale*_*kov 6 cryptography shibboleth service-provider saml-2.0
规范说:
2.4.1.1元素
<KeyDescriptor>该
<KeyDescriptor>元素提供有关实体用于签名数据或接收加密密钥的加密密钥的信息,以及其他加密详细信息.其KeyDescriptorType复杂类型包含以下元素和属性:
use[可选的]可选属性,指定所描述的密钥的用途.值是从KeyTypes枚举中提取的,由值
encryption和值组成signing.
<ds:KeyInfo>[需要]直接或间接标识密钥的可选元素.
据我所知,为了向两个方向发送安全数据,我应该:
我应该在SP元数据中指定什么密钥的证书,并且我可以使用相同的证书进行签名和加密?
IdP的供应商提供了所谓的"元数据模板",其中指出了应该拼写的内容和位置.
这是相关部分(逐字):
...
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>
<!--
TODO It is necessary to insert here the certificate of the signature
key of the service provider in X509 DER format and Base64 encoded
-->
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
<md:KeyDescriptor use="encryption">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>
<!--
TODO It is necessary to insert here the certificate of the signature
key of the service provider in X509 DER format and Base64 encoded
-->
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
...
Run Code Online (Sandbox Code Playgroud)
我这样做:
...
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>
MIID...ZiQ==
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
<md:KeyDescriptor use="encryption">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>
MIID...ZiQ==
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
...
Run Code Online (Sandbox Code Playgroud)
这是行不通的.
因此,AFAIK用于签名我应该使用我的私钥证书,而对于加密我应该使用IdP的开放密钥证书.
恕我直言应该如此.
...
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>
<!-- certificate of my private key here-->
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
<md:KeyDescriptor use="encryption">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>
<!-- certificate of the open key of IdP here -->
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
...
Run Code Online (Sandbox Code Playgroud)
我对吗?
我非常感谢这些信息.谢谢大家.
您自己的服务的元数据应包含您的公钥和证书.是的,您可以使用相同的签名和加密.
当IDP想要加密要发送到SP的数据时,它使用SP的公钥来实现.因此,不需要包含"IdP的开放密钥证书"作为加密密钥.
您提到使用相同的密钥进行签名和加密都不起作用,您是否能够获得有关确切失败的详细信息以及位置?
| 归档时间: |
|
| 查看次数: |
5398 次 |
| 最近记录: |