该规范规定:
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>
...我这样做:
...
<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>
...它不起作用。
因此,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>
...我说的对吗?
发布于 2014-07-15 09:36:36
您自己的服务的元数据应该包含您的公钥和证书。是的,您可以使用相同的签名和加密。
当IDP想加密要发送给SP的数据时,它使用SP的公钥进行加密。因此,不需要将“IdP的开放密钥证书”作为加密密钥。
您提到使用相同的密钥进行签名和加密都不起作用,您是否能够获得更多关于哪些具体失败以及在哪里失败的详细信息?
https://stackoverflow.com/questions/24750081
复制相似问题