SAML アサーション ポリシーのデプロイエラーのトラブルシューティング

Apigee Edge のドキュメントを表示しています。
Apigee X のドキュメントを表示します。

SourceNotConfigured

エラー メッセージ

Edge UI または Edge Management API を介した API プロキシのデプロイに失敗し、次のエラー メッセージが表示されます。

Error Deploying Revision revision_number to environment
ValidateSAMLAssertion[policy_name]: Source is not correctly configured.

エラー メッセージの例

Error Deploying Revision 2 to test
ValidateSAMLAssertion[Validate-SAML-Assertion-1]: Source is not correctly configured.

エラーのスクリーンショットの例

原因

Validate SAML Assertion ポリシーの次の要素のうち 1 つ以上が定義されていないか空の場合、API プロキシのデプロイはこのエラーで失敗します: <Source><XPath><Namespaces><Namespace>

たとえば、<XPath> 要素が欠落している場合や、<Source> 要素またはそのエンティティが空の場合、API プロキシのデプロイに失敗します。

診断

  1. エラー メッセージから、失敗した SAML アサーション ポリシー名を特定します。たとえば、次のエラーでは、Validate SAML Assertion ポリシー名が Validate-SAML-Assertion-1 です。

    ValidateSAMLAssertion[Validate-SAML-Assertion-1]: Source is not correctly configured.
    
  2. 失敗した SAML アサーション ポリシーの XML を調べます。ポリシーの <Source><XPath><Namespaces><Namespace> 要素が 1 つ以上欠落しているか、または空になっていないか確認します。その場合、エラーの原因である可能性があります。

    たとえば、次のポリシーでは、<Source> 要素の下に空の <Namespaces> 要素があります。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ValidateSAMLAssertion name="SAML" ignoreContentType="false">
      <Source name="request">
        <Namespaces></Namespaces>
       </Source>
       <Description/>
     <TrustStore>ref://TrustStoreName</Truststore>
     <RemoveAssertion>false</RemoveAssertion>
    </ValidateSAMLAssertion>
    
  3. 前述の例では、<Namespaces> 要素は空であるため、次のエラーが発生します。

    ValidateSAMLAssertion[Validate-SAML-Assertion-1]: Source is not correctly configured.
    

解像度

<Source> 要素の値が <Namespaces> 要素とその子要素 <Namespace> で正しく構成されていることを確認します。また、<XPath> 要素が定義され、空でないことも確認する必要があります。

前述の SAML アサーション ポリシーの例を修正するには、<Namespace> 要素と <XPath> を追加します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ValidateSAMLAssertion name="SAML" ignoreContentType="false">
  <Source name="request">
    <Namespaces>
      <Namespace prefix='soap'>http://schemas.xmlsoap.org/soap/envelope/</Namespace>
      <Namespace prefix='wsse'>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</Namespace>
      <Namespace prefix='saml'>urn:oasis:names:tc:SAML:2.0:assertion</Namespace>
    </Namespaces>
    <XPath>/soap:Envelope/soap:Header/wsse:Security/saml:Assertion</XPath>
  </Source>
   <Description/>
<TrustStore>ref://TrustStoreName</Truststore>
<RemoveAssertion>false</RemoveAssertion>
</ValidateSAMLAssertion>

TrustStoreNotConfigured

エラー メッセージ

Edge UI または Edge Management API を介した API プロキシのデプロイに失敗し、次のエラー メッセージが表示されます。

Error Deploying Revision revision_number to environment
ValidateSAMLAssertion[[Ljava.lang.Object;@object]: Trust store is not correctly configured.

エラー メッセージの例

Error Deploying Revision 2 to test
ValidateSAMLAssertion[[Ljava.lang.Object;@39537262]: Trust store is not correctly configured.

エラーのスクリーンショットの例

原因

<TrustStore> 要素が空である、または ValidateSAMLAssertion ポリシーで指定されていない場合、API プロキシのデプロイは失敗します。有効なトラストストアが必要です。

診断

  1. エラーが発生した特定の API プロキシで、すべての Validate SAML Assertion ポリシーを調べます。<TrustStore> 要素 が空であるか、要素で指定されていない Validate SAML Assertion ポリシーがある場合、これがエラーの原因です。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ValidateSAMLAssertion name="SAML" ignoreContentType="false">
     <Source name="request">
        <Namespaces>
          <Namespace prefix='soap'>http://schemas.xmlsoap.org/soap/envelope/</Namespace>
          <Namespace prefix='wsse'>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</Namespace>
          <Namespace prefix='saml'>urn:oasis:names:tc:SAML:2.0:assertion</Namespace>
        </Namespaces>
        <XPath>/soap:Envelope/soap:Header/wsse:Security/saml:Assertion</XPath>
      </Source>
        <Description/>
        <TrustStore/>
      <RemoveAssertion>false</RemoveAssertion>
    </ValidateSAMLAssertion>
    

解像度

「SAML アサーションの検証」ポリシーで必ず要素<TrustStore>を指定し、空にしないでください。<TrustStore> 名は、プロキシをデプロイするすべての環境にある有効な TrustStore の名前と一致する必要があります。

上の例を修正するには、有効な値で <TrustStore> 要素を指定します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ValidateSAMLAssertion name="SAML" ignoreContentType="false">
  <Source name="request">
    <Namespaces>
      <Namespace prefix='soap'>http://schemas.xmlsoap.org/soap/envelope/</Namespace>
      <Namespace prefix='wsse'>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</Namespace>
      <Namespace prefix='saml'>urn:oasis:names:tc:SAML:2.0:assertion</Namespace>
    </Namespaces>
    <XPath>/soap:Envelope/soap:Header/wsse:Security/saml:Assertion</XPath>
  </Source>
  <TrustStore>TrustStoreName</TrustStore>
  <RemoveAssertion>false</RemoveAssertion>
</ValidateSAMLAssertion>

トラストストアの使用方法については、トラストストアとキーストアをご覧ください。

NullKeyStore

エラー メッセージ

Edge UI または Edge Management API を介した API プロキシのデプロイに失敗し、次のエラー メッセージが表示されます。

Error Deploying Revision revision_number to environment
Assertion KeyStore name cannot be null.

エラー メッセージの例

Error Deploying Revision 4 to test
Assertion KeyStore name cannot be null.

エラーのスクリーンショットの例

原因

子要素 <Name> が空であるか、GenerateSAMLAssertion ポリシーの <Keystore> 要素が指定されていない場合、API プロキシのデプロイは失敗します。有効なキーストア名が必要です。

診断

  1. エラーが発生した API プロキシで、Generate SAML アサーション ポリシーをすべて確認します。子要素 <Name> が空であるか、<Keystore> 要素が指定されていない Generate SAML Assertion ポリシーがある場合、これがエラーの原因です。

    次の Generate SAML Assertion ポリシーには、<Keystore> 要素の中に空の子要素 <Name> があります。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <GenerateSAMLAssertion name="SAML" ignoreContentType="false">`
      <CanonicalizationAlgorithm />
      <Issuer ref="reference">Issuer name</Issuer>
      <KeyStore>
        <Name></Name>
        <Alias ref="reference">alias</Alias>
      </KeyStore>
      <OutputVariable>
        <FlowVariable>assertion.content</FlowVariable>
        <Message name="request">
          <Namespaces>
            <Namespace prefix="test">http://www.example.com/test</Namespace>
          </Namespaces>
          <XPath>/envelope/header</XPath>
        </Message>
      </OutputVariable>
      <SignatureAlgorithm />
      <Subject ref="reference">Subject name</Subject>
      <Template ignoreUnresolvedVariables="false">
        <!-- A lot of XML goes here, in CDATA, with {} around
             each variable -->
      </Template>
    </GenerateSAMLAssertion>
    

解像度

Generate SAML Assertion ポリシーの <Keystore> 要素内に必ず子要素 <Name> を指定し、空にならないようにします。

上記の例を修正するには、<Name> 要素を正しく指定し、併せて <Alias> 要素に必ず有効な値を指定するようにします。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GenerateSAMLAssertion name="SAML" ignoreContentType="false">
  <CanonicalizationAlgorithm />
  <Issuer ref="reference">Issuer name</Issuer>
  <KeyStore>
    <Name ref="reference">keystorename</Name>
    <Alias ref="reference">alias</Alias>
  </KeyStore>
  <OutputVariable>
    <FlowVariable>assertion.content</FlowVariable>
    <Message name="request">
      <Namespaces>
        <Namespace prefix="test">http://www.example.com/test</Namespace>
      </Namespaces>
      <XPath>/envelope/header</XPath>
    </Message>
  </OutputVariable>
  <SignatureAlgorithm />
  <Subject ref="reference">Subject name</Subject>
  <Template ignoreUnresolvedVariables="false">
    <!-- A lot of XML goes here, in CDATA, with {} around
         each variable -->
  </Template>
</GenerateSAMLAssertion>

SAMLAssertion Policy Reference の記事の例をご覧ください。

NullKeyStoreAlias

エラー メッセージ

Edge UI または Edge Management API を介した API プロキシのデプロイに失敗し、次のエラー メッセージが表示されます。

Error Deploying Revision revision_number to environment
Assertion KeyStore alias cannot be null.

エラー メッセージの例

Error Deploying Revision 4 to test
Assertion KeyStore alias cannot be null.

エラーのスクリーンショットの例

原因

子要素 <Alias> が空である、または Generate SAML Assertion ポリシーの <Keystore> 要素で指定されていない場合、API プロキシのデプロイは失敗します。有効なキーストア エイリアスが必要です。

診断

  1. エラーが発生した API プロキシで、Generate SAML アサーション ポリシーをすべて確認します。子要素 <Alias> が空であるか、<Keystore> 要素が指定されていない Generate SAML Assertion ポリシーがある場合、これがエラーの原因です。

    次の Generate SAML Assertion ポリシーには、<Keystore> 要素の中に空の子要素 <Alias> があります。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <GenerateSAMLAssertion name="SAML" ignoreContentType="false">`
      <CanonicalizationAlgorithm />
      <Issuer ref="reference">Issuer name</Issuer>
      <KeyStore>
        <Name ref="reference">keystorename</Name>
        <Alias></Alias>
      </KeyStore>
      <OutputVariable>
        <FlowVariable>assertion.content</FlowVariable>
        <Message name="request">
          <Namespaces>
            <Namespace prefix="test">http://www.example.com/test</Namespace>
          </Namespaces>
          <XPath>/envelope/header</XPath>
        </Message>
      </OutputVariable>
      <SignatureAlgorithm />
      <Subject ref="reference">Subject name</Subject>
      <Template ignoreUnresolvedVariables="false">
        <!-- A lot of XML goes here, in CDATA, with {} around
             each variable -->
      </Template>
    </GenerateSAMLAssertion>
    

解像度

Generate SAML Assertion ポリシーの <Keystore> 要素内で、子要素 <Name> が常に指定され、空でないことを確認します。

上記の例を修正するには、<Alias> 要素を正しく指定し、併せて <Name> 要素に必ず有効な値を指定するようにします。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GenerateSAMLAssertion name="SAML" ignoreContentType="false">
  <CanonicalizationAlgorithm />
  <Issuer ref="reference">Issuer name</Issuer>
  <KeyStore>
    <Name ref="reference">keystorename</Name>
    <Alias ref="reference">alias</Alias>
  </KeyStore>
  <OutputVariable>
    <FlowVariable>assertion.content</FlowVariable>
    <Message name="request">
      <Namespaces>
        <Namespace prefix="test">http://www.example.com/test</Namespace>
      </Namespaces>
      <XPath>/envelope/header</XPath>
    </Message>
  </OutputVariable>
  <SignatureAlgorithm />
  <Subject ref="reference">Subject name</Subject>
  <Template ignoreUnresolvedVariables="false">
    <!-- A lot of XML goes here, in CDATA, with {} around
         each variable -->
  </Template>
</GenerateSAMLAssertion>

SAMLAssertion Policy Reference の記事の例をご覧ください。

NullIssuer

エラー メッセージ

Edge UI または Edge Management API を介した API プロキシのデプロイに失敗し、次のエラー メッセージが表示されます。

Error Deploying Revision revision_number to environment
Assertion Issuer cannot be null.

エラー メッセージの例

Error Deploying Revision 4 to test
Assertion Issuer cannot be null.

エラーのスクリーンショットの例

原因

<Issuer> 要素が空である、または Generate SAML Assertion ポリシーで指定されていない場合、API プロキシのデプロイは失敗します。有効な <Issuer> の値が必要です。

診断

  1. エラーが発生した API プロキシで、Generate SAML アサーション ポリシーをすべて確認します。<Issuer> 要素が空または指定されていない Generate SAML Assertion ポリシーがある場合、これがエラーの原因です。

    次の Generate SAML Assertion ポリシーの <Issuer> 要素が空です。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <GenerateSAMLAssertion name="SAML" ignoreContentType="false">`
      <CanonicalizationAlgorithm />
      <Issuer></Issuer>
      <KeyStore>
        <Name ref="reference">keystorename</Name>
        <Alias ref="reference">alias</Alias>
      </KeyStore>
      <OutputVariable>
        <FlowVariable>assertion.content</FlowVariable>
        <Message name="request">
          <Namespaces>
            <Namespace prefix="test">http://www.example.com/test</Namespace>
          </Namespaces>
          <XPath>/envelope/header</XPath>
        </Message>
      </OutputVariable>
      <SignatureAlgorithm />
      <Subject ref="reference">Subject name</Subject>
      <Template ignoreUnresolvedVariables="false">
        <!-- A lot of XML goes here, in CDATA, with {} around
             each variable -->
      </Template>
    </GenerateSAMLAssertion>
    

解像度

Generate SAML Assertion ポリシーで、<Issuer> 要素が常に指定され、空でないことを確認します。

上の例を修正するには、<Issuer> 要素を正しく指定します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GenerateSAMLAssertion name="SAML" ignoreContentType="false">
  <CanonicalizationAlgorithm />
  <Issuer ref="reference">Issuer name</Issuer>
  <KeyStore>
    <Name ref="reference">keystorename</Name>
    <Alias ref="reference">alias</Alias>
  </KeyStore>
  <OutputVariable>
    <FlowVariable>assertion.content</FlowVariable>
    <Message name="request">
      <Namespaces>
        <Namespace prefix="test">http://www.example.com/test</Namespace>
      </Namespaces>
      <XPath>/envelope/header</XPath>
    </Message>
  </OutputVariable>
  <SignatureAlgorithm />
  <Subject ref="reference">Subject name</Subject>
  <Template ignoreUnresolvedVariables="false">
    <!-- A lot of XML goes here, in CDATA, with {} around
         each variable -->
  </Template>
</GenerateSAMLAssertion>

SAMLAssertion Policy Reference の記事の例をご覧ください。