首页 文章

添加可信提供商(SAML 2.0)时出现问题:无法解析我的服务提供商元数据

提问于
浏览
2

我在Novell iManager中收到错误消息“XML格式错误.cvc-complex-type.2.4.a:从元素'md:EncryptionMethod'开始发现无效内容 . 预计会有一个'' . ”添加此服务提供商元数据时:

<?xml version="1.0" encoding="UTF-8"?>
  <md:EntityDescriptor entityID="https://.../" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata">
    <md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" WantAssertionsSigned="true" AuthnRequestsSigned="true"> 
      <md:KeyDescriptor use="encryption"> 
        <md:EncryptionMethod xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/> 
        <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> 
          <X509Data><X509Certificate>...</X509Certificate></X509Data>
       </KeyInfo> 
      </md:KeyDescriptor> 
      <md:AssertionConsumerService isDefault="true" index="0" Location="https://.." Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
  </md:SPSSODescriptor> 
  <md:Organization>...</md:Organization> 
   ...
</md:EntityDescriptor>

我在Novell iManager中做了什么:IdentityServers - > AH DMZ Identity Server - > New Trusted Provider - > Service Provider - > Source:Metadata Text

奇怪的是,它抱怨缺少 KeyInfo 元素,而它在这里使用正确的命名空间 . 知道为什么会这样吗?

如果我从这里指定第三方元数据:https://federation.njedge.net/metadata/njedge-fed-metadata.xml它说

“XML格式错误.cvc-complex-type.2.4.a:从元素'Organization'开始发现无效内容 . 预计会有一个'{ 1712915 :Signature, 1712916 :Extensions, 1712917 :RoleDescriptor, 1712918 :IDPSSODescriptor, 1712919 :SPSSODescriptor, 1712920 :AuthnAuthorityDescriptor, 1712921 :AttributeAuthorityDescriptor, 1712922 :PDPDescriptor, 1712923 :AffiliationDescriptor}' . ”

看起来它期望某些服务提供商特定的元数据文件格式,遗憾的是我无法找到有关SAML 2.0元数据的不同格式的任何信息 .

1 回答

  • 2

    像这样的Loos有两个问题:1)Novell期望严格的元素顺序2)它不识别像 <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> 这样的默认命名空间而是使用 <somenamespace:KeyInfo xmlns:somenamespace="http://www.w3.org/2000/09/xmldsig#">

    奇怪的 :)

相关问题