<ph type="x-smartling-placeholder"></ph>
現在、Apigee Edge のドキュメントが表示されています。
Apigee X のドキュメント。 詳細
UserNameRequired
エラー メッセージ
Edge UI または Edge 管理 API を使用した 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.
スクリーンショットの例

原因
<User> 要素が BasicAuthentication ポリシーで定義されていない場合、API プロキシのデプロイは失敗します。Encode と Decode のオペレーションでは <User> 要素が必須です。
診断
API プロキシで使用されているすべての BasicAuthentication ポリシーを確認します。
<User>要素が指定されていないポリシーがある場合、それがエラーの原因です。BasicAuthentication ポリシーでは、Encode オペレーションまたは Decode オペレーションに<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.
解決策
BasicAuthentication ポリシー内で、Encode オペレーションまたは Decode オペレーションに <User> 要素が定義されていることを確認します。
上記の例を修正するには、次のようにポリシー内に <User> 要素を含めます。
<?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 UI または Edge 管理 API を使用した 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.
スクリーンショットの例

原因
<Password> 要素が BasicAuthentication ポリシーで定義されていない場合、API プロキシのデプロイは失敗します。Encode と Decode のオペレーションでは <Password> 要素が必須です。
診断
API プロキシで使用されているすべての BasicAuthentication ポリシーを確認します。
<Password>要素が定義されていないポリシーがある場合、それがエラーの原因です。BasicAuthentication ポリシーでは、Encode オペレーションまたは Decode オペレーションに<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.
解決策
BasicAuthentication ポリシー内で、Encode オペレーションまたは Decode オペレーションに <Password> 要素が定義されていることを確認します。
上記の例を修正するには、次のようにポリシー内に <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"/>
<Password ref="BasicAuth.credentials.password"/>
<AssignTo createNew="false">request.header.Authorization</AssignTo>
</BasicAuthentication>
AssignToRequired
エラー メッセージ
Edge UI または Edge 管理 API を使用した 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.
スクリーンショットの例

原因
<AssignTo> 要素が BasicAuthentication ポリシーで定義されていない場合、API プロキシのデプロイは失敗します。Encode と Decode のオペレーションでは <AssignTo> 要素が必須です。
診断
API プロキシで使用されているすべての BasicAuthentication ポリシーを確認します。要素
<AssignTo>が定義されていないポリシーがある場合、それがエラーの原因です。<AssignTo>要素は、BasicAuthentication ポリシーの Encode オペレーションと Decode オペレーションの両方で定義する必要があります。以下に示すサンプルの 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.
解決策
BasicAuthentication ポリシー内で、Encode オペレーションまたは Decode オペレーションに <AssignTo> 要素が定義されていることを確認します。
上記の例を修正するには、次のようにポリシー内に <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"/>
<AssignTo createNew="false">request.header.Authorization</AssignTo>
</BasicAuthentication>
SourceRequired
エラー メッセージ
Edge UI または Edge 管理 API を使用した 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.
スクリーンショットの例

原因
Decode オペレーションに使用される <Source> 要素が BasicAuthentication ポリシーで定義されていない場合、API プロキシのデプロイは失敗します。BasicAuthentication ポリシーで <Operation> が Decode として指定されている場合、<Source> 要素は必須です。
診断
API プロキシで使用されているすべての 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 オペレーションで使用する場合、BasicAuthentication ポリシーで <Source> 要素が定義されていることを確認します。
上記の例を修正するには、次のようにポリシー内に <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>
<Source>request.header.Authorization</Source>
</BasicAuthentication>