Pemecahan masalah error deployment kebijakan Pernyataan SAML

Anda sedang melihat dokumentasi Apigee Edge.
Buka dokumentasi Apigee X.
info

SourceNotConfigured

Pesan Error

Deployment proxy API melalui UI Edge atau Edge Management API gagal dengan pesan error ini:

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

Contoh Pesan Error

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

Contoh Screenshot Error

Penyebab

Deployment Proxy API gagal dengan error ini jika satu atau beberapa elemen kebijakan Validasi Pernyataan SAML berikut tidak ditentukan atau kosong: <Source>, <XPath>, <Namespaces>, <Namespace>.

Misalnya, jika Anda tidak menyertakan elemen <XPath> atau membiarkan elemen <Source> atau entitasnya kosong, maka deployment proxy API akan gagal.

Diagnosis

  1. Identifikasi nama kebijakan Validasi Pernyataan SAML yang gagal dari pesan error. Misalnya, dalam error berikut, nama kebijakan Validate SAML Assertion adalah Validate-SAML-Assertion-1.

    ValidateSAMLAssertion[Validate-SAML-Assertion-1]: Source is not correctly configured.
    
  2. Periksa XML kebijakan Validasi Pernyataan SAML yang gagal. Periksa apakah satu atau beberapa elemen kebijakan berikut tidak ada atau kosong: <Source>, <XPath>, <Namespaces>, <Namespace>. Jika ya, hal tersebut bisa menjadi penyebab error.

    Misalnya, kebijakan berikut memiliki elemen <Namespaces> kosong di bawah elemen <Source>:

    <?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. Pada contoh di atas, elemen <Namespaces> kosong, sehingga Anda akan mendapatkan error:

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

Resolusi

Pastikan nilai elemen <Source> dikonfigurasi dengan benar dengan elemen <Namespaces> dan elemen turunannya <Namespace>. Anda juga harus memastikan elemen <XPath> ditentukan dan tidak kosong.

Untuk memperbaiki contoh kebijakan Validasi Pernyataan SAML yang ditampilkan di atas, Anda dapat menambahkan elemen <Namespace> serta <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

Pesan Error

Deployment proxy API melalui UI Edge atau Edge Management API gagal dengan pesan error ini:

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

Contoh Pesan Error

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

Contoh Screenshot Error

Penyebab

Jika elemen <TrustStore> kosong atau tidak ditentukan dalam kebijakan ValidateSAMLAssertion, maka deployment proxy API akan gagal. Toko Tepercaya yang valid wajib diisi.

Diagnosis

  1. Periksa semua kebijakan Validasi Pernyataan SAML di Proxy API tertentu tempat kegagalan terjadi. Jika ada kebijakan Validasi Pernyataan SAML yang elemen <TrustStore>-nya kosong atau tidak ditentukan, maka itulah penyebab errornya.

    <?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>
    

Resolusi

Pastikan elemen <TrustStore> selalu ditentukan dan tidak kosong dalam kebijakan Validasi Pernyataan SAML. Nama <TrustStore> harus cocok dengan nama TrustStore yang valid dan ada di semua lingkungan tempat Anda mencoba men-deploy proxy.

Untuk memperbaiki contoh di atas, Anda dapat menentukan elemen <TrustStore> dengan nilai yang valid.

<?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>

Lihat Truststore dan Keystore untuk mengetahui informasi selengkapnya tentang cara menggunakan Truststore.

NullKeyStore

Pesan Error

Deployment proxy API melalui UI Edge atau Edge Management API gagal dengan pesan error ini:

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

Contoh Pesan Error

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

Contoh Screenshot Error

Penyebab

Jika elemen turunan <Name> kosong atau tidak ditentukan dalam elemen <Keystore> kebijakan GenerateSAMLAssertion, maka deployment proxy API akan gagal. Nama Keystore yang valid wajib diisi.

Diagnosis

  1. Periksa semua kebijakan Generate SAML Assertion di Proxy API tertentu tempat terjadinya kegagalan. Jika ada kebijakan Generate SAML Assertion yang elemen turunannya <Name> kosong atau tidak ditentukan dalam elemen <Keystore>, maka itulah penyebab error.

    Kebijakan Generate SAML Assertion berikut memiliki elemen turunan <Name> kosong dalam elemen <Keystore>:

    <?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>
    

Resolusi

Pastikan elemen turunan <Name> selalu ditentukan dan tidak kosong dalam elemen <Keystore> kebijakan Generate SAML Assertion.

Untuk memperbaiki contoh di atas, Anda dapat menentukan elemen <Name> dengan benar serta memastikan bahwa nilai yang valid ditentukan untuk elemen <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>

Lihat contoh dari Contoh Kode dalam Artikel Referensi Kebijakan SAMLAssertion.

NullKeyStoreAlias

Pesan Error

Deployment proxy API melalui UI Edge atau Edge Management API gagal dengan pesan error ini:

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

Contoh Pesan Error

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

Contoh Screenshot Error

Penyebab

Jika elemen turunan <Alias> kosong atau tidak ditentukan dalam elemen <Keystore> kebijakan Generate SAML Assertion, deployment proxy API akan gagal. Alias Keystore yang valid wajib diisi.

Diagnosis

  1. Periksa semua kebijakan Generate SAML Assertion di Proxy API tertentu tempat terjadinya kegagalan. Jika ada kebijakan Generate SAML Assertion yang elemen turunannya <Alias> kosong atau tidak ditentukan dalam elemen <Keystore>, maka itulah penyebab error.

    Kebijakan Generate SAML Assertion berikut memiliki elemen turunan <Alias> kosong dalam elemen <Keystore>:

    <?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>
    

Resolusi

Pastikan elemen turunan <Name> selalu ditentukan dan tidak kosong dalam elemen <Keystore> kebijakan Buat Pernyataan SAML.

Untuk memperbaiki contoh di atas, Anda dapat menentukan elemen <Alias> dengan benar serta memastikan bahwa nilai yang valid ditentukan untuk elemen <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>

Lihat contoh dari Contoh Kode dalam Artikel Referensi Kebijakan SAMLAssertion.

NullIssuer

Pesan Error

Deployment proxy API melalui UI Edge atau Edge Management API gagal dengan pesan error ini:

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

Contoh Pesan Error

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

Contoh Screenshot Error

Penyebab

Jika elemen <Issuer> kosong atau tidak ditentukan dalam kebijakan Generate SAML Assertion, deployment proxy API akan gagal. Nilai <Issuer> yang valid wajib diisi.

Diagnosis

  1. Periksa semua kebijakan Buat Pernyataan SAML di API Proxy tertentu tempat kegagalan terjadi. Jika ada kebijakan Buat Pernyataan SAML yang elemen <Issuer>-nya kosong atau tidak ditentukan, maka itulah penyebab errornya.

    Kebijakan Generate SAML Assertion berikut memiliki elemen <Issuer> kosong:

    <?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>
    

Resolusi

Pastikan elemen <Issuer> selalu ditentukan dan tidak kosong dalam kebijakan Buat Pernyataan SAML.

Untuk memperbaiki contoh di atas, tentukan elemen <Issuer> dengan benar:

<?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>

Lihat contoh dari Contoh Kode dalam Artikel Referensi Kebijakan SAMLAssertion.