Access Control ポリシー
このセクションでは、このポリシーでエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害を処理するルールを作成する際に重要な情報となります。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に次のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 |
---|---|---|
steps.accesscontrol.ClientIpExtractionFailed |
500 | 障害文字列を参照してください。 |
steps.accesscontrol.IPDeniedAccess |
403 | 障害文字列を参照してください。 |
デプロイエラー
このポリシーを含むプロキシのデプロイで、次のエラーが発生することがあります。
エラー名 | 原因 |
---|---|
InvalidIPAddress |
エラー メッセージを参照してください。 |
InvalidIPv4Address |
エラー メッセージを参照してください。 |
InvalidIPv6Address |
エラー メッセージを参照してください。 |
InvalidRulePattern |
エラー メッセージを参照してください。 |
障害変数
ランタイム エラーが発生すると、次の変数が設定されます。詳しくは、ポリシーエラーに固有の変数をご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は障害名です。詳しくは、上のランタイム エラーの表をご覧ください。障害コードの最後の部分が障害名になります。 | fault.name Matches "IPDeniedAccess" |
acl.policy_name.failed |
policy_name は、障害が発生したユーザー指定のポリシー名です。 | acl.AC-AllowAccess.failed = true |
障害レスポンスの例
{ "fault":{ "detail":{ "errorcode":"steps.accesscontrol.IPDeniedAccess" }, "faultstring":"Access Denied for client ip : 52.211.243.3" } }
障害ルールの例
<FaultRule name="IPDeniedAccess"> <Step> <Name>AM-IPDeniedAccess</Name> <Condition>(fault.name Matches "IPDeniedAccess") </Condition> </Step> <Condition>(acl.failed = true) </Condition> </FaultRule>
Access Entity ポリシー
関連情報については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
なし
デプロイエラー
エラー名 | 障害文字列 | HTTP ステータス | 発生する状況 |
---|---|---|---|
InvalidEntityType |
Invalid type [entity_type] in ACCESSENTITYStepDefinition
[policy_name] |
なし | 使用するエンティティ タイプがサポート対象のタイプではありません。 |
Assign Message ポリシー
このセクションでは、このポリシーによってエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。この情報は、障害に対処するための障害ルールを作成するうえで重要です。詳しくは、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
実行時のエラー
これらのエラーは、ポリシーの実行時に発生する可能性があります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
steps.assignmessage.SetVariableFailed |
500 | ポリシーで変数を設定できませんでした。未解決の変数の名前については、障害文字列を参照してください。 | |
steps.assignmessage.VariableOfNonMsgType |
500 |
このエラーは、 メッセージ型の変数は、いずれも HTTP リクエストまたはレスポンス全体を代表するものです。組み込み Edge フロー変数 |
build |
steps.assignmessage.UnresolvedVariable |
500 |
このエラーは、Assign Message ポリシーで指定された変数が次のいずれかである場合に発生します。
|
build |
デプロイエラー
これらのエラーは、このポリシーを含むプロキシをデプロイするときに発生する可能性があります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidIndex |
Assign Message ポリシーの <Copy> または <Remove> 要素に指定されたインデックスが 0 か負の数の場合、API プロキシのデプロイに失敗します。
|
build |
InvalidVariableName |
子要素 <Name> が空か、<AssignVariable> 要素で指定されていない場合、値を割り当てる有効な変数名が存在しないため、API プロキシのデプロイに失敗します。有効な変数名が必要です。
|
build |
InvalidPayload |
ポリシーで指定されたペイロードが無効です。 |
障害変数
以下の変数は、実行時にこのポリシーによりエラーが発生したときに設定されます。詳しくは、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、前述の実行時のエラーの表にリストアップされている障害名です。障害名は、障害コードの最後の部分です。 | fault.name Matches "UnresolvedVariable" |
assignmessage.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | assignmessage.AM-SetResponse.failed = true |
エラー レスポンスの例
{ "fault":{ "detail":{ "errorcode":"steps.assignmessage.VariableOfNonMsgType" }, "faultstring":"AssignMessage[AM-SetResponse]: value of variable is not of type Message" } }
障害ルールの例
<faultrule name="VariableOfNonMsgType"></faultrule><FaultRule name="Assign Message Faults"> <Step> <Name>AM-CustomNonMessageTypeErrorResponse</Name> <Condition>(fault.name Matches "VariableOfNonMsgType") </Condition> </Step> <Step> <Name>AM-CustomSetVariableErrorResponse</Name> <Condition>(fault.name = "SetVariableFailed")</Condition> </Step> <Condition>(assignmessage.failed = true) </Condition> </FaultRule>
Basic Authentication ポリシー
このセクションでは、このポリシーでエラーをトリガーしたときに返される障害コードおよびエラー メッセージと、Edge によって設定される障害変数について説明します。これは、エラーを処理する障害ルールを開発するために知っておくべき重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
これらのエラーは、ポリシーの実行時に発生することがあります。
障害コード | HTTP ステータス | 原因 |
---|---|---|
steps.basicauthentication.InvalidBasicAuthenticationSource |
500 | Base64 でエンコードされた受信文字列に有効な値が含まれていないか、ヘッダーの形式が不正な場合(たとえば、先頭が「Basic」でない)のデコード処理。 |
steps.basicauthentication.UnresolvedVariable |
500 | デコードまたはエンコードに必要なソース変数が存在しない。このエラーは、IgnoreUnresolvedVariables が false の場合にのみ発生します。 |
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 発生する状況 |
---|---|
UserNameRequired |
名前付きオペレーションに対して <User> 要素が存在する必要があります。障害文字列を参照してください。 |
PasswordRequired |
名前付きオペレーションに対して <Password> 要素が存在する必要があります。障害文字列を参照してください。 |
AssignToRequired |
名前付きオペレーションに対して <AssignTo> 要素が存在する必要があります。障害文字列を参照してください。 |
SourceRequired |
名前付きオペレーションに対して <Source> 要素が存在する必要があります。障害文字列を参照してください。 |
障害変数
これらの変数は、実行時エラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name Matches "UnresolvedVariable" |
BasicAuthentication.policy_name.failed |
policy_name は、障害をスローしたポリシーのユーザーが指定した名前です。 | BasicAuthentication.BA-Authenticate.failed = true |
エラー レスポンスの例
{ "fault":{ "detail":{ "errorcode":"steps.basicauthentication.UnresolvedVariable" }, "faultstring":"Unresolved variable : request.queryparam.password" } }
障害ルールの例
<FaultRule name="Basic Authentication Faults"> <Step> <Name>AM-UnresolvedVariable</Name> <Condition>(fault.name Matches "UnresolvedVariable") </Condition> </Step> <Step> <Name>AM-AuthFailedResponse</Name> <Condition>(fault.name = "InvalidBasicAuthenticationSource")</Condition> </Step> <Condition>(BasicAuthentication.BA-Authentication.failed = true) </Condition> </FaultRule>
Concurrent Rate Limit ポリシー
このセクションでは、このポリシーによってエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、エラーに対処する障害ルールを作成するうえで重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 発生する状況 |
---|---|---|
policies.concurrentratelimit.ConcurrentRatelimtViolation |
503 |
ConcurrentRatelimit 接続が超過しました。接続制限: {0} 注: スペルミス(「limt」)が含まれていますが、左側に表示されている障害コードは正確です。このエラーをトラップする障害ルールを作成するときは、ここに表示されるコードを正確に使用してください。 |
デプロイエラー
エラー名 | 発生する状況 |
---|---|
InvalidCountValue |
ConcurrentRatelimit 無効なカウント値が指定されました。 |
ConcurrentRatelimitStepAttachment\ |
Concurrent Ratelimit ポリシー {0} の添付は、プロキシのリクエストパス、レスポンスパス、障害パスでは許可されていません。このポリシーは、ターゲット エンドポイントに配置する必要があります。 |
ConcurrentRatelimitStepAttachment\ |
Concurrent Ratelimit ポリシー {0} の添付は、対象のリクエストパス、レスポンスパス、障害パスでは見つかりません。このポリシーは、Target Request Preflow、Target Response Postflow、DefaultFaultRule に配置する必要があります。 |
InvalidTTLForMessageTimeOut |
メッセージのタイムアウトに指定された ConcurrentRatelimit 無効な ttl 値。正の整数でなければなりません。 |
障害変数
以下の変数は、このポリシーによりエラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name Matches "ConcurrentRatelimtViolation"
注: スペルミス(「limt」)が含まれていますが、この例に表示されているエラーコードは、正確です。このエラーをトラップする障害ルールを作成するときは、ここに表示されるコードを正確に使用してください。 |
concurrentratelimit.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | concurrentratelimit.CRL-RateLimitPolicy.failed = true |
エラー レスポンスの例
レート制限を超えた場合、ポリシーは HTTP ステータス 503 のみをクライアントに返します。
障害ルールの例
<faultrule name="VariableOfNonMsgType"></faultrule><FaultRules> <FaultRule name="Quota Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "ConcurrentRatelimtViolation") </Condition> </Step> <Condition>concurrentratelimit.CRL-RateLimitPolicy.failed=true</Condition> </FaultRule> </FaultRules>
Decode JWS ポリシー
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Occurs when |
---|---|---|
steps.jws.FailedToDecode |
401 | The policy was unable to decode the JWS. The JWS is possibly corrupted. |
steps.jws.FailedToResolveVariable |
401 | Occurs when the flow variable specified in the <Source> element of
the policy does not exist. |
steps.jws.InvalidClaim |
401 | For a missing claim or claim mismatch, or a missing header or header mismatch. |
steps.jws.InvalidJsonFormat |
401 | Invalid JSON found in the JWS header. |
steps.jws.InvalidJws |
401 | This error occurs when the JWS signature verification fails. |
steps.jws.InvalidPayload |
401 | The JWS payload is invalid. |
steps.jws.InvalidSignature |
401 | <DetachedContent> is omitted and the JWS has a detached content payload. |
steps.jws.MissingPayload |
401 | The JWS payload is missing. |
steps.jws.NoAlgorithmFoundInHeader |
401 | Occurs when the JWS omits the algorithm header. |
steps.jws.UnknownException |
401 | An unknown exception occurred. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Occurs when |
---|---|
InvalidAlgorithm |
The only valid values are: RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512. |
|
Other possible deployment errors. |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "TokenExpired" |
JWS.failed |
All JWS policies set the same variable in the case of a failure. | jws.JWS-Policy.failed = true |
Example error response
For error handling, the best practice is to trap the errorcode
part of the error
response. Do not rely on the text in the faultstring
, because it could change.
Example fault rule
<FaultRules> <FaultRule name="JWS Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWS.failed=true</Condition> </FaultRule> </FaultRules>
Decode JWT ポリシー
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
steps.jwt.FailedToDecode |
401 | Occurs when the policy is unable to decode the JWT. The JWT may be malformed, invalid or otherwise not decodable. | build |
steps.jwt.FailedToResolveVariable |
401 | Occurs when the flow variable specified in the <Source> element of
the policy does not exist. |
|
steps.jwt.InvalidToken |
401 | Occurs when the flow variable specified in the <Source> element of
the policy is out of scope or can't be resolved. |
build |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidEmptyElement |
Occurs when the flow variable containing the JWT to be decoded is not specified in the
<Source> element of the policy.
|
build |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "TokenExpired" |
JWT.failed |
All JWT policies set the same variable in the case of a failure. | JWT.failed = true |
Example error response
For error handling, the best practice is to trap the errorcode
part of the error
response. Do not rely on the text in the faultstring
, because it could change.
Example fault rule
<FaultRules> <FaultRule name="JWT Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWT.failed=true</Condition> </FaultRule> </FaultRules>
Extract Variables ポリシー
このセクションでは、このポリシーによってエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成するうえで重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
steps.extractvariables.ExecutionFailed |
500 |
このエラーは、次の場合に発生します。
|
build |
steps.extractvariables.ImmutableVariable |
500 | ポリシーで使用する変数は変更不能です。ポリシーでこの変数を設定できませんでした。 | |
steps.extractvariables.InvalidJSONPath |
500 | このエラーは、無効な JSON パスがポリシーの JSONPath 要素で使用される場合に発生します。たとえば、JSON ペイロードにオブジェクト Name がないときに、ポリシー内のパスとして Name を指定すると、このエラーが発生します。 |
build |
steps.extractvariables.JsonPathParsingFailure |
500 | このエラーは、ポリシーが JSON パスを解析できず、Source 要素で指定されたフロー変数からデータを抽出できない場合に発生します。通常、Source 要素で指定されたフロー変数が現在のフローに存在しない場合に発生します。 |
build |
steps.extractvariables.SetVariableFailed |
500 | このエラーは、ポリシーが値を変数に設定できなかった場合に発生します。名前がネストされたドット区切り形式で、同じ単語で始まる複数の変数に値を割り当てようとする場合は通常、エラーが発生します。 | build |
steps.extractvariables.SourceMessageNotAvailable |
500 | このエラーは、ポリシーの Source 要素で指定された message 変数が、次のいずれかである場合に発生します。
|
build |
steps.extractvariables.UnableToCast |
500 | このエラーは、ポリシーが抽出された値を変数にキャストできなかった場合に発生します。これは通常、あるデータ型の値を別のデータ型の変数に設定しようとすると発生します。 | build |
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
NothingToExtract |
ポリシーに、URIPath 、QueryParam 、Header 、FormParam 、XMLPayload 、JSONPayload の要素がいずれも含まれない場合、抽出するものがないため API プロキシのデプロイは失敗します。 |
build |
NONEmptyPrefixMappedToEmptyURI |
このエラーは、ポリシーで XMLPayload 要素の下の Namespace 要素に接頭辞が定義されているが、URI が定義されていない場合に発生します。 |
build |
DuplicatePrefix |
このエラーは、ポリシーで XMLPayload 要素の下の Namespace 要素に同じ接頭辞が複数回定義されている場合に発生します。 |
build |
NoXPathsToEvaluate |
ポリシーの XMLPayload 要素内に XPath 要素がない場合、API プロキシのデプロイはこのエラーで失敗します。
|
build |
EmptyXPathExpression |
ポリシーの XMLPayload 要素内に空の XPath 式がある場合、API プロキシのデプロイは失敗します。 |
build |
NoJSONPathsToEvaluate |
ポリシーの JSONPayload 要素内に JSONPath 要素がない場合、API プロキシのデプロイはこのエラーで失敗します。 |
build |
EmptyJSONPathExpression |
ポリシーの XMLPayload 要素内に空の XPath 式がある場合、API プロキシのデプロイは失敗します。 |
build |
MissingName |
ポリシーの QueryParam 、Header 、FormParam 、Variable などのポリシー要素のいずれかに、必要な name 属性が含まれない場合、API プロキシのデプロイは失敗します。 |
build |
PatternWithoutVariable |
ポリシーに Pattern 要素内で指定された変数がない場合、API プロキシのデプロイは失敗します。Pattern 要素には、抽出されたデータが格納される変数の名前が必要です。 |
build |
CannotBeConvertedToNodeset |
ポリシーに、Variable の型が nodeset として定義されている XPath 式があるが、式を nodeset に変換できない場合、API プロキシのデプロイは失敗します。 |
build |
JSONPathCompilationFailed |
ポリシーは指定された JSON パスをコンパイルできませんでした。 | |
InstantiationFailed |
ポリシーをインスタンス化できませんでした。 | |
XPathCompilationFailed |
接頭辞や XPath 要素で使用される値がポリシーの宣言された名前空間の一部でない場合、API プロキシのデプロイは失敗します。 |
build |
InvalidPattern |
Pattern 要素の定義がポリシー内の URIPath 、QueryParam 、Header 、FormParam 、XMLPayload 、JSONPayload などの要素のいずれかで無効な場合、API プロキシのデプロイは失敗します。
|
build |
障害変数
以下の変数は、このポリシーにより実行時にエラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name = "SourceMessageNotAvailable" |
extractvariables.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | extractvariables.EV-ParseJsonResponse.failed = true |
エラー レスポンスの例
{ "fault":{ "detail":{ "errorcode":"steps.extractvariables.SourceMessageNotAvailable" }, "faultstring":"request message is not available for ExtractVariable: EV-ParseJsonResponse" } }
障害ルールの例
<FaultRule name="Extract Variable Faults"> <Step> <Name>AM-CustomErrorMessage</Name> <Condition>(fault.name = "SourceMessageNotAvailable") </Condition> </Step> <Condition>(extractvariables.EM-ParseJsonResponse.failed = true) </Condition> </FaultRule>
Generate JWS ポリシー
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Occurs when |
---|---|---|
steps.jws.GenerationFailed |
401 | The policy was unable to generate the JWS. |
steps.jws.InsufficientKeyLength |
401 | For a key less than 32 bytes for the HS256 algorithm |
steps.jws.InvalidClaim |
401 | For a missing claim or claim mismatch, or a missing header or header mismatch. |
steps.jws.InvalidCurve |
401 | The curve specified by the key is not valid for the Elliptic Curve algorithm. |
steps.jws.InvalidJsonFormat |
401 | Invalid JSON found in the JWS header. |
steps.jws.InvalidPayload |
401 | The JWS payload is invalid. |
steps.jws.InvalidSignature |
401 | <DetachedContent> is omitted and the JWS has a detached content payload. |
steps.jws.KeyIdMissing |
401 | The Verify policy uses a JWKS as a source for public keys, but the signed JWS does not
include a kid property in the header. |
steps.jws.KeyParsingFailed |
401 | The public key could not be parsed from the given key information. |
steps.jws.MissingPayload |
401 | The JWS payload is missing. |
steps.jws.NoAlgorithmFoundInHeader |
401 | Occurs when the JWS omits the algorithm header. |
steps.jws.SigningFailed |
401 | In GenerateJWS, for a key less than the minimum size for the HS384 or HS512 algorithms |
steps.jws.UnknownException |
401 | An unknown exception occurred. |
steps.jws.WrongKeyType |
401 | Wrong type of key specified. For example, if you specify an RSA key for an Elliptic Curve algorithm, or a curve key for an RSA algorithm. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Occurs when |
---|---|
InvalidAlgorithm |
The only valid values are: RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512. |
|
Other possible deployment errors. |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "TokenExpired" |
JWS.failed |
All JWS policies set the same variable in the case of a failure. | jws.JWS-Policy.failed = true |
Example error response
For error handling, the best practice is to trap the errorcode
part of the error
response. Do not rely on the text in the faultstring
, because it could change.
Example fault rule
<FaultRules> <FaultRule name="JWS Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWS.failed=true</Condition> </FaultRule> </FaultRules>
Generate JWT ポリシー
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Occurs when |
---|---|---|
steps.jwt.AlgorithmInTokenNotPresentInConfiguration |
401 | Occurs when the verification policy has multiple algorithms. |
steps.jwt.AlgorithmMismatch |
401 | The algorithm specified in the Generate policy did not match the one expected in the Verify policy. The algorithms specified must match. |
steps.jwt.FailedToDecode |
401 | The policy was unable to decode the JWT. The JWT is possibly corrupted. |
steps.jwt.GenerationFailed |
401 | The policy was unable to generate the JWT. |
steps.jwt.InsufficientKeyLength |
401 | For a key less than 32 bytes for the HS256 algorithm, less than 48 bytes for the HS386 algortithm, and less than 64 bytes for the HS512 algorithm. |
steps.jwt.InvalidClaim |
401 | For a missing claim or claim mismatch, or a missing header or header mismatch. |
steps.jwt.InvalidCurve |
401 | The curve specified by the key is not valid for the Elliptic Curve algorithm. |
steps.jwt.InvalidJsonFormat |
401 | Invalid JSON found in the header or payload. |
steps.jwt.InvalidToken |
401 | This error occurs when the JWT signature verification fails. |
steps.jwt.JwtAudienceMismatch |
401 | The audience claim failed on token verification. |
steps.jwt.JwtIssuerMismatch |
401 | The issuer claim failed on token verification. |
steps.jwt.JwtSubjectMismatch |
401 | The subject claim failed on token verification. |
steps.jwt.KeyIdMissing |
401 | The Verify policy uses a JWKS as a source for public keys, but the signed JWT does not
include a kid property in the header. |
steps.jwt.KeyParsingFailed |
401 | The public key could not be parsed from the given key information. |
steps.jwt.NoAlgorithmFoundInHeader |
401 | Occurs when the JWT contains no algorithm header. |
steps.jwt.NoMatchingPublicKey |
401 | The Verify policy uses a JWKS as a source for public keys, but the kid
in the signed JWT is not listed in the JWKS. |
steps.jwt.SigningFailed |
401 | In GenerateJWT, for a key less than the minimum size for the HS384 or HS512 algorithms |
steps.jwt.TokenExpired |
401 | The policy attempts to verify an expired token. |
steps.jwt.TokenNotYetValid |
401 | The token is not yet valid. |
steps.jwt.UnhandledCriticalHeader |
401 | A header found by the Verify JWT policy in the crit header is not
listed in KnownHeaders . |
steps.jwt.UnknownException |
401 | An unknown exception occurred. |
steps.jwt.WrongKeyType |
401 | Wrong type of key specified. For example, if you specify an RSA key for an Elliptic Curve algorithm, or a curve key for an RSA algorithm. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidNameForAdditionalClaim |
The deployment will fail if the claim used in the child element <Claim>
of the <AdditionalClaims> element is one of the following registered names:
kid , iss , sub , aud , iat ,
exp , nbf , or jti .
|
build |
InvalidTypeForAdditionalClaim |
If the claim used in the child element <Claim>
of the <AdditionalClaims> element is not of type string , number ,
boolean , or map , the deployment will fail.
|
build |
MissingNameForAdditionalClaim |
If the name of the claim is not specified in the child element <Claim>
of the <AdditionalClaims> element, the deployment will fail.
|
build |
InvalidNameForAdditionalHeader |
This error ccurs when the name of the claim used in the child element <Claim>
of the <AdditionalClaims> element is either alg or typ .
|
build |
InvalidTypeForAdditionalHeader |
If the type of claim used in the child element <Claim>
of the <AdditionalClaims> element is not of type string , number ,
boolean , or map , the deployment will fail.
|
build |
InvalidValueOfArrayAttribute |
This error occurs when the value of the array attribute in the child element <Claim>
of the <AdditionalClaims> element is not set to true or false .
|
build |
InvalidConfigurationForActionAndAlgorithm |
If the <PrivateKey> element is used with HS Family algorithms or
the <SecretKey> element is used with RSA Family algorithms, the
deployment will fail.
|
build |
InvalidValueForElement |
If the value specified in the <Algorithm> element is not a supported value,
the deployment will fail.
|
build |
MissingConfigurationElement |
This error will occur if the <PrivateKey> element is not used with
RSA family algorithms or the <SecretKey> element is not used with HS Family
algorithms.
|
build |
InvalidKeyConfiguration |
If the child element <Value> is not defined in the <PrivateKey>
or <SecretKey> elements, the deployment will fail.
|
build |
EmptyElementForKeyConfiguration |
If the ref attribute of the child element <Value> of the <PrivateKey>
or <SecretKey> elements is empty or unspecified, the deployment will fail.
|
build |
InvalidVariableNameForSecret |
This error occurs if the flow variable name specified in the ref attribute of the child
element <Value> of the <PrivateKey>
or <SecretKey> elements does not contain the private prefix (private.) .
|
build |
InvalidSecretInConfig |
This error occurs if the child element <Value> of the <PrivateKey>
or <SecretKey> elements does not contain the private prefix (private.) .
|
build |
InvalidTimeFormat |
If the value specified in the<NotBefore> element does not use a
supported format, the deployment will fail.
|
build |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "TokenExpired" |
JWT.failed |
All JWT policies set the same variable in the case of a failure. | JWT.failed = true |
Example error response
For error handling, the best practice is to trap the errorcode
part of the error
response. Do not rely on the text in the faultstring
, because it could change.
Example fault rule
<FaultRules> <FaultRule name="JWT Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWT.failed=true</Condition> </FaultRule> </FaultRules>
Java Callout ポリシー
このセクションでは、このポリシーによってエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成するうえで重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
以下のエラーは、ポリシー実行時に発生する可能性があるものです。
障害コード | 障害文字列 | HTTP ステータス | 発生する状況 |
---|---|---|---|
javacallout.ExecutionError |
Failed to execute
JavaCallout. [policy_name] |
500 | 障害文字列をご覧ください。 |
デプロイエラー
以下のエラーは、ポリシーを含んだプロキシがデプロイされた場合に発生する可能性があります。
エラー名 | 障害文字列 | HTTP ステータス | 発生する状況 |
---|---|---|---|
ResourceDoesNotExist |
Resource with name
[name] and type [type] does not exist |
なし | <ResourceURL> 要素で指定されたファイルが存在しません。 |
JavaCalloutInstantiationFailed |
Failed to instantiate the JavaCallout Class [classname] |
なし | <ClassName> 要素で指定されたクラスファイルが jar ファイルにありません。 |
IncompatibleJavaVersion |
Failed to load java class [classname] definition due to - [reason] |
なし | 障害文字列をご覧ください。サポート対象のソフトウェアおよびサポート対象のバージョンもご覧ください。 |
JavaClassNotFoundInJavaResource |
Failed to find the ClassName in java resource [jar_name] -
[class_name] |
なし | 障害文字列をご覧ください。 |
JavaClassDefinitionNotFound |
Failed to load java class [class_name] definition due to - [reason] |
なし | 障害文字列をご覧ください。 |
NoAppropriateConstructor |
No appropriate constructor found in JavaCallout class [class_name] |
なし | 障害文字列をご覧ください。 |
NoResourceForURL |
Could not locate a resource with URL [string] |
なし | 障害文字列をご覧ください。 |
障害変数
以下の変数は、このポリシーからエラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name Matches "ExecutionError" |
javacallout.policy_name.failed |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | javacallout.JC-GetUserData.failed = true |
エラー レスポンスの例
{ "fault":{ "faultstring":"Failed to execute JavaCallout. [policy_name]", "detail":{ "errorcode":"javacallout.ExecutionError" } } }
障害ルールの例
<FaultRule name="JavaCalloutFailed"> <Step> <Name>AM-JavaCalloutError</Name> </Step> <Condition>(fault.name Matches "ExecutionError") </Condition> </FaultRule>
JavaScript ポリシー
このセクションでは、このポリシーでエラーをトリガーしたときに返される障害コードとエラー メッセージ、そして Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
steps.javascript.ScriptExecutionFailed |
500 | JavaScript ポリシーは、さまざまな種類の ScriptExecutionFailed エラーをスローする可能性があります。一般的に見られるエラーの種類は、RangeError、ReferenceError、SyntaxError、TypeError、URIError などです。 | build |
steps.javascript.ScriptExecutionFailedLineNumber |
500 | JavaScript コードで発生したエラー。詳細については、障害の文字列をご覧ください。 | なし |
steps.javascript.ScriptSecurityError |
500 | JavaScript の実行時に発生したセキュリティ エラー。詳細については、障害の文字列をご覧ください。 | なし |
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidResourceUrlFormat |
JavaScript ポリシーの <ResourceURL> 要素または <IncludeURL> 要素に指定されたリソース URL の形式が無効な場合、API プロキシのデプロイは失敗します。 |
build |
InvalidResourceUrlReference |
<ResourceURL> 要素または <IncludeURL> 要素が存在しない JavaScript ファイルを参照すると、API プロキシのデプロイは失敗します。参照先のソースファイルは、API プロキシ、環境、組織のいずれかのレベルに、存在する必要があります。 |
build |
WrongResourceType |
このエラーは、デプロイ時に JavaScript ポリシーの <ResourceURL> 要素または <IncludeURL> 要素が、jsc(JavaScript ファイル)以外のリソースタイプを参照している場合に発生します。 |
build |
NoResourceURLOrSource |
<ResourceURL> 要素が宣言されていない場合、またはリソース URL がこの要素内で定義されていない場合に、JavaScript ポリシーのデプロイがこのエラーで失敗する可能性があります。
<ResourceURL> 要素は必須の要素です。また、<IncludeURL> 要素が宣言されていても、この要素内でリソース URL が定義されていない場合に発生することもあります。<IncludeURL> 要素は省略することもできますが、宣言されている場合は <IncludeURL> 要素内でリソース URL を指定する必要があります。 |
build |
障害変数
このポリシーがランタイム時にエラーのトリガーとなった場合は、次の変数が設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害コードの最後の部分が障害名になります。 | fault.name Matches "ScriptExecutionFailed" |
javascript.policy_name.failed |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | javascript.JavaScript-1.failed = true |
エラー レスポンスの例
{ "fault": { "faultstring": "Execution of SetResponse failed with error: Javascript runtime error: "ReferenceError: "status" is not defined. (setresponse.js:6)\"", "detail": { "errorcode": "steps.javascript.ScriptExecutionFailed" } } }
障害ルールの例
<FaultRule name="JavaScript Policy Faults"> <Step> <Name>AM-CustomErrorResponse</Name> <Condition>(fault.name Matches "ScriptExecutionFailed") </Condition> </Step> <Condition>(javascript.JavaScript-1.failed = true) </Condition> </FaultRule>
JSON Threat Protection ポリシー
このセクションでは、このポリシーによってエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成するうえで重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | 障害文字列 | HTTP ステータス | 発生する状況 |
---|---|---|---|
steps.jsonthreatprotection.ExceededArrayElementCount |
JSONThreatProtection[policy_name]:
Exceeded array element count at line [line_num] |
500 | 障害文字列をご覧ください。 |
steps.jsonthreatprotection.ExceededContainerDepth |
JSONThreatProtection[policy_name]: Exceeded
container depth at line [line_num] |
500 | 障害文字列をご覧ください。 |
steps.jsonthreatprotection.ExceededObjectEntryCount |
JSONThreatProtection[policy_name]:
Exceeded object entry count at line [line_num] |
500 | 障害文字列をご覧ください。 |
steps.jsonthreatprotection.ExceededObjectEntryNameLength |
JSONThreatProtection[policy_name]:
Exceeded object entry name length at line [line_num] |
500 | 障害文字列をご覧ください。 |
steps.jsonthreatprotection.ExceededStringValueLength |
JSONThreatProtection[policy_name]:
Exceeded string value length at line [line_num] |
500 | 障害文字列をご覧ください。 |
steps.jsonthreatprotection.ExecutionFailed |
JSONThreatProtection[policy_name]:
Execution failed. reason: [string] |
500 | 障害文字列をご覧ください。 |
steps.jsonthreatprotection.NonMessageVariable |
JSONThreatProtection[policy_name]:
Variable [var_name] does not resolve to a Message |
500 | 障害文字列をご覧ください。 |
steps.jsonthreatprotection.SourceUnavailable |
JSONThreatProtection[policy_name]:
Source [var_name] is not available |
500 | 障害文字列をご覧ください。 |
デプロイエラー
なし。
障害変数
以下の変数は、このポリシーによりエラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name Matches "SourceUnavailable" |
jsonattack.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | jsonattack.JTP-SecureRequest.failed = true |
エラー レスポンスの例
{ "fault": { "faultstring": "JSONThreatProtection[JPT-SecureRequest]: Execution failed. reason: JSONThreatProtection[JTP-SecureRequest]: Exceeded object entry name length at line 2", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
障害ルールの例
<FaultRule name="JSON Threat Protection Policy Faults">
<Step>
<Name>AM-CustomErrorResponse</Name>
<Condition>(fault.name Matches "ExecutionFailed") </Condition>
</Step>
<Condition>(jsonattack.JPT-SecureRequest.failed = true) </Condition>
</FaultRule>
JSONThreatProtection ポリシータイプでは、次のエラーコードを定義します。
JSON to XML ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生したときに、返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
これらのエラーは、ポリシーの実行時に発生することがあります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
steps.jsontoxml.ExecutionFailed |
500 | 入力ペイロード(JSON)が空であるか、JSON to XML ポリシーに渡された入力(JSON)が無効または不正です。 | build |
steps.jsontoxml.InCompatibleTypes |
500 | このエラーは、<Source> 要素と <OutputVariable> 要素で定義された変数の型が同じでない場合に発生します。<Source> 要素と <OutputVariable> 要素に含まれる変数の型が一致することは、必須です。有効な型は message と string です。 |
build |
steps.jsontoxml.InvalidSourceType |
500 | このエラーは、<Source> 要素の定義に使用される変数の型が無効な場合に発生します。変数の有効な型は、message と string です。 |
build |
steps.jsontoxml.OutputVariableIsNotAvailable |
500 | このエラーは、JSON to XML ポリシーの <Source> 要素で指定された変数が string 型で、<OutputVariable> 要素が定義されていない場合に発生します。<Source> 要素で定義された変数が string 型の場合、<OutputVariable> 要素は必須です。 |
build |
steps.jsontoxml.SourceUnavailable |
500 |
このエラーは、JSON to XML ポリシーの <Source> 要素で指定された message 変数が、次のいずれかである場合に発生します。
|
build |
デプロイエラー
なし
障害変数
これらの変数は、ランタイム エラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、前述のランタイム エラーの表にリストアップされている障害名です。障害名は、障害コードの最後の部分です。 | fault.name Matches "SourceUnavailable" |
jsontoxml.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | jsontoxml.JSON-to-XML-1.failed = true |
エラー レスポンスの例
{ "fault": { "faultstring": "JSONToXML[JSON-to-XML-1]: Source xyz is not available", "detail": { "errorcode": "steps.json2xml.SourceUnavailable" } } }
障害ルールの例
<FaultRule name="JSON To XML Faults"> <Step> <Name>AM-SourceUnavailableMessage</Name> <Condition>(fault.name Matches "SourceUnavailable") </Condition> </Step> <Step> <Name>AM-BadJSON</Name> <Condition>(fault.name = "ExecutionFailed")</Condition> </Step> <Condition>(jsontoxml.JSON-to-XML-1.failed = true) </Condition> </FaultRule>
Key Value Map Operations ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生したときに返される障害コードとエラー メッセージ、そして Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
steps.keyvaluemapoperations.SetVariableFailed |
500 |
このエラーは、暗号化された Key-Value マップから値を取得し、その値を、名前に接頭辞 |
build |
steps.keyvaluemapoperations.UnsupportedOperationException |
500 |
このエラーは、Key Value Map Operations ポリシーで |
build |
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidIndex |
Key Value Map Operations ポリシーの <Get> 要素で指定された index 属性がゼロまたは負の数である場合、API プロキシのデプロイは失敗します。インデックスは 1 から始まるため、ゼロまたは負の整数のインデックスは無効と見なされます。
|
build |
KeyIsMissing |
このエラーは、Key Value Map Operations ポリシーの <InitialEntries> 要素の <Entry> の下で、<Key> 要素が完全に欠落しているか、<Key> 要素内の <Parameter> 要素が欠落している場合に発生します。
|
build |
ValueIsMissing |
このエラーは、Key Value Map Operations ポリシーの <InitialEntries> 要素の <Entry> 要素の下に <Value> 要素がない場合に発生します。 |
build |
LDAP ポリシー
このポリシーでは、以下のエラーコードを使います。
エラーコード | メッセージ |
---|---|
InvalidAttributeName |
Invalid attribute name {0}. |
InvalidSearchBase |
Search base can not be empty. |
InvalidValueForPassword |
Invalid value for password field. It can not be empty. |
InvalidSearchScope |
Invalid scope {0}. Allowed scopes are {1}. |
InvalidUserCredentials |
Invalid user credentials. |
InvalidExternalLdapReference |
Invalid external ldap reference {0}. |
LdapResourceNotFound |
Ldap resource {0} not found. |
BaseDNRequired |
Base DN required. |
OnlyReferenceOrValueIsAllowed |
Only value or reference is allowed for {0}. |
AttributesRequired |
At least one attribute required for search action. |
UserNameIsNull |
User name is null. |
SearchQueryAndUserNameCannotBePresent |
Both search query and username can not be present in the authentication action.
Please specify either one of them. |
Message Logging ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生したときに、返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 |
---|---|---|
steps.messagelogging.StepDefinitionExecutionFailed |
500 | 障害文字列をご覧ください。 |
デプロイエラー
このポリシーを含むプロキシをデプロイするときに、以下のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidProtocol |
<Protocol> 要素に無効なプロトコルが指定されていると、このエラーが発生し、MessageLogging ポリシーのデプロイに失敗する場合があります。有効なプロトコルは TCP と UDP です。TLS / SSL 経由で Syslog メッセージを送信する場合、使用できるのは TCP だけです。 |
build |
InvalidPort |
<Port> 要素にポート番号が指定され、これが無効であると、このエラーが発生し、MessageLogging ポリシーのデプロイに失敗する場合があります。ポート番号は 1 以上の整数にする必要があります。 |
build |
障害変数
以下の変数は、ランタイム エラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、前述のランタイム エラーの表にリストアップされている障害名です。障害名は、障害コードの最後の部分です。 | fault.name Matches "StepDefinitionExecutionFailed" |
messagelogging.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | messagelogging.ML-LogMessages.failed = true |
エラー レスポンスの例
{ "fault":{ "detail":{ "errorcode":"steps.messagelogging.StepDefinitionExecutionFailed" }, "faultstring":"Execution failed" } }
障害ルールの例
<FaultRule name="MessageLogging"> <Step> <Name>ML-LogMessages</Name> <Condition>(fault.name Matches "StepDefinitionExecutionFailed") </Condition> </Step> <Condition>(messagelogging.ML-LogMessages.failed = true) </Condition> </FaultRule>
OASValidation ポリシー
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | |
---|---|---|---|
steps.oasvalidation.Failed |
500 | Request message body cannot be validated against the provided OpenAPI Specification. | |
steps.oasvalidation.SourceMessageNotAvailable |
500 |
Variable specified in the |
|
steps.oasvalidation.NotMessageVariable |
500 |
|
build |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | |
---|---|---|
ResourceDoesNotExist |
OpenAPI Specification referenced in the <OASResource> element does not exist.
|
|
ResourceCompileFailed |
OpenAPI Specification that is included in the deployment contains errors that prevent it from being compiled. This generally indicates that the specification is not a well-formed OpenAPI Specification 3.0. | |
BadResourceURL |
OpenAPI Specification referenced in the <OASResource> element cannot be processed. This can occur if the file is not a JSON or YAML file or the
file URL is not specified correctly.
|
Fault variables
These variables are set when this policy triggers an error at runtime. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "ResourceDoesNotExist" |
oasvalidation.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | oasvalidation.myoaspolicy.failed = true |
Populate Cache ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生したときに、返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 発生する状況 |
---|---|---|
policies.populatecache.EntryCannotBeCached |
500 | エントリはキャッシュできません。キャッシュされるメッセージ オブジェクトは、シリアライズ可能なクラスのインスタンスではありません。 |
デプロイエラー
このポリシーを含むプロキシをデプロイするときに、以下のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidCacheResourceReference |
このエラーは、PopulateCache ポリシーの <CacheResource> 要素が、API プロキシのデプロイ先の環境に存在しない名前に設定される場合に発生します。 |
build |
CacheNotFound |
<CacheResource> 要素で指定されたキャッシュは存在しません。 |
build |
障害変数
以下の変数は、このポリシーがトリガーとなってエラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、前述のランタイム エラーの表にリストアップされている障害名です。障害名は、障害コードの最後の部分です。 | fault.name = "EntryCannotBeCached" |
populatecache.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | populatecache.POP-CACHE-1.failed = true |
エラー レスポンスの例
{ "fault": { "faultstring": "[entry] can not be cached. Only serializable entries are cached.", "detail": { "errorcode": "steps.populatecache.EntryCannotBeCached" } } }
障害ルールの例
<FaultRule name="Populate Cache Fault"> <Step> <Name>AM-EntryCannotBeCached</Name> <Condition>(fault.name Matches "EntryCannotBeCached") </Condition> </Step> <Condition>(populatecache.POP-CACHE-1.failed = true) </Condition> </FaultRule>
Lookup Cache ポリシー
このセクションでは、このポリシーでエラーが発生したときに設定されるエラー メッセージとフロー変数について説明します。これは、プロキシの障害ルールを作成する際に重要な情報となります。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
エラーコードのプレフィックス
なし
ランタイム エラー
このポリシーでランタイム エラーは発生しません。
デプロイエラー
このエラーは、このポリシーを含むプロキシをデプロイするときに発生する可能性があります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidCacheResourceReference |
このエラーは、<CacheResource> 要素に設定された名前が API プロキシのデプロイ先に存在しない場合に発生します。 |
build |
InvalidTimeout |
<CacheLookupTimeoutInSeconds> 要素に負の数が設定されていると、API プロキシのデプロイに失敗します。 |
build |
CacheNotFound |
このエラーは、エラー メッセージにあるキャッシュが特定の Message Processor コンポーネントに作成されていない場合に発生します。 | build |
障害変数
なし
エラー レスポンスの例
なし
Invalidate Cache ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生すると設定される、エラー メッセージとフロー変数について説明します。これは、プロキシの障害ルールを作成する上で重要な情報です。詳しくは、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
エラーコードの接頭辞
なし
ランタイム エラー
このポリシーはランタイム エラーをスローしません。
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidCacheResourceReference |
API プロキシがデプロイされている環境に存在しない名前が InvalidateCache ポリシーの <CacheResource> 要素に設定されていると、このエラーが発生します。 |
build |
CacheNotFound |
このエラーは、エラー メッセージに記載されている特定のキャッシュが特定の Message Processor コンポーネント上に作成されていない場合に発生します。 | build |
障害変数
なし
エラー レスポンスの例
なし
Response Cache ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生すると設定される、エラー メッセージとフロー変数について説明します。これは、プロキシの障害ルールを作成する上で重要な情報です。詳しくは、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
エラーコードの接頭辞
なし
ランタイム エラー
このポリシーはランタイム エラーをスローしません。
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidTimeout |
ResponseCache ポリシーの <CacheLookupTimeoutInSeconds> 要素が負の数値に設定されている場合、API プロキシのデプロイは失敗します。 |
build |
InvalidCacheResourceReference |
このエラーは、ResponseCache ポリシーの <CacheResource> 要素が、API プロキシのデプロイ先の環境に存在しない名前に設定されている場合に発生します。 |
build |
ResponseCacheStepAttachmentNotAllowedReq |
このエラーは、同じ ResponseCache ポリシーが API プロキシの任意のフロー内の複数のリクエストパスに関連付けられている場合に発生します。 | build |
ResponseCacheStepAttachmentNotAllowedResp |
このエラーは、同じ ResponseCache ポリシーが API プロキシの任意のフロー内の複数のレスポンスパスに関連付けられている場合に発生します。 | build |
InvalidMessagePatternForErrorCode |
このエラーは、ResponseCache ポリシー内の <SkipCacheLookup> 要素または <SkipCachePopulation> 要素に無効な条件が含まれている場合に発生します。 |
build |
CacheNotFound |
このエラーは、エラー メッセージに記載されている特定のキャッシュが特定の Message Processor コンポーネント上に作成されていない場合に発生します。 | build |
障害変数
なし
エラー レスポンスの例
なし
OAuthV2 ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生したときに返される障害コードとエラー メッセージ、そして Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 | スロー元のオペレーション |
---|---|---|---|
steps.oauth.v2.access_token_expired |
401 | アクセス トークンの期限が切れています。 |
VerifyAccessToken |
steps.oauth.v2.access_token_not_approved |
401 | アクセス トークンは取り消されています。 | VerifyAccessToken |
steps.oauth.v2.apiresource_doesnot_exist |
401 | リクエストされたリソースが、アクセス トークンに関連付けられた API プロダクトのどれにも存在していません。 | VerifyAccessToken |
steps.oauth.v2.FailedToResolveAccessToken |
500 | このポリシーでは、アクセス トークンが <AccessToken> 要素に指定された変数内で見つかるものと想定されていますが、この変数を解決できませんでした。 |
GenerateAccessToken |
steps.oauth.v2.FailedToResolveAuthorizationCode |
500 | このポリシーでは、認可コードが <Code> 要素に指定された変数内で見つかるものと想定されていますが、この変数を解決できませんでした。 |
GenerateAuthorizationCode |
steps.oauth.v2.FailedToResolveClientId |
500 | このポリシーでは、クライアント ID が <ClientId> 要素に指定された変数内で見つかるものと想定されていますが、この変数を解決できませんでした。 |
GenerateAccessToken GenerateAuthorizationCode GenerateAccessTokenImplicitGrant RefreshAccessToken |
steps.oauth.v2.FailedToResolveRefreshToken |
500 | このポリシーでは、リフレッシュ トークンが <RefreshToken> 要素に指定された変数内で見つかるものと想定されていますが、この変数を解決できませんでした。 |
RefreshAccessToken |
steps.oauth.v2.FailedToResolveToken |
500 | このポリシーでは、トークンが <Tokens> 要素に指定された変数内で見つかるものと想定されていますが、この変数を解決できませんでした。 |
ValidateToken |
steps.oauth.v2.InsufficientScope |
403 | リクエストで提示されたアクセス トークンのスコープが、アクセス トークン検証ポリシーに指定されたスコープと一致していません。スコープについては、OAuth2 スコープの操作をご覧ください。 | VerifyAccessToken |
steps.oauth.v2.invalid_access_token |
401 | クライアントから送信されたアクセス トークンが無効です。 | VerifyAccessToken |
steps.oauth.v2.invalid_client |
401 |
このエラー名が返されるのは、このポリシーの 注: |
GenerateAccessToken RefreshAccessToken |
steps.oauth.v2.invalid_request |
400 | このエラー名は複数の種類のエラー(通常、リクエストで送信されるパラメータが抜け落ちている場合や誤りである場合)で使用されます。<GenerateResponse> が false に設定されている場合は、(後で説明する)障害変数を使用して、障害の名前や原因といったエラーに関する詳細を取得してください。 |
GenerateAccessToken GenerateAuthorizationCode GenerateAccessTokenImplicitGrant RefreshAccessToken |
steps.oauth.v2.InvalidAccessToken |
401 | Authorization ヘッダーに、必須の単語「Bearer」が含まれていません。例: Authorization: Bearer your_access_token |
VerifyAccessToken |
steps.oauth.v2.InvalidAPICallAsNo\ |
401 |
API プロキシがアクセス トークンに関連付けられたプロダクト内にありません。 ヒント: アクセス トークンに関連付けられたプロダクトが正しく構成されているか確認してください。たとえば、リソースのパスにワイルドカードを使用した場合は、ワイルドカードの用法が正しいことを確認します。詳細については、API プロダクトの作成をご覧ください。 また、このエラーの原因に関する詳細について、こちらの Apigee コミュニティの投稿もご覧ください。 |
VerifyAccessToken |
steps.oauth.v2.InvalidClientIdentifier |
500 |
このエラー名が返されるのは、このポリシーの |
GenerateAccessToken |
steps.oauth.v2.InvalidParameter |
500 | このポリシーでは、アクセス トークンか認可コードのいずれかを指定する必要がありますが、両方は指定できません。 | GenerateAuthorizationCode GenerateAccessTokenImplicitGrant |
steps.oauth.v2.InvalidTokenType |
500 | <Tokens>/<Token> 要素にはトークンタイプ(たとえば、refreshtoken )を指定する必要があります。クライアントから誤ったタイプが渡されると、このエラーがスローされます。 |
ValidateToken InvalidateToken |
steps.oauth.v2.MissingParameter |
500 | レスポンス タイプは token ですが、付与タイプが指定されていません。 |
GenerateAuthorizationCode GenerateAccessTokenImplicitGrant |
steps.oauth.v2.UnSupportedGrantType |
500 |
クライアントで指定された付与タイプが、このポリシーでサポートされない(<SupportedGrantTypes> 要素のリストに含まれていない)ものでした。 注: 現在バグが存在しているために、「サポートされない付与タイプ」のエラーが正しくスローされません。「サポートされない付与タイプ」のエラーが発生しても、プロキシが想定どおりエラーフローに入りません。 |
GenerateAccessToken GenerateAuthorizationCode GenerateAccessTokenImplicitGrant RefreshAccessToken |
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 原因 |
---|---|
InvalidValueForExpiresIn |
|
InvalidValueForRefreshTokenExpiresIn |
<RefreshTokenExpiresIn> 要素の有効な値は、正の整数と -1 です。 |
InvalidGrantType |
<SupportedGrantTypes> 要素に無効な付与タイプが指定されています。有効な付与タイプのリストについては、ポリシー リファレンスをご覧ください。 |
ExpiresInNotApplicableForOperation |
<Operations> 要素に指定されたオペレーションで有効期限がサポートされていることを確認してください。たとえば、VerifyToken オペレーションでは有効期限はサポートされません。 |
RefreshTokenExpiresInNotApplicableForOperation |
<Operations> 要素に指定されたオペレーションでリフレッシュ トークンの有効期限がサポートされていることを確認してください。たとえば、VerifyToken オペレーションでは有効期限はサポートされません。 |
GrantTypesNotApplicableForOperation |
<SupportedGrantTypes> に指定された付与タイプが指定されたオペレーションでサポートされていることを確認してください。 |
OperationRequired |
このポリシーでのオペレーションの指定には、 注: |
InvalidOperation |
注: |
TokenValueRequired |
<Tokens> 要素にトークンの <Token> 値を指定する必要があります。 |
障害変数
このポリシーがランタイム時にエラーのトリガーとなった場合は、次の変数が設定されます。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害コードの最後の部分が障害名になります。 | fault.name = "invalid_request" |
oauthV2.policy_name.failed |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | oauthV2.GenerateAccesstoken.failed = true |
oauthV2.policy_name.fault.name |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | oauthV2.GenerateAccesstoken.fault.name = invalid_request
注: VerifyAccessToken オペレーションでは障害名に接尾辞 |
oauthV2.policy_name.fault.cause |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | oauthV2.GenerateAccesstoken.cause = Required param : grant_type |
エラー レスポンスの例
<GenerateResponse>
要素が true に設定されている場合、以下の応答がクライアントに返されます。
<GenerateResponse>
が true に設定されている場合、トークンとコードを生成するオペレーションで次の形式のエラーが返されます。完全な一覧については、OAuth HTTP エラー レスポンス リファレンスをご覧ください。
{"ErrorCode" : "invalid_client", "Error" :"ClientId is Invalid"}
<GenerateResponse>
が true に設定されている場合、確認オペレーションや検証オペレーションで次の形式のエラーが返されます。完全な一覧については、OAuth HTTP エラー レスポンス リファレンスをご覧ください。
{ { "fault":{ "faultstring":"Invalid Access Token", "detail":{ "errorcode":"keymanagement.service.invalid_access_token" } } }
障害ルールの例
<FaultRule name=OAuthV2 Faults"> <Step> <Name>AM-InvalidClientResponse</Name> <Condition>(fault.name = "invalid_client") OR (fault.name = "InvalidClientIdentifier")</Condition> </Step> <Step> <Name>AM-InvalidTokenResponse</Name> <Condition>(fault.name = "invalid_access_token")</Condition> </Step> <Condition>(oauthV2.failed = true) </Condition> </FaultRule>
Get OAuthV2 Info ポリシー
このセクションでは、このポリシーによってエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成するうえで重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
以下のエラーは、ポリシー実行時に発生する可能性があるものです。下記のエラー名は、エラー発生時に fault.name
変数に設定される文字列です。詳細については、下記の Fault 変数のセクションをご覧ください。
障害コード | HTTP ステータス | 原因 |
---|---|---|
steps.oauth.v2.access_token_expired |
500 | ポリシーに送信されたアクセス トークンは期限切れです。 |
steps.oauth.v2.authorization_code_expired |
500 | ポリシーに送信された認可コードは期限切れです。 |
steps.oauth.v2.invalid_access_token |
500 | ポリシーに送信されたアクセス トークンは無効です。 |
steps.oauth.v2.invalid_client-invalid_client_id |
500 | ポリシーに送信されたクライアント ID は無効です。 |
steps.oauth.v2.invalid_refresh_token |
500 | ポリシーに送信されたリフレッシュ トークンは無効です。 |
steps.oauth.v2.invalid_request-authorization_code_invalid |
500 | ポリシーに送信された認可コードは無効です。 |
steps.oauth.v2.InvalidAPICallAsNoApiProductMatchFound |
401 | このエラーの解決方法については、Apigee コミュニティの投稿をご覧ください。 |
steps.oauth.v2.refresh_token_expired |
500 | ポリシーに送信されたリフレッシュ トークンは期限切れです。 |
デプロイエラー
デプロイエラーについては、UI に表示されたメッセージをご覧ください。
障害変数
以下の変数は、このポリシーにより実行時にエラーが発生したときに設定されます。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name Matches "IPDeniedAccess" |
oauthV2.policy_name.failed |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | oauthV2.GetTokenInfo.failed = true |
oauthV2.policy_name.fault.name |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | oauthV2.GetToKenInfo.fault.name = invalid_client-invalid_client_id |
oauthV2.policy_name.fault.cause |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | oauthV2.GetTokenInfo.cause = ClientID is Invalid |
エラー レスポンスの例
{ "fault":{ "faultstring":"ClientId is Invalid", "detail":{ "errorcode":"keymanagement.service.invalid_client-invalid_client_id" } } }
障害ルールの例
<FaultRule name="OAuthV2 Faults"> <Step> <Name>AM-InvalidClientIdResponse</Name> </Step> <Condition>(fault.name = "invalid_client-invalid_client_id")</Condition> </FaultRule>
Set OAuthV2 Info ポリシー
このセクションでは、このポリシーによってエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成するうえで重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 |
---|---|---|
steps.oauth.v2.access_token_expired |
500 | ポリシーに送信されたアクセス トークンは期限切れです。 |
steps.oauth.v2.invalid_access_token |
500 | ポリシーに送信されたアクセス トークンは無効です。 |
steps.oauth.v2.InvalidAPICallAsNoApiProductMatchFound |
401 | このエラーのトラブルシューティングについては、Apigee コミュニティの投稿をご覧ください。 |
デプロイエラー
デプロイエラーについては、UI に表示されたメッセージをご覧ください。
障害変数
以下の変数は、このポリシーにより実行時にエラーが発生したときに設定されます。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name = "invalid_access_token" |
oauthV2.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | oauthV2.SetTokenInfo.failed = true |
oauthV2.policy_name.fault.name |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | oauthV2.SetTokenInfo.fault.name = invalid_access_token |
oauthv2.policy_name.fault.cause |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | oauthV2.SetTokenInfo.cause = Invalid Access Token |
エラー レスポンスの例
{ "fault": { "faultstring": "Invalid Access Token", "detail": { "errorcode": "keymanagement.service.invalid_access_token" } } }
障害ルールの例
<FaultRule name=SetOAuthV2Info Faults"> <Step> <Name>AM-InvalidTokenResponse</Name> <Condition>(fault.name = "invalid_access_token")</Condition> </Step> <Condition>(oauthV2.failed = true) </Condition> </FaultRule>
Delete OAuthV2 Info ポリシー
このセクションでは、このポリシーでエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害を処理するルールを作成する際に重要な情報となります。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
このエラーは、ポリシーの実行時に発生する可能性があります。
障害コード | HTTP ステータス | 原因 |
---|---|---|
steps.oauth.v2.invalid_access_token |
401 | ポリシーに送信されたアクセス トークンが無効です。 |
steps.oauth.v2.invalid_request-authorization_code_invalid |
401 | ポリシーに送信された認可コードが無効です。 |
steps.oauth.v2.InvalidAPICallAsNoApiProductMatchFound |
401 | このエラーの解決方法については、Apigee コミュニティの投稿をご覧ください。 |
デプロイエラー
デプロイエラーについては、UI に表示されたメッセージをご覧ください。
障害変数
以下の変数は、このポリシーでランタイム エラーが発生したときに設定されます。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラーの表にある障害名です。障害コードの最後の部分が障害名になります。 | fault.name = "invalid_access_token" |
oauthV2.policy_name.failed |
policy_name は、エラーが発生したポリシーにユーザーが指定した名前です。 | oauthV2.DeleteTokenInfo.failed = true |
oauthV2.policy_name.fault.name |
policy_name は、エラーが発生したポリシーにユーザーが指定した名前です。 | oauthV2.DeleteTokenInfo.fault.name = invalid_access_token |
oauthv2.policy_name.fault.cause |
policy_name は、エラーが発生したポリシーにユーザーが指定した名前です。 | oauthV2.DeleteTokenInfo.cause = Invalid Access Token |
エラー レスポンスの例
{ "fault": { "faultstring": "Invalid Access Token", "detail": { "errorcode": "keymanagement.service.invalid_access_token" } } }
障害ルールの例
<faultrule name="VariableOfNonMsgType"></faultrule><FaultRule name="DeleteOAuthV2Info_Faults"> <Step> <Name>AM-InvalidTokenResponse</Name> </Step> <Condition>(fault.name = "invalid_access_token")</Condition> </FaultRule>
OAuth v1.0a ポリシー
OAuthV1 のポリシータイプは、以下のエラーコードを定義します。
OAuth 関連の HTTP エラーコードについては、OAuth HTTP エラー レスポンス リファレンスをご覧ください。
エラーコード | メッセージ |
---|---|
AppKeyNotResolved |
Could not resolve the app key with variable {0} |
ConsumerKeyNotResolved |
Could not resolve the consumer key with variable {0} |
RequestTokenNotResolved |
Could not resolve the request token with the variable {0} |
AccessTokenNotResolved |
Could not resolve the access token with the variable {0} |
ResponseGenerationError |
Error while generating response : {0} |
UnableToDetermineOperation |
Unable to determine an operation for stepDefinition {0} |
UnableToResolveOAuthConfig |
Unable to resolve the OAuth configuration for {0} |
AtLeastOneParamRequired |
At least one of AccessToken, RequestToken or ConsumerKey must be specified in
stepDefinition {0} |
SpecifyValueOrRefReqToken |
Specify Request Token as value or ref in stepDefinition {0} |
SpecifyValueOrRefAccToken |
Specify Access Token as value or ref in stepDefinition {0} |
SpecifyValueOrRefConKey |
Specify Consumer Key as value or ref in stepDefinition {0} |
SpecifyValueOrRefAppKey |
Specify App Key as value or ref in stepDefinition {0} |
ExpiresInNotApplicableForOperation |
ExpiresIn element is not valid for operation {0} |
InvalidValueForExpiresIn |
Invalid value for ExpiresIn element for operation {0} |
FailedToFetchApiProduct |
Failed to fetch api product for key {0} |
InvalidTokenType |
Valid token types : {0}, Invalid toke type {1} in stepDefinition {2} |
TokenValueRequired |
Token value is required in stepDefinition {0} |
FailedToResolveRealm |
Failed to resolve realm {0} |
Get OAuthV1 Info ポリシー
Get OAuth v1.0a Info ポリシーに指定されたエラーコードはありません。
Delete OAuthV1 Info ポリシー
成功すると、ポリシーは 200 ステータスを返します。
失敗すると、ポリシーは 404 と次のような出力を返します。出力は削除対象(アクセス トークン、リクエスト トークン、検証コード)によって異なります。
HTTP/1.1 404 Not Found Content-Type: application/json Content-Length: 144 Connection: keep-alive {"fault":{"faultstring":"Invalid Access Token","detail":{"errorcode":"keymanagement.service.invalid_request-access_token_invalid"}}}
Python Script ポリシー
Python Script ポリシーに指定されているエラーコードはありません。
Quota ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生したときに返される障害コードとエラー メッセージ、そして Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
policies.ratelimit.FailedToResolveQuotaIntervalReference |
500 | Quota ポリシー内に <Interval> 要素が定義されていない場合に発生します。この要素は必須であり、割り当ての対象期間を指定するために使用されます。この期間は、<TimeUnit> 要素で定義された分数、時間数、日数、週数、月数として定義できます。 |
build |
policies.ratelimit.FailedToResolveQuotaIntervalTimeUnitReference |
500 | Quota ポリシー内に <TimeUnit> 要素が定義されていない場合に発生します。この要素は必須であり、割り当てに適用する時間単位を指定するために使用されます。期間は、分数、時間数、日数、週数、月数として定義できます。 |
build |
policies.ratelimit.InvalidMessageWeight |
500 | フロー変数で <MessageWeight> 要素に無効な値(整数以外の値)が指定された場合に発生します。 |
build |
policies.ratelimit.QuotaViolation |
500 | 割り当て制限を超えました。 | なし |
デプロイエラー
エラー名 | 原因 | 修正 |
---|---|---|
InvalidQuotaInterval |
<Interval> 要素に指定された割り当て間隔が整数でない場合、API プロキシのデプロイは失敗します。たとえば、<Interval> 要素に指定された割り当て間隔が 0.1 の場合、API プロキシのデプロイは失敗します。
|
build |
InvalidQuotaTimeUnit |
<TimeUnit> 要素に指定された時間単位がサポートされないものである場合、API プロキシのデプロイは失敗します。サポートされている時間単位は minute 、hour 、day 、week 、month です。
|
build |
InvalidQuotaType |
<Quota> 要素の type 属性によって指定された割り当てのタイプが無効な場合、API プロキシのデプロイは失敗します。サポートされている割り当てタイプは default 、calendar 、flexi 、rollingwindow です。
|
build |
InvalidStartTime |
<StartTime> 要素に指定された時間の形式が無効な場合、API プロキシのデプロイは失敗します。有効な形式は yyyy-MM-dd HH:mm:ss です。これは、ISO 8601 の日付と時刻の形式です。たとえば、<StartTime> 要素に指定された時刻が 7-16-2017 12:00:00 の場合、API プロキシのデプロイは失敗します。
|
build |
StartTimeNotSupported |
<StartTime> 要素が指定されていて、その割り当てタイプが calendar でない場合、API プロキシのデプロイは失敗します。<StartTime> 要素でサポートされている割り当てタイプは calendar だけです。たとえば、<Quota> 要素で type 属性が flexi または rolling window に設定されていると、API プロキシのデプロイは失敗します。
|
build |
InvalidTimeUnitForDistributedQuota |
<Distributed> 要素が true に設定され、<TimeUnit> 要素が second に設定されていると、API プロキシのデプロイは失敗します。分散割り当ての場合、時間単位 second は無効です。 |
build |
InvalidSynchronizeIntervalForAsyncConfiguration |
Quota ポリシーの <AsynchronousConfiguration> 要素の <SyncIntervalInSeconds> 要素に 0 より小さい値が指定されていると、API プロキシのデプロイに失敗します。 |
build |
InvalidAsynchronizeConfigurationForSynchronousQuota |
Quota ポリシーの <AsynchronousConfiguration> 要素に true が設定され、<AsynchronousConfiguration> 要素で非同期構成が定義されていると、API プロキシのデプロイは失敗します。 |
build |
障害変数
このポリシーがトリガーとなってエラーが発生した場合は、次の変数が設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害コードの最後の部分が障害名になります。 | fault.name Matches "QuotaViolation" |
ratelimit.policy_name.failed |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | ratelimit.QT-QuotaPolicy.failed = true |
エラー レスポンスの例
{ "fault":{ "detail":{ "errorcode":"policies.ratelimit.QuotaViolation" }, "faultstring":"Rate limit quota violation. Quota limit exceeded. Identifier : _default" } }
障害ルールの例
<FaultRules> <FaultRule name="Quota Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "QuotaViolation") </Condition> </Step> <Condition>ratelimit.Quota-1.failed=true</Condition> </FaultRule> </FaultRules>
Reset Quota ポリシー
Reset Quota ポリシータイプは、以下のエラーコードを定義します。エラー処理の手順については、障害の処理をご覧ください。
エラーコード | メッセージ |
---|---|
InvalidRLPolicyDefinition | 無効なレート制限ポリシー {0} |
NoRLPolicy | Quota ポリシー {0} が添付されていません。 |
InvalidCount | {2} の識別子 {1} のカウント値 {0} が無効です |
FailedToResolveAllowCountRef | {2} の識別子 {1} の allow カウント参照 {0} を解決できませんでした |
Raise Fault ポリシー
このセクションでは、このポリシーによってエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成するうえで重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 |
---|---|---|
steps.raisefault.RaiseFault |
500 | 障害文字列をご覧ください。 |
デプロイエラー
なし。
障害変数
以下の変数は、ランタイム エラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name = "RaiseFault" |
raisefault.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | raisefault.RF-ThrowError.failed = true |
エラー レスポンスの例
{ "fault":{ "detail":{ "errorcode":"steps.raisefault.RaiseFault" }, "faultstring":"Raising fault. Fault name: [name]" } }
障害ルールの例
<FaultRule name="RaiseFault"> <Step> <Name>RF-ThrowError</Name> <Condition>(fault.name Matches "RaiseFault") </Condition> </Step> </FaultRule>
Regular Expression Protection ポリシー
RegularExpressionProtection ポリシータイプは、以下のエラーコードを定義します。エラーをキャプチャして独自のカスタムエラーを発生させる場合は、ポリシールート要素の continueOnError="true"
属性を設定します。詳細については障害の処理をご覧ください。
エラーコード | メッセージ |
---|---|
NothingToEnforce | RegularExpressionProtection{0}: URIPath、QueryParam、Header、FormParam、MLPayload、JSONPayload のうち少なくとも 1 つが必須です |
NoPatternsToEnforce | RegularExpressionProtection{0}: {1} に適用するパターンはありません |
EmptyXPathExpression | RegularExpressionProtection{0}: 空の XPath 式 |
EmptyJSONPathExpression | RegularExpressionProtection{0}: 空の JSONPath 式 |
DuplicatePrefix | RegularExpressionProtection{0}: 重複接頭辞 {1} |
NONEmptyPrefixMappedToEmptyURI | RegularExpressionProtection{0}: 空でない接頭辞 {1} は空の URI にマップできません |
ThreatDetected | {0} で検出された正規表現の脅威: regex: {1} 入力: {2} |
ExecutionFailed | RegularExpressionProtection StepDefinition{0} の実行に失敗しました。理由: {1} |
VariableResolutionFailed | 変数 {0} を解決できませんでした |
NonMessageVariable | 変数 {0} はメッセージに解決されません |
SourceMessageNotAvailable | RegularExpressionProtection StepDefinition{1} に {0} メッセージは使用できません |
InvalidRegularExpression | RegularExpressionProtection{0}: 無効な正規表現 {1}、コンテキスト {2} |
InstantiationFailed | RegularExpressionProtection StepDefinition{0} のインスタンス化に失敗しました |
CannotBeConvertedToNodeset | RegularExpressionProtection{0}: xpath {1} の結果を nodeset に変換できません。コンテキスト {2} |
XPathCompilationFailed | RegularExpressionProtection{0}: xpath {1} をコンパイルできませんでした。コンテキスト {2} |
JSONPathCompilationFailed | RegularExpressionProtection{0}: jsonpath {1} をコンパイルできませんでした。コンテキスト {2} |
SOAP Message Validation ポリシー
このポリシーは、エラー レスポンスで次のエラーコードとエラー メッセージを返します。エラー処理の手順については、エラー処理をご覧ください。
エラーコード | メッセージ |
---|---|
InvalidResourceType |
InvalidResourceType MessageValidation {0}: Invalid Resource Type {1}. It should be xsd or wsdl. Context {2} |
ResourceCompileFailed |
ResourceCompileFailed MessageValidation {0}: Failed to compile resource {1}. Context {2} |
RootElementNameUnspecified |
RootElementNameUnspecified MessageValidation {0}: RootElement name is not specified |
InvalidRootElementName |
InvalidRootElementName MessageValidation {0}: RootElement name {1} is invalid |
NonMessageVariable |
NonMessageVariable Variable {0} does not resolve to a Message |
SourceMessageNotAvailable |
SourceMessageNotAvailable {0} message is not available for MessageValidation: {1} |
NoElements |
Resource "{0}" has no element definitions |
Failed |
MessageValidation {0} failed with reason: "{1}" |
SAML Assertion ポリシー
SAML Assertion ポリシーに固有のエラーコードはありません。
Service Callout ポリシー
このセクションでは、このポリシーでエラーをトリガーしたときに返される障害コードおよびエラー メッセージと、Edge によって設定される障害変数について説明します。この情報は、障害に対処するための障害ルールを作成するうえで重要です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
これらのエラーは、ポリシーの実行時に発生することがあります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
steps.servicecallout.ExecutionFailed |
500 |
このエラーは、次の場合に発生します。
|
build |
steps.servicecallout.RequestVariableNotMessageType |
500 | ポリシーで指定された Request 変数のタイプが Message でない場合。たとえば、文字列またはその他の非メッセージ タイプの場合、このエラーが表示されます。 | build |
steps.servicecallout.RequestVariableNotRequestMessageType |
500 | ポリシーで指定された Request 変数のタイプが Request Message でない場合。たとえば、レスポンス タイプの場合、このエラーが表示されます。 | build |
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
URLMissing |
<HTTPTargetConnection> 内の <URL> 要素がないか空です。 |
build |
ConnectionInfoMissing |
このエラーは、ポリシーに <HTTPTargetConnection> または <LocalTargetConnection> 要素がない場合に発生します。 |
build |
InvalidTimeoutValue |
このエラーは、<Timeout> 値が負の値またはゼロの場合に発生します。 |
build |
障害変数
これらの変数は、実行時エラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害名は、障害コードの最後の部分です。 | fault.name = "RequestVariableNotMessageType" |
servicecallout.policy_name.failed |
policy_name は、障害をスローしたポリシーのユーザーが指定した名前です。 | servicecallout.SC-GetUserData.failed = true |
エラー レスポンスの例
{ "fault":{ "detail":{ "errorcode":"steps.servicecallout.RequestVariableNotMessageType" }, "faultstring":"ServiceCallout[ServiceCalloutGetMockResponse]: request variable data_str value is not of type Message" } }
障害ルールの例
<faultrule name="VariableOfNonMsgType"></faultrule><FaultRule name="RequestVariableNotMessageType"> <Step> <Name>AM-RequestVariableNotMessageType</Name> </Step> <Condition>(fault.name = "RequestVariableNotMessageType")</Condition> </FaultRule>
Spike Arrest ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生したときに返される障害コードとエラー メッセージ、そして Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に、以下のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
policies.ratelimit.FailedToResolveSpikeArrestRate |
500 | このエラーは、<Rate> 要素に含まれるレート設定を格納する変数への参照を、Spike Arrest ポリシー内で指定されている値に解決できない場合に発生します。この要素は必須であり、{int}pm または {int}ps の形式でのスパイク停止率の指定に使用されます。 |
build |
policies.ratelimit.InvalidMessageWeight |
500 | このエラーは、フロー変数によって <MessageWeight> 要素に指定された値が無効である(整数以外の値)場合に発生します。 |
build |
policies.ratelimit.SpikeArrestViolation |
500 | レート制限を超えています。 |
デプロイエラー
このポリシーを含むプロキシをデプロイすると、次のエラーが発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
InvalidAllowedRate |
Spike Arrest ポリシーの <Rate> 要素で指定されたスパイク停止率が整数でない場合、またはレートに接尾辞 ps または pm がない場合、その API プロキシのデプロイが失敗します。 |
build |
障害変数
以下の変数は、ランタイム エラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、上記のランタイム エラー表に記載されている障害の名前です。障害コードの最後の部分が障害名になります。 | fault.name Matches "SpikeArrestViolation" |
ratelimit.policy_name.failed |
policy_name は、障害をスローしたポリシーにユーザーが指定した名前です。 | ratelimit.SA-SpikeArrestPolicy.failed = true |
エラー レスポンスの例
{ "fault":{ "detail":{ "errorcode":"policies.ratelimit.SpikeArrestViolation" }, "faultstring":"Spike arrest violation. Allowed rate : 10ps" } }
障害ルールの例
<FaultRules> <FaultRule name="Spike Arrest Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "SpikeArrestViolation") </Condition> </Step> <Condition>ratelimit.Spike-Arrest-1.failed=true</Condition> </FaultRule> </FaultRules>
Statistics Collector ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生すると設定される、エラー メッセージとフロー変数について説明します。これは、プロキシの障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
なし
デプロイエラー
エラー名 | 原因 | 修正 |
---|---|---|
UnsupportedDatatype |
Statistics Collector ポリシーの <Statistic> 要素の ref 属性で指定された変数の型がサポートされていないものであると、API プロキシのデプロイに失敗します。サポートされているデータ型は、string 、integer 、float 、long 、double 、boolean です。 |
build |
InvalidName |
Statistics Collector ポリシーの <Statistic> 要素に定義されている変数のデータを参照するために使用する名前がシステム定義の変数と競合する場合、API プロキシのデプロイに失敗します。システム定義の変数としては organization 、environment などがあります。 |
build |
DatatypeMissing |
Statistics Collector ポリシーの <Statistic> 要素の ref 属性に指定された変数の型が見つからないと、API プロキシのデプロイに失敗します。 |
build |
障害変数
なし
Verify API Key ポリシー
このセクションでは、このポリシーでエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害を処理するルールを作成する際に重要な情報となります。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に次のエラーが発生することがあります。
障害コード | HTTP ステータス | 原因 |
---|---|---|
keymanagement.service.CompanyStatusNotActive |
401 | デベロッパー アプリに関連付けられ、使用する API キーを所有している会社がアクティブな状態ではありません。会社のステータスを非アクティブに設定すると、この会社に関連するデベロッパーやアプリにアクセスできなくなります。組織管理者は、管理 API を使用して会社のステータスを変更できます。会社のステータスの設定をご覧ください |
keymanagement.service.DeveloperStatusNotActive |
401 |
デベロッパー アプリを作成し、使用する API キーを所有しているデベロッパーがアクティブな状態ではありません。アプリのデベロッパーのステータスを非アクティブに設定すると、このデベロッパーが作成したすべてのデベロッパー アプリが無効になります。適切な権限のある管理者ユーザー(組織管理者など)は、次の方法でデベロッパーのステータスを変更できます。
|
keymanagement.service.invalid_client-app_not_approved |
401 | API キーが関連するデベロッパー アプリが失効しています。失効したアプリは API プロダクトにアクセスできません。Apigee Edge で管理されている API も呼び出すことができません。組織管理者は、管理 API を使用してデベロッパー アプリのステータスを変更できます。デベロッパー アプリの承認と失効をご覧ください。 |
oauth.v2.FailedToResolveAPIKey |
401 | このポリシーは、ポリシーの <APIKey> 要素に指定された変数に API キーが格納されていることを前提としています。このエラーは、予期した変数が存在せず、解決できない場合に発生します。 |
oauth.v2.InvalidApiKey |
401 | Edge が受信した API キーが無効です。Edge がデータベースでキーを検索するときに、リクエストで送信されたキーと完全に一致している必要があります。API がすでに実行されている場合は、キーが再生成されていないことを確認します。キーが再生成されている場合、古いキーを使用すると、このエラーが発生します。詳細については、アプリの登録と API キーの管理をご覧ください。 |
oauth.v2.InvalidApiKeyForGivenResource |
401 | Edge が有効な API キーを受信しましたが、プロダクトで API プロキシと関連付けられているデベロッパー アプリの承認キーと一致しません。 |
デプロイエラー
このポリシーを含むプロキシのデプロイで、次のエラーが発生することがあります。
エラー名 | 原因 |
---|---|
SpecifyValueOrRefApiKey |
<APIKey> 要素に値またはキーが指定されていません。 |
障害変数
ランタイム エラーが発生すると、次の変数が設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は障害名です。詳しくは、上のランタイム エラーの表をご覧ください。障害コードの最後の部分が障害名になります。 | fault.name Matches "FailedToResolveAPIKey" |
oauthV2.policy_name.failed |
policy_name は、障害が発生したユーザー指定のポリシー名です。 | oauthV2.VK-VerifyAPIKey.failed = true |
エラー レスポンスの例
{ "fault":{ "faultstring":"Invalid ApiKey", "detail":{ "errorcode":"oauth.v2.InvalidApiKey" } } }
{ "fault":{ "detail":{ "errorcode":"keymanagement.service.DeveloperStatusNotActive" }, "faultstring":"Developer Status is not Active" } }
障害ルールの例
<FaultRule name="FailedToResolveAPIKey"> <Step> <Name>AM-FailedToResolveAPIKey</Name> </Step> <Condition>(fault.name Matches "FailedToResolveAPIKey") </Condition> </FaultRule>
Verify JWS ポリシー
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Occurs when |
---|---|---|
steps.jws.AlgorithmInTokenNotPresentInConfiguration |
401 | Occurs when the verification policy has multiple algorithms |
steps.jws.AlgorithmMismatch |
401 | The algorithm specified in the header by the Generate policy did not match the one expected in the Verify policy. The algorithms specified must match. |
steps.jws.ContentIsNotDetached |
401 | <DetachedContent> is specified when the JWS does not contain a
detached content payload. |
steps.jws.FailedToDecode |
401 | The policy was unable to decode the JWS. The JWS is possibly corrupted. |
steps.jws.InsufficientKeyLength |
401 | For a key less than 32 bytes for the HS256 algorithm |
steps.jws.InvalidClaim |
401 | For a missing claim or claim mismatch, or a missing header or header mismatch. |
steps.jws.InvalidCurve |
401 | The curve specified by the key is not valid for the Elliptic Curve algorithm. |
steps.jws.InvalidJsonFormat |
401 | Invalid JSON found in the JWS header. |
steps.jws.InvalidJws |
401 | This error occurs when the JWS signature verification fails. |
steps.jws.InvalidPayload |
401 | The JWS payload is invalid. |
steps.jws.InvalidSignature |
401 | <DetachedContent> is omitted and the JWS has a detached content payload. |
steps.jws.KeyIdMissing |
401 | The Verify policy uses a JWKS as a source for public keys, but the signed JWS does not
include a kid property in the header. |
steps.jws.KeyParsingFailed |
401 | The public key could not be parsed from the given key information. |
steps.jws.MissingPayload |
401 | The JWS payload is missing. |
steps.jws.NoAlgorithmFoundInHeader |
401 | Occurs when the JWS omits the algorithm header. |
steps.jws.NoMatchingPublicKey |
401 | The Verify policy uses a JWKS as a source for public keys, but the kid
in the signed JWS is not listed in the JWKS. |
steps.jws.UnhandledCriticalHeader |
401 | A header found by the Verify JWS policy in the crit header is not
listed in KnownHeaders . |
steps.jws.UnknownException |
401 | An unknown exception occurred. |
steps.jws.WrongKeyType |
401 | Wrong type of key specified. For example, if you specify an RSA key for an Elliptic Curve algorithm, or a curve key for an RSA algorithm. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Occurs when |
---|---|
InvalidAlgorithm |
The only valid values are: RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512. |
|
Other possible deployment errors. |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "TokenExpired" |
JWS.failed |
All JWS policies set the same variable in the case of a failure. | jws.JWS-Policy.failed = true |
Example error response
For error handling, the best practice is to trap the errorcode
part of the error
response. Do not rely on the text in the faultstring
, because it could change.
Example fault rule
<FaultRules> <FaultRule name="JWS Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWS.failed=true</Condition> </FaultRule> </FaultRules>
Verify JWT ポリシー
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Occurs when |
---|---|---|
steps.jwt.AlgorithmInTokenNotPresentInConfiguration |
401 | Occurs when the verification policy has multiple algorithms. |
steps.jwt.AlgorithmMismatch |
401 | The algorithm specified in the Generate policy did not match the one expected in the Verify policy. The algorithms specified must match. |
steps.jwt.FailedToDecode |
401 | The policy was unable to decode the JWT. The JWT is possibly corrupted. |
steps.jwt.GenerationFailed |
401 | The policy was unable to generate the JWT. |
steps.jwt.InsufficientKeyLength |
401 | For a key less than 32 bytes for the HS256 algorithm, less than 48 bytes for the HS386 algortithm, and less than 64 bytes for the HS512 algorithm. |
steps.jwt.InvalidClaim |
401 | For a missing claim or claim mismatch, or a missing header or header mismatch. |
steps.jwt.InvalidCurve |
401 | The curve specified by the key is not valid for the Elliptic Curve algorithm. |
steps.jwt.InvalidJsonFormat |
401 | Invalid JSON found in the header or payload. |
steps.jwt.InvalidToken |
401 | This error occurs when the JWT signature verification fails. |
steps.jwt.JwtAudienceMismatch |
401 | The audience claim failed on token verification. |
steps.jwt.JwtIssuerMismatch |
401 | The issuer claim failed on token verification. |
steps.jwt.JwtSubjectMismatch |
401 | The subject claim failed on token verification. |
steps.jwt.KeyIdMissing |
401 | The Verify policy uses a JWKS as a source for public keys, but the signed JWT does not
include a kid property in the header. |
steps.jwt.KeyParsingFailed |
401 | The public key could not be parsed from the given key information. |
steps.jwt.NoAlgorithmFoundInHeader |
401 | Occurs when the JWT contains no algorithm header. |
steps.jwt.NoMatchingPublicKey |
401 | The Verify policy uses a JWKS as a source for public keys, but the kid
in the signed JWT is not listed in the JWKS. |
steps.jwt.SigningFailed |
401 | In GenerateJWT, for a key less than the minimum size for the HS384 or HS512 algorithms |
steps.jwt.TokenExpired |
401 | The policy attempts to verify an expired token. |
steps.jwt.TokenNotYetValid |
401 | The token is not yet valid. |
steps.jwt.UnhandledCriticalHeader |
401 | A header found by the Verify JWT policy in the crit header is not
listed in KnownHeaders . |
steps.jwt.UnknownException |
401 | An unknown exception occurred. |
steps.jwt.WrongKeyType |
401 | Wrong type of key specified. For example, if you specify an RSA key for an Elliptic Curve algorithm, or a curve key for an RSA algorithm. |
Deployment errors
These errors can occur when you deploy a proxy containing this policy.
Error name | Cause | Fix |
---|---|---|
InvalidNameForAdditionalClaim |
The deployment will fail if the claim used in the child element <Claim>
of the <AdditionalClaims> element is one of the following registered names:
kid , iss , sub , aud , iat ,
exp , nbf , or jti .
|
build |
InvalidTypeForAdditionalClaim |
If the claim used in the child element <Claim>
of the <AdditionalClaims> element is not of type string , number ,
boolean , or map , the deployment will fail.
|
build |
MissingNameForAdditionalClaim |
If the name of the claim is not specified in the child element <Claim>
of the <AdditionalClaims> element, the deployment will fail.
|
build |
InvalidNameForAdditionalHeader |
This error ccurs when the name of the claim used in the child element <Claim>
of the <AdditionalClaims> element is either alg or typ .
|
build |
InvalidTypeForAdditionalHeader |
If the type of claim used in the child element <Claim>
of the <AdditionalClaims> element is not of type string , number ,
boolean , or map , the deployment will fail.
|
build |
InvalidValueOfArrayAttribute |
This error occurs when the value of the array attribute in the child element <Claim>
of the <AdditionalClaims> element is not set to true or false .
|
build |
InvalidValueForElement |
If the value specified in the <Algorithm> element is not a supported value,
the deployment will fail.
|
build |
MissingConfigurationElement |
This error will occur if the <PrivateKey> element is not used with
RSA family algorithms or the <SecretKey> element is not used with HS Family
algorithms.
|
build |
InvalidKeyConfiguration |
If the child element <Value> is not defined in the <PrivateKey>
or <SecretKey> elements, the deployment will fail.
|
build |
EmptyElementForKeyConfiguration |
If the ref attribute of the child element <Value> of the <PrivateKey>
or <SecretKey> elements is empty or unspecified, the deployment will fail.
|
build |
InvalidConfigurationForVerify |
This error occurs if the <Id> element is defined within the
<SecretKey> element.
|
build |
InvalidEmptyElement |
This error occurs if the <Source> element of the Verify JWT policy
is empty. If present, it must be defined with an Edge flow variable name.
|
build |
InvalidPublicKeyValue |
If the value used in the child element <JWKS> of the <PublicKey> element
does not use a valid format as specified in RFC 7517,
the deployment will fail.
|
build |
InvalidConfigurationForActionAndAlgorithm |
If the <PrivateKey> element is used with HS Family algorithms or
the <SecretKey> element is used with RSA Family algorithms, the
deployment will fail.
|
build |
Fault variables
These variables are set when a runtime error occurs. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "TokenExpired" |
JWT.failed |
All JWT policies set the same variable in the case of a failure. | JWT.failed = true |
Example error response
For error handling, the best practice is to trap the errorcode
part of the error
response. Do not rely on the text in the faultstring
, because it could change.
Example fault rule
<FaultRules> <FaultRule name="JWT Policy Errors"> <Step> <Name>JavaScript-1</Name> <Condition>(fault.name Matches "TokenExpired")</Condition> </Step> <Condition>JWT.failed=true</Condition> </FaultRule> </FaultRules>
XML Threat Protection ポリシー
このセクションでは、このポリシーでエラーが発生したときに返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害を処理するルールを作成する際に重要な情報となります。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
ポリシーの実行時に次のエラーが発生することがあります。
* 障害コード | 障害文字列 | * HTTP ステータス | 原因 |
---|---|---|---|
steps.xmlthreatprotection.AttrCountExceeded |
XMLThreatProtection stepDefinition {0}: Attribute count exceeded {1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.AttrNameExceeded |
XMLThreatProtection stepDefinition {0}: Attribute name length exceeded
{1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.AttrValueExceeded |
XMLThreatProtection stepDefinition {0}: Attribute value length exceeded
{1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.ChildCountExceeded |
XMLThreatProtection stepDefinition {0}: Children count exceeded {1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.CommentExceeded |
XMLThreatProtection stepDefinition {0}: Comment length exceeded {1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.ElemNameExceeded |
XMLThreatProtection stepDefinition {0}: Element name length exceeded
{1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.ExecutionFailed |
XMLThreatProtection stepDefinition {0}: Execution failed. reason: {1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.NodeDepthExceeded |
XMLThreatProtection stepDefinition {0}: Node depth exceeded {1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.NonMessageVariable |
Variable {0} does not resolve to a Message |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.NSCountExceeded |
XMLThreatProtection stepDefinition {0}: Namespace count exceeded {1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.NSPrefixExceeded |
XMLThreatProtection stepDefinition {0}: Namespace prefix length exceeded
{1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.NSURIExceeded |
XMLThreatProtection stepDefinition {0}: Namespace uri length exceeded
{1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.PIDataExceeded |
XMLThreatProtection stepDefinition {0}: Processing Instruction data length
exceeded {1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.PITargetExceeded |
XMLThreatProtection stepDefinition {0}: Processing Instruction target length
exceeded {1} |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.SourceUnavailable |
XMLThreatProtection stepDefinition {0}: Source {1} is not available |
500 | 障害文字列をご覧ください。 |
steps.xmlthreatprotection.TextExceeded |
XMLThreatProtection stepDefinition {0}: Text length exceeded {1} |
500 | 障害文字列をご覧ください。 |
* 注:
- デフォルトのエラー名は ExecutionFailed です。検出されたエラーの種類に関係なく、このエラーが返されます。ただし、組織レベルのプロパティを設定すると、このデフォルト名を変更できます。このプロパティを設定すると、実際のエラーを反映した名前が使用されます。たとえば、TextExceeded や AttrValueExceeded などが使用されます。詳しくは、「使用上の注意」をご覧ください。
- 500 HTTP ステータスがデフォルトですが、組織レベルのプロパティを設定すると、リクエスト フローエラーの HTTP ステータスを 400 に変更できます。詳しくは、「使用上の注意」をご覧ください。
デプロイエラー
なし
障害変数
ランタイム エラーが発生すると、次の変数が設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は障害名です。詳しくは、上のランタイム エラーの表をご覧ください。障害コードの最後の部分が障害名になります。 | fault.name Matches "SourceUnavailable" |
xmlattack.policy_name.failed |
policy_name は、障害が発生したユーザー指定のポリシー名です。 | xmlattack.XPT-SecureRequest.failed = true |
エラー レスポンスの例
{ "fault": { "faultstring": "XMLThreatProtection[XPT-SecureRequest]: Execution failed. reason: XMLThreatProtection[XTP-SecureRequest]: Exceeded object entry name length at line 2", "detail": { "errorcode": "steps.xmlthreatprotection.ExecutionFailed" } } }
障害ルールの例
<FaultRule name="XML Threat Protection Policy Faults"> <Step> <Name>AM-CustomErrorResponse</Name> <Condition>(fault.name Matches "ExecutionFailed") </Condition> </Step> <Condition>(xmlattack.XPT-SecureRequest.failed = true) </Condition> </FaultRule>
XML to JSON ポリシー
このセクションでは、このポリシーがトリガーとなってエラーが発生したときに、返される障害コードとエラー メッセージ、Edge によって設定される障害変数について説明します。これは、障害に対処する障害ルールを作成する上で重要な情報です。詳細については、ポリシーエラーについて知っておくべきことと障害の処理をご覧ください。
ランタイム エラー
これらのエラーは、ポリシーの実行時に発生することがあります。
障害コード | HTTP ステータス | 原因 | 修正 |
---|---|---|---|
steps.xmltojson.ExecutionFailed |
500 | このエラーは、入力ペイロード(XML)が空であるか、入力 XML が無効または不正な場合に発生します。 | build |
steps.xmltojson.InCompatibleType |
500 | このエラーは、<Source> 要素と <OutputVariable> 要素で定義された変数の型が同じでない場合に発生します。<Source> 要素と <OutputVariable> 要素に含まれる変数の型が一致することは、必須です。
|
build |
steps.xmltojson.InvalidSourceType |
500 | このエラーは、<Source> 要素の定義に使用される変数の型が無効な場合に発生します。変数の有効な型は、message と string です。 |
build |
steps.xmltojson.OutputVariableIsNotAvailable |
500 | このエラーは、XML to JSON ポリシーの <Source> 要素で指定された変数が string 型で、<OutputVariable> 要素が定義されていない場合に発生します。<Source> 要素で定義された変数が string 型の場合、<OutputVariable> 要素は必須です。 |
build |
steps.xmltojson.SourceUnavailable |
500 |
このエラーは、XML to JSON ポリシーの <Source> 要素で指定された message 変数が、次のいずれかである場合に発生します。
|
build |
デプロイエラー
これらのエラーは、このポリシーを含むプロキシをデプロイするときに発生することがあります。
エラー名 | 原因 | 修正 |
---|---|---|
EitherOptionOrFormat |
<Options> または <Format> のいずれかの要素が XML to JSON ポリシーで宣言されていない場合、API プロキシのデプロイは失敗します。
|
build |
UnknownFormat |
XML to JSON ポリシー内の <Format> 要素に不明な形式が定義されている場合、API プロキシのデプロイは失敗します。事前定義された形式には、xml.com 、yahoo 、google 、badgerFish があります。
|
build |
障害変数
これらの変数は、ランタイム エラーが発生したときに設定されます。詳細については、ポリシーエラーについて知っておくべきことをご覧ください。
変数 | 説明 | 例 |
---|---|---|
fault.name="fault_name" |
fault_name は、前述のランタイム エラーの表にリストアップされている障害名です。障害名は、障害コードの最後の部分です。 | fault.name = "SourceUnavailable" |
xmltojson.policy_name.failed |
policy_name は、障害をスローしたポリシーの、ユーザーが指定した名前です。 | xmltojson.XMLtoJSON-1.failed = true |
エラー レスポンスの例
{ "fault": { "faultstring": "XMLToJSON[XMLtoJSON-1]: Source xyz is not available", "detail": { "errorcode": "steps.xml2json.SourceUnavailable" } } }
障害ルールの例
<faultrule name="VariableOfNonMsgType"></faultrule><FaultRule name="XML to JSON Faults"> <Step> <Name>AM-SourceUnavailableMessage</Name> <Condition>(fault.name Matches "SourceUnavailable") </Condition> </Step> <Step> <Name>AM-BadXML</Name> <Condition>(fault.name = "ExecutionFailed")</Condition> </Step> <Condition>(xmltojson.XMLtoJSON-1.failed = true) </Condition> </FaultRule>
XSL Transform ポリシー
XSLT ポリシータイプは、以下のエラーコードを定義します(数字は実行時に挿入される値のプレースホルダを表します)。
エラーコード | メッセージ |
---|---|
XSLSourceMessageNotAvailable |
{0} message is not available for XSL: {1} |
XSLEvaluationFailed |
Evaluation of XSL {0} failed with reason: "{1}" |
XSLVariableResolutionFailed |
Failed to resolve variable {0} |
XSLInvalidResourceType |
XSL {0}: Resource type must be xsl. Context {1} |
XSLEmptyResourceUrl |
Resource Url cannot be empty in XSL {0} |