2

我在 Novell iManager 中收到错误消息“ XML 格式错误。cvc-complex-type.2.4.a: 发现以元素“md:EncryptionMethod”开头的无效内容。“{”之一 http://www.w3 .org/2000/09/xmldsig#":KeyInfo}' 是预期的。 " 添加此服务提供者元数据时:

<?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:发现以元素“组织”开头的无效内容。“{”之一 http://www.w3.org/2000/09/xmldsig#”: Signature, "urn:oasis:names:tc:SAML:2.0:metadata":Extensions, "urn:oasis:names:tc:SAML:2.0:metadata":RoleDescriptor, "urn:oasis:names:tc:SAML:2.0 :metadata":IDPSSODescriptor, "urn:oasis:names:tc:SAML:2.0:metadata":SPSSODescriptor, "urn:oasis:names:tc:SAML:2.0:metadata":AuthnAuthorityDescriptor, "urn:oasis:names:tc :SAML:2.0:metadata":AttributeAuthorityDescriptor, "urn:oasis:names:tc:SAML:2.0:metadata":PDPDescriptor, "urn:oasis:names:tc:SAML:2.0:metadata":AffiliationDescriptor}' 是预期的。 "

看起来它需要一些服务提供商特定的元数据文件格式,不幸的是我无法找到有关不同格式的 SAML 2.0 元数据的任何信息。

4

1 回答 1

2

好像有 2 个问题:1)Novell 需要严格的元素顺序 2)它不识别默认命名空间,例如<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">使用<somenamespace:KeyInfo xmlns:somenamespace="http://www.w3.org/2000/09/xmldsig#">

诡异的 :)

于 2012-11-19T19:58:05.883 回答