Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APK] Update policies supported for APK #13498

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
]
}
Loading