Skip to content

Commit

Permalink
Add latest edgemicro-internal proxy bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
keyurkarnik committed Nov 8, 2019
1 parent 271945b commit 9947187
Show file tree
Hide file tree
Showing 17 changed files with 179 additions and 115 deletions.
14 changes: 9 additions & 5 deletions edge/apiproxy/EdgeMicro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,32 @@
<CreatedBy>[email protected]</CreatedBy>
<Description></Description>
<DisplayName>EdgeMicro</DisplayName>
<LastModifiedAt>1437163826987</LastModifiedAt>
<LastModifiedBy>[email protected]</LastModifiedBy>
<LastModifiedAt>1571374138125</LastModifiedAt>
<LastModifiedBy>[email protected]</LastModifiedBy>
<ManifestVersion>SHA-512:a9c385fb8bfd0a21131e1f19ddd9268903c5352dd8e3686df5453297904509e58479768ee90aac6fce70447560499121f2252cfbe536dfc1f83d2299e517cc29</ManifestVersion>
<Policies>
<Policy>Authenticate</Policy>
<Policy>Callout</Policy>
<Policy>Credential</Policy>
<Policy>DisablePathSuffixCopy</Policy>
<Policy>DistributedQuota</Policy>
<Policy>JSSetupVariables</Policy>
<Policy>NoOrgOrEnv</Policy>
<Policy>Raise-FaultForNonGETRequest</Policy>
<Policy>RemoveAuthorizationHeader</Policy>
<Policy>Return200</Policy>
<Policy>Return401</Policy>
<Policy>Return404</Policy>
<Policy>ReturnVersion</Policy>
<Policy>SetQuotaResponse</Policy>
</Policies>
<ProxyEndpoints>
<ProxyEndpoint>default</ProxyEndpoint>
</ProxyEndpoints>
<Resources>
<Resource>jsc://JSSetupVariables.js</Resource>
<Resource>java://edge-micro-javacallout-1.0.0.jar</Resource>
<Resource>jsc://JSSetupVariables.js</Resource>
</Resources>
<TargetServers/>
<TargetEndpoints/>
<validate>false</validate>
</APIProxy>
</APIProxy>
Empty file modified edge/apiproxy/policies/Authenticate.xml
100644 → 100755
Empty file.
15 changes: 7 additions & 8 deletions edge/apiproxy/policies/Callout.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JavaCallout name="Callout">
<DisplayName>Callout</DisplayName>
<Properties>
<Property name="PROXY_NAME_PREFIX">edgemicro_</Property>
<Property name="REGION_MAP">DN=http://23.23.5.244:9001</Property>
<Property name="MGMT_URL_PREFIX">http://23.23.5.244:8080</Property>
</Properties>
<ClassName>com.apigee.edgemicro.javacallout.Callout</ClassName>
<ResourceURL>java://edge-micro-javacallout-1.0.0.jar</ResourceURL>
<DisplayName>Callout</DisplayName>
<Properties>
<Property name="PROXY_NAME_PREFIX">edgemicro_</Property>
<Property name="REGION_MAP">DN=edgemicroservices.apigee.net,US-EAST-1=edgemicroservices-us-east-1.apigee.net,US-WEST-2=edgemicroservices-us-west-2.apigee.net,EU-WEST-1=edgemicroservices-eu-west-1.apigee.net,AP-NORTHEAST-1=edgemicroservices-ap-northeast-1.apigee.net</Property>
</Properties>
<ClassName>com.apigee.edgemicro.javacallout.Callout</ClassName>
<ResourceURL>java://edge-micro-javacallout-1.0.0.jar</ResourceURL>
</JavaCallout>
11 changes: 11 additions & 0 deletions edge/apiproxy/policies/DisablePathSuffixCopy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage name="DisablePathSuffixCopy">
<AssignVariable>
<Name>target.copy.pathsuffix</Name>
<Value>false</Value>
</AssignVariable>
<AssignVariable>
<Name>target.copy.queryparams</Name>
<Value>true</Value>
</AssignVariable>
</AssignMessage>
Empty file modified edge/apiproxy/policies/DistributedQuota.xml
100644 → 100755
Empty file.
Empty file modified edge/apiproxy/policies/JSSetupVariables.xml
100644 → 100755
Empty file.
Empty file modified edge/apiproxy/policies/NoOrgOrEnv.xml
100644 → 100755
Empty file.
14 changes: 14 additions & 0 deletions edge/apiproxy/policies/Raise-FaultForNonGETRequest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RaiseFault async="false" continueOnError="false" enabled="true" name="Raise-FaultForNonGETRequest">
<DisplayName>RaiseFaultForNonGETRequest</DisplayName>
<Properties/>
<FaultResponse>
<Set>
<Headers/>
<Payload contentType="text/plain"/>
<StatusCode>405</StatusCode>
<ReasonPhrase>support only GET requests</ReasonPhrase>
</Set>
</FaultResponse>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>
12 changes: 12 additions & 0 deletions edge/apiproxy/policies/RemoveAuthorizationHeader.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="RemoveAuthorizationHeader">
<DisplayName>RemoveAuthorizationHeader</DisplayName>
<Properties/>
<Remove>
<Headers>
<Header name="Authorization"/>
</Headers>
</Remove>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>
13 changes: 13 additions & 0 deletions edge/apiproxy/policies/Return200.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RaiseFault async="false" continueOnError="false" enabled="true" name="Return200">
<DisplayName>Return200</DisplayName>
<Properties/>
<FaultResponse>
<Set>
<Headers/>
<Payload contentType="text/plain"/>
<StatusCode>200</StatusCode>
</Set>
</FaultResponse>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>
Empty file modified edge/apiproxy/policies/Return401.xml
100644 → 100755
Empty file.
Empty file modified edge/apiproxy/policies/Return404.xml
100644 → 100755
Empty file.
Empty file modified edge/apiproxy/policies/ReturnVersion.xml
100644 → 100755
Empty file.
Empty file modified edge/apiproxy/policies/SetQuotaResponse.xml
100644 → 100755
Empty file.
215 changes: 113 additions & 102 deletions edge/apiproxy/proxies/default.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,105 +1,116 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ProxyEndpoint name="default">
<Description/>
<PreFlow name="PreFlow">
<Request>
<Step>
<Name>Authenticate</Name>
</Step>
</Request>
<Response/>
</PreFlow>
<Flows>
<Flow name="Version">
<Response>
<Step>
<Name>ReturnVersion</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "**/v2/version") and (request.verb = "GET")</Condition>
<Request/>
</Flow>
<Flow name="NoOrgOrEnv">
<Response>
<Step>
<Name>NoOrgOrEnv</Name>
</Step>
</Response>
<Condition>(apigee.edgemicro.organization = null or apigee.edgemicro.environment = null)</Condition>
</Flow>
<Flow name="DistributedQuota">
<Request>
<Step>
<Name>JSSetupVariables</Name>
</Step>
<Step>
<Name>DistributedQuota</Name>
</Step>
</Request>
<Response>
<Step>
<Name>SetQuotaResponse</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/quotas**") and (request.verb = "POST")</Condition>
</Flow>
<Flow name="Callout">
<Description/>
<Request/>
<Response>
<Step>
<Name>Callout</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/credential/**")</Condition>
</Flow>
<Flow name="Bootstrap">
<Response>
<Step>
<Name>Callout</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/bootstrap/**" and apigee.edgemicro.authenicate = "true" and (request.verb = "GET"))</Condition>
</Flow>
<Flow name="Region">
<Response>
<Step>
<Name>Callout</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/region/**" and apigee.edgemicro.authenicate = "true" and (request.verb = "GET"))</Condition>
</Flow>
<Flow name="AXPublisher">
<Response>
<Step>
<Name>Callout</Name>
</Step>
</Response>
<Condition>( proxy.pathsuffix MatchesPath "/axpublisher/**" and (request.verb = "POST")</Condition>
</Flow>
<Flow name="NoAuthFlow">
<Request>
<Step>
<Name>Return401</Name>
</Step>
</Request>
<Condition>apigee.edgemicro.authenicate = "false"</Condition>
</Flow>
<Flow name="NotFound">
<Response>
<Step>
<Name>Return404</Name>
</Step>
</Response>
</Flow>
</Flows>
<PostFlow name="PostFlow">
<Request/>
<Response/>
</PostFlow>
<HTTPProxyConnection>
<BasePath>/edgemicro</BasePath>
<VirtualHost>default</VirtualHost>
</HTTPProxyConnection>
<RouteRule name="noroute"/>
<Description/>
<PreFlow name="PreFlow">
<Request>
<Step>
<Name>Authenticate</Name>
</Step>
</Request>
<Response/>
</PreFlow>
<Flows>
<Flow name="Version">
<Response>
<Step>
<Name>ReturnVersion</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "**/v2/version") and (request.verb = "GET")</Condition>
<Request/>
</Flow>
<Flow name="NoOrgOrEnv">
<Response>
<Step>
<Name>NoOrgOrEnv</Name>
</Step>
</Response>
<Condition>(apigee.edgemicro.organization = null or apigee.edgemicro.environment = null)</Condition>
</Flow>
<Flow name="DistributedQuota">
<Request>
<Step>
<Name>JSSetupVariables</Name>
</Step>
<Step>
<Name>DistributedQuota</Name>
</Step>
</Request>
<Response>
<Step>
<Name>SetQuotaResponse</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/quotas**") and (request.verb = "POST")</Condition>
</Flow>
<Flow name="ValidateAuthFlow">
<Response>
<Step>
<Name>Return200</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/authenticate/**" and apigee.edgemicro.authenicate = "true" and (request.verb = "GET"))</Condition>
</Flow>
<Flow name="Callout">
<Description/>
<Request/>
<Response>
<Step>
<Name>Callout</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/credential/**")</Condition>
</Flow>
<Flow name="Bootstrap">
<Response>
<Step>
<Name>Callout</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/bootstrap/**" and apigee.edgemicro.authenicate = "true" and (request.verb = "GET"))</Condition>
</Flow>
<Flow name="Region">
<Response>
<Step>
<Name>Callout</Name>
</Step>
</Response>
<Condition>(proxy.pathsuffix MatchesPath "/region/**" and apigee.edgemicro.authenicate = "true" and (request.verb = "GET"))</Condition>
</Flow>
<Flow name="AXPublisher">
<Response>
<Step>
<Name>Callout</Name>
</Step>
</Response>
<Condition>( proxy.pathsuffix MatchesPath "/axpublisher/**" and (request.verb = "POST")</Condition>
</Flow>
<Flow name="NoAuthFlow">
<Request>
<Step>
<Name>Return401</Name>
</Step>
</Request>
<Condition>apigee.edgemicro.authenicate = "false"</Condition>
</Flow>
<Flow name="NotFound">
<Response>
<Step>
<Name>Return404</Name>
</Step>
</Response>
</Flow>
</Flows>
<PostFlow name="PostFlow">
<Request/>
<Response/>
</PostFlow>
<RouteRule name="uapcollector">
<Condition>proxy.pathsuffix MatchesPath "/analytics/**"</Condition>
</RouteRule>
<HTTPProxyConnection>
<BasePath>/edgemicro</BasePath>
<VirtualHost>default</VirtualHost>
</HTTPProxyConnection>
<RouteRule name="noroute"/>
</ProxyEndpoint>
Binary file modified edge/apiproxy/resources/java/edge-micro-javacallout-1.0.0.jar
100644 → 100755
Binary file not shown.
Empty file modified edge/apiproxy/resources/jsc/JSSetupVariables.js
100644 → 100755
Empty file.

0 comments on commit 9947187

Please sign in to comment.