पुष्टि करने की सामान्य नीति के तहत डिप्लॉयमेंट से जुड़ी गड़बड़ी ठीक करना

Apigee Edge का दस्तावेज़ देखा जा रहा है.
Apigee X के दस्तावेज़ पर जाएं.
info

पर क्लिक करें.

UserNameRequired

गड़बड़ी का मैसेज

Edge यूज़र इंटरफ़ेस (यूआई) या Edge Management API के ज़रिए एपीआई प्रॉक्सी को डिप्लॉय करने पर, यह गड़बड़ी का मैसेज दिखता है:

Error Deploying Revision revision_number to env_name
BasicAuthenticationPolicy: Username element must be present for operation operation.

गड़बड़ी के मैसेज का उदाहरण

Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Username element must be present for Encode operation.

उदाहरण के तौर पर दिया गया स्क्रीनशॉट

वजह

अगर BasicAuthentication नीति में <User> एलिमेंट को तय नहीं किया गया है, तो एपीआई प्रॉक्सी को डिप्लॉय नहीं किया जा सकेगा. Encode और Decode, दोनों कार्रवाइयों के लिए <User> एलिमेंट ज़रूरी है.

संक्रमण की जांच

  1. एपीआई प्रॉक्सी में इस्तेमाल की गई सभी BasicAuthentication नीतियों की जांच करें. अगर किसी नीति में <User> एलिमेंट के बारे में नहीं बताया गया है, तो यह गड़बड़ी की वजह है. Encode या Decode ऑपरेशनों के लिए, BasicAuthentication नीति में <User> एलिमेंट का होना ज़रूरी है.

    नीचे दिखाई गई BasicAuthentication नीति का इस्तेमाल Encode ऑपरेशन के लिए किया जाता है. हालांकि, इसमें <User> एलिमेंट तय नहीं किया गया है:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <BasicAuthentication name="ApplyBasicAuthHeader">
      <DisplayName>ApplyBasicAuthHeader</DisplayName>
      <Operation>Encode</Operation>
      <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
      <Password ref="BasicAuth.credentials.password"/>
      <AssignTo createNew="false">request.header.Authorization</AssignTo>
    </BasicAuthentication>
    

    नीचे दी गई गड़बड़ी की वजह से, डिप्लॉयमेंट पूरा नहीं हो सका:

    BasicAuthenticationPolicy: Username element must be present for Encode operation.
    

रिज़ॉल्यूशन

पक्का करें कि Encode या Decode ऑपरेशन के लिए, BasicAuthentication नीति में <User> एलिमेंट तय किया गया हो.

ऊपर दिए गए उदाहरण को ठीक करने के लिए, नीति में <User>element शामिल करें. इसके लिए, यहां दिया गया तरीका अपनाएं:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasicAuthentication name="ApplyBasicAuthHeader">
    <DisplayName>ApplyBasicAuthHeader</DisplayName>
    <Operation>Encode</Operation>
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <User ref="BasicAuth.credentials.username"/>
    <Password ref="BasicAuth.credentials.password"/>
    <AssignTo createNew="false">request.header.Authorization</AssignTo>
</BasicAuthentication>

PasswordRequired

गड़बड़ी का मैसेज

Edge यूज़र इंटरफ़ेस (यूआई) या Edge Management API के ज़रिए एपीआई प्रॉक्सी को डिप्लॉय करने पर, यह गड़बड़ी का मैसेज दिखता है:

Error Deploying Revision revision_number to env_name
BasicAuthenticationPolicy: Password element must be present for operation operation.

गड़बड़ी के मैसेज का उदाहरण

Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Password element must be present for Encode operation.

उदाहरण के तौर पर दिया गया स्क्रीनशॉट

वजह

अगर BasicAuthentication नीति में <Password> एलिमेंट को तय नहीं किया गया है, तो एपीआई प्रॉक्सी को डिप्लॉय नहीं किया जा सकेगा. Encode और Decode, दोनों कार्रवाइयों के लिए <Password> एलिमेंट ज़रूरी है.

संक्रमण की जांच

  1. एपीआई प्रॉक्सी में इस्तेमाल की गई सभी BasicAuthentication नीतियों की जांच करें. अगर किसी नीति में <Password> एलिमेंट को तय नहीं किया गया है, तो यह गड़बड़ी की वजह है. Encode या Decode ऑपरेशन के लिए, BasicAuthentication नीति में <Password> एलिमेंट का होना ज़रूरी है.

    नीचे दिखाई गई BasicAuthentication नीति का इस्तेमाल Encode ऑपरेशन के लिए किया जाता है. हालांकि, इसमें <Password> एलिमेंट तय नहीं किया गया है:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <BasicAuthentication name="ApplyBasicAuthHeader">
      <DisplayName>ApplyBasicAuthHeader</DisplayName>
      <Operation>Encode</Operation>
      <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
      <User ref="BasicAuth.credentials.username"/>
      <AssignTo createNew="false">request.header.Authorization</AssignTo>
    </BasicAuthentication>
    

    नीचे दी गई गड़बड़ी की वजह से, डिप्लॉयमेंट पूरा नहीं हो सका:

    BasicAuthenticationPolicy: Password element must be present for Encode operation.
    

रिज़ॉल्यूशन

पक्का करें कि Encode या Decode ऑपरेशन के लिए, BasicAuthentication नीति में <Password> एलिमेंट तय किया गया हो.

ऊपर दिए गए उदाहरण को ठीक करने के लिए, नीति में <Password>element शामिल करें. इसके लिए, यहां दिया गया तरीका अपनाएं:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasicAuthentication name="ApplyBasicAuthHeader">
    <DisplayName>ApplyBasicAuthHeader</DisplayName>
    <Operation>Encode</Operation>
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <User ref="BasicAuth.credentials.username"/>
    <Password ref="BasicAuth.credentials.password"/>
    <AssignTo createNew="false">request.header.Authorization</AssignTo>
</BasicAuthentication>

AssignToRequired

गड़बड़ी का मैसेज

Edge यूज़र इंटरफ़ेस (यूआई) या Edge Management API के ज़रिए एपीआई प्रॉक्सी को डिप्लॉय करने पर, यह गड़बड़ी का मैसेज दिखता है:

Error Deploying Revision revision_number to env_name
BasicAuthenticationPolicy: AssignTo element must be present for operation operation.

गड़बड़ी के मैसेज का उदाहरण

Error Deploying Revision 2 to test
BasicAuthenticationPolicy: AssignTo element must be present for Encode operation.

उदाहरण के तौर पर दिया गया स्क्रीनशॉट

वजह

अगर BasicAuthentication नीति में <AssignTo> एलिमेंट को तय नहीं किया गया है, तो एपीआई प्रॉक्सी को डिप्लॉय नहीं किया जा सकेगा. Encode और Decode, दोनों कार्रवाइयों के लिए <AssignTo> एलिमेंट ज़रूरी है.

संक्रमण की जांच

  1. एपीआई प्रॉक्सी में इस्तेमाल की गई सभी BasicAuthentication नीतियों की जांच करें. अगर कोई ऐसी नीति है जिसमें एलिमेंट <AssignTo> को तय नहीं किया गया है, तो यह गड़बड़ी इसी वजह से हुई है. Encode और Decode, दोनों कार्रवाइयों के लिए, BasicAuthentication नीति में <AssignTo> एलिमेंट को तय करना ज़रूरी है.

    नीचे दिखाई गई BasicAuthentication नीति का इस्तेमाल Encode ऑपरेशन के लिए किया जाता है. हालांकि, इसमें <AssignTo> एलिमेंट तय नहीं किया गया है:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <BasicAuthentication name="ApplyBasicAuthHeader">
      <DisplayName>ApplyBasicAuthHeader</DisplayName>
      <Operation>Encode</Operation>
      <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
      <User ref="BasicAuth.credentials.username"/>
      <Password ref="BasicAuth.credentials.password"/>
    </BasicAuthentication>
    

    नीचे दी गई गड़बड़ी की वजह से, डिप्लॉयमेंट पूरा नहीं हो सका:

    BasicAuthenticationPolicy: AssignTo element must be present for Encode operation.
    

रिज़ॉल्यूशन

पक्का करें कि Encode या Decode ऑपरेशन के लिए, BasicAuthentication नीति में <AssignTo> एलिमेंट तय किया गया हो.

ऊपर दिए गए उदाहरण को ठीक करने के लिए, नीति में <AssignTo>element शामिल करें. इसके लिए, यहां दिया गया तरीका अपनाएं:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasicAuthentication name="ApplyBasicAuthHeader">
    <DisplayName>ApplyBasicAuthHeader</DisplayName>
    <Operation>Encode</Operation>
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <User ref="BasicAuth.credentials.username"/>
    <Password ref="BasicAuth.credentials.password"/>
    <AssignTo createNew="false">request.header.Authorization</AssignTo>
</BasicAuthentication>

SourceRequired

गड़बड़ी का मैसेज

Edge यूज़र इंटरफ़ेस (यूआई) या Edge Management API के ज़रिए एपीआई प्रॉक्सी को डिप्लॉय करने पर, यह गड़बड़ी का मैसेज दिखता है:

Error Deploying Revision revision_number to env_name
BasicAuthenticationPolicy: Source element must be present for Decode operation.

गड़बड़ी के मैसेज का उदाहरण

Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Source element must be present for Decode operation.

उदाहरण के तौर पर दिया गया स्क्रीनशॉट

वजह

अगर डिकोडिंग ऑपरेशन के लिए इस्तेमाल की जाने वाली BasicAuthentication नीति में <Source> एलिमेंट को तय नहीं किया गया है, तो एपीआई प्रॉक्सी को डिप्लॉय नहीं किया जा सकेगा. अगर BasicAuthentication नीति में <Operation> को Decode के तौर पर तय किया गया है, तो <Source> एलिमेंट को शामिल करना ज़रूरी है.

संक्रमण की जांच

  1. एपीआई प्रॉक्सी में इस्तेमाल की गई सभी BasicAuthentication नीतियों की जांच करें. अगर किसी नीति में <Source> एलिमेंट को तय नहीं किया गया है और <Operation> एलिमेंट को Decode के तौर पर तय किया गया है, तो यह गड़बड़ी की वजह है. अगर BasicAuthentication नीति में <Operation> को Decode के तौर पर तय किया गया है, तो <Source> एलिमेंट को शामिल करना ज़रूरी है.

    नीचे दिखाई गई BasicAuthentication नीति का सैंपल, Decode ऑपरेशन के लिए इस्तेमाल किया जाता है. हालांकि, इसमें <Source> एलिमेंट तय नहीं किया गया है:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <BasicAuthentication name="ApplyBasicAuthHeader">
      <DisplayName>ApplyBasicAuthHeader</DisplayName>
      <Operation>Decode</Operation>
      <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
      <User ref="BasicAuth.credentials.username"/>
      <Password ref="BasicAuth.credentials.password"/>
      <AssignTo createNew="false">request.header.Authorization</AssignTo>
    </BasicAuthentication>
    

    नीचे दी गई गड़बड़ी की वजह से, डिप्लॉयमेंट पूरा नहीं हो सका:

    BasicAuthenticationPolicy: Source element must be present for Decode operation.
    

रिज़ॉल्यूशन

पक्का करें कि Decode ऑपरेशन के लिए इस्तेमाल किए जाने पर, <Source> एलिमेंट को BasicAuthentication नीति में तय किया गया हो.

ऊपर दिए गए उदाहरण को ठीक करने के लिए, नीति में <Source>element शामिल करें. इसके लिए, यहां दिया गया तरीका अपनाएं:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasicAuthentication name="ApplyBasicAuthHeader">
    <DisplayName>ApplyBasicAuthHeader</DisplayName>
    <Operation>Decode</Operation>
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <User ref="BasicAuth.credentials.username"/>
    <Password ref="BasicAuth.credentials.password"/>
    <AssignTo createNew="false">request.header.Authorization</AssignTo>
    <Source>request.header.Authorization</Source>
</BasicAuthentication>