Resource Path "/" subpaths proxies not working

Hi,

I have created a proxy with base path: <BasePath>/api/v1/comms/partners</BasePath>
And in the product i have defined the resource path to be "/". so that all sub paths are supported.
Now, my problem is that i have 4 requests for this proxy
1) GET with path: /api/v1/comms/partners, It has VerifyAccessToken and a AssignMessagePoilcy, and all works fine
2) POST with path: /api/v1/comms/partners, It has VerifyAccessToken and a AssignMessagePoilcy, and all works fine
3) DELETE with path: /api/v1/comms/partners, It has VerifyAccessToken and a AssignMessagePoilcy, and all works fine
4) PUT: with path: /api/v1/comms/partners/{partnerId}/providers/{providerid}, It has VerifyAccessToken and a AssignMessagePoilcy too, but it never calls these policies. The request is passing successfully without even checking the access token and assign message policy. The call is passed even if i do not send the access token at all.
Below is how i have set them up:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ProxyEndpoint name="default">
<Description/>
<FaultRules/>
<PreFlow name="PreFlow">
<Request/>
<Response/>
</PreFlow>
<PostFlow name="PostFlow">
<Request/>
<Response/>
</PostFlow>
<Flows>
<Flow name="OptionsPreFlight">
<Request/>
<Response/>
<Condition>request.verb == "OPTIONS"</Condition>
</Flow>
<Flow name="VerifyAccessToken">
<Description/>
<Request>
<Step>
<FaultRules/>
<Name>verify-oauth-v2-access-token</Name>
</Step>
<Step>
<FaultRules/>
<Name>Assign-Message-UserInfo</Name>
</Step>
<Step>
<FaultRules/>
<Name>remove-header-authorization</Name>
</Step>
</Request>
<Response/>
<Condition>(proxy.pathsuffix MatchesPath "/") and (request.verb = "GET")</Condition>
</Flow>
<Flow name="Put">
<Description>Get PUT calls</Description>
<Request>
<Step>
<Name>verify-oauth-v2-access-token</Name>
</Step>
<Step>
<Name>Assign-Message-UserInfo</Name>
</Step>
<Step>
<Name>remove-header-authorization</Name>
</Step>
</Request>
<Response/>
<Condition>(proxy.pathsuffix MatchesPath "/") and (request.verb = "PUT")</Condition>
</Flow>
<Flow name="Post">
<Description>Get POST calls</Description>
<Request>
<Step>
<Name>verify-oauth-v2-access-token</Name>
</Step>
<Step>
<Name>remove-header-authorization</Name>
</Step>
<Step>
<Name>Assign-Message-UserInfo</Name>
</Step>
</Request>
<Response/>
<Condition>(proxy.pathsuffix MatchesPath "/") and (request.verb = "POST")</Condition>
</Flow>
<Flow name="Delete">
<Description>Get DELETE calls</Description>
<Request>
<Step>
<Name>verify-oauth-v2-access-token</Name>
</Step>
<Step>
<Name>Assign-Message-UserInfo</Name>
</Step>
<Step>
<Name>remove-header-authorization</Name>
</Step>
</Request>
<Response/>
<Condition>(proxy.pathsuffix MatchesPath "/") and (request.verb = "DELETE")</Condition>
</Flow>
</Flows>
<HTTPProxyConnection>
<BasePath>/api/v1/comms/partners</BasePath>
<Properties/>
<VirtualHost>default</VirtualHost>
<VirtualHost>secure</VirtualHost>
</HTTPProxyConnection>
<RouteRule name="default">
<TargetEndpoint>default</TargetEndpoint>
</RouteRule>
</ProxyEndpoint>



What is it that I am missing for the PUT request to check the policies attached?

Thanks,

Kumud

0 2 207
2 REPLIES 2

Not applicable

@Kumud Gautam

Try with the below changes as mention

<Condition>(proxy.pathsuffix MatchesPath "/*") and (request.verb = "PUT")</Condition>

Adding "/*" in condition does not work. It fails the base API itself.