Skip to content

Commit

Permalink
Merge integration test for audience validation to the master
Browse files Browse the repository at this point in the history
  • Loading branch information
BiyonFernando committed Aug 6, 2024
2 parents 83a9dab + be75e47 commit 3719301
Show file tree
Hide file tree
Showing 18 changed files with 2,576 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,14 @@ $in_sequences.get("$resource.getUriTemplate()").get($uri)
<loopback />
## AWS Lambda: end
#else
#if( $apiIsOauthProtected || $apiIsApiKeyProtected || $apiIsBasicAuthProtected )
<filter source="$ctx:AM_KEY_TYPE" regex="$filterRegex">
<then>
#end
#if( ($environmentType == 'sandbox') || ($environmentType =='hybrid'
&& ! $endpoint_config.get("production_endpoints")) )
#draw_endpoint( "sandbox" $endpoint_config )
#else
#draw_endpoint( "production" $endpoint_config )
#end
#if( $apiIsOauthProtected || $apiIsApiKeyProtected || $apiIsBasicAuthProtected )
</then>
<else>
#if( $environmentType !='hybrid' )
Expand Down Expand Up @@ -335,7 +332,6 @@ $in_sequences.get("$resource.getUriTemplate()").get($uri)
#end
</else>
</filter>
#end
#end
</inSequence>
<outSequence>
Expand All @@ -348,7 +344,6 @@ $out_sequences.get("$resource.getUriTemplate()").get($uri)
#if( $responseCacheEnabled )
<cache scope="per-host" collector="true"/>
#end
#if( $apiIsOauthProtected || $apiIsApiKeyProtected || $apiIsBasicAuthProtected )
<filter source="$ctx:AM_KEY_TYPE" regex="$filterRegex">
<then>
#if($endpointSecurityProd.clientId && ($endpointSecurityProd.type == "oauth" || $endpointSecurityProd.type == "OAUTH"))
Expand All @@ -361,7 +356,7 @@ $out_sequences.get("$resource.getUriTemplate()").get($uri)
#end
</else>
</filter>
#end

<send/>
</outSequence>
</resource>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"category": "Mediation",
"version": "v1",
"displayName": "Add Header",
"name": "apkAddHeader",
"description": "This policy allows you to add a new header to the request",
"policyAttributes": [
{
"name": "headerName",
"displayName": "Header Name",
"description": "Name of the header to be added",
"validationRegex": "^([a-zA-Z_\\:][a-zA-Z\\d_\\-\\ ]*)$",
"type": "String",
"required": true
},
{
"name": "headerValue",
"displayName": "Header Value",
"description": "Value of the header",
"validationRegex": "^.+$",
"type": "String",
"required": true
}
],
"applicableFlows": [
"request",
"response"
],
"supportedGateways": [
"ChoreoConnect"
],
"supportedApiTypes": [
"HTTP"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"category": "Mediation",
"name": "ccCallInterceptorService",
"name": "apkCallInterceptorService",
"version": "v1",
"displayName": "Call Interceptor Service",
"description": "This policy allows you to call an interceptor service for a request message",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"category": "Mediation",
"name": "apkMirrorRequest",
"version": "v1",
"displayName": "Mirror Request",
"description": "This policy allows you to mirror a request to various URLs",
"policyAttributes": [
{
"name": "url",
"displayName": "URL",
"description": "URL to mirror the request to",
"validationRegex": "^(([\\w+]+\\:\\/\\/)?([\\w\\d-]+\\.)*[\\w-]+([\\.\\:]\\w+)*([\\/\\?\\=\\&\\#\\.]?[\\w-]+)*\\/?)$",
"type": "String",
"required": true
}
],
"applicableFlows": [
"request"
],
"supportedGateways": [
"ChoreoConnect"
],
"supportedApiTypes": [
"HTTP"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"category": "Mediation",
"name": "apkRedirectRequest",
"version": "v1",
"displayName": "Redirect Request",
"description": "This policy allows you to redirect a request",
"policyAttributes": [
{
"name": "url",
"displayName": "URL",
"description": "URL to redirect the request to",
"validationRegex": "^(([\\w+]+\\:\\/\\/)?([\\w\\d-]+\\.)*[\\w-]+([\\.\\:]\\w+)*([\\/\\?\\=\\&\\#\\.]?[\\w-]+)*\\/?)$",
"type": "String",
"required": true
},
{
"name": "statusCode",
"displayName": "Status Code",
"description": "Status code to display upon redirecting the request. Must be either 301 or 302",
"validationRegex": "^(301|302)$",
"type": "Integer",
"required": true
}
],
"applicableFlows": [
"request"
],
"supportedGateways": [
"ChoreoConnect"
],
"supportedApiTypes": [
"HTTP"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"category": "Mediation",
"name": "apkRemoveHeader",
"version": "v1",
"displayName": "Remove Header",
"description": "This policy allows you to remove a header from the request",
"policyAttributes": [
{
"name": "headerName",
"displayName": "Header Name",
"description": "Name of the header to be removed",
"validationRegex": "^([a-zA-Z_\\:][a-zA-Z\\d_\\-\\ ]*)$",
"type": "String",
"required": true
}
],
"applicableFlows": [
"request",
"response"
],
"supportedGateways": [
"ChoreoConnect"
],
"supportedApiTypes": [
"HTTP"
]
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
932693cf163d497c081af51b44f9825a7ea795ac8a001cc0ebd5e582dab1722d
f22432a7f6a2e79f6244e9360787b60d17a9169f9e91d69368ce8fd2a139ba5d
Loading

0 comments on commit 3719301

Please sign in to comment.