[BUG] Shared quota in Product operations

I have a product with the following Operations:

Proxy  Path              Method(s)           Quota    Custom attributes

X/v*
GET
 
message-weight: 1. and message-weight-type: fixed.
 
X/v*/*/*/
GET and POST
 
message-weight-type: fixed. and message-weight: 1.
 
X/v*/*/*/sync/*
GET
 
message-weight: 1. and message-weight-type: fixed.
 
X/v*/*/*/block/*
GET
 
message-weight-type: bytes.
 
X2/x/y
POST
 
message-weight-type: custom.
 
X3/es/**
ALL
 
message-weight-type: custom.

This product has access to 3 proxies with specified paths.

All 3 proxies have a shared flow for Auth/Rate/Quota enforcement and the quota policy in that is as follows:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="enforce-quota">
    <DisplayName>Enforce Quota</DisplayName>
    <!--<UseQuotaConfigInAPIProduct stepName="verify-api-key"/>-->
    <Allow countRef="verifyapikey.verify-api-key.apiproduct.developer.quota.limit"/>
    <Interval ref="verifyapikey.verify-api-key.apiproduct.developer.quota.interval">1</Interval>
    <TimeUnit ref="verifyapikey.verify-api-key.apiproduct.developer.quota.timeunit">month</TimeUnit>
    <Identifier ref="verifyapikey.verify-api-key.developer.app.name"/>
    <Distributed>true</Distributed>
    <Synchronous>true</Synchronous>
    <MessageWeight ref="message-weight"/>
    <!--<EnforceOnly>true</EnforceOnly>-->
    <!--<SharedName>common-quota</SharedName>-->
</Quota>

 

With identifier being set to the developers app I would have expected quota to tallied amongst all paths. From reading the docs i've noticed quota is tied to a proxy which would cause some counting issues here. But if i removed the other two proxies and only make requests to one proxy target, it appears that it counts unique quota per operation despite no quota being set per operation. This behaviours isnt present if I have only one operation to a proxy with / being the path, but then I cant restrict access to specific resources in a product.

I basically want to allow X amount of quota across a product offering and that product can control access to specific resources based on tiers e.g (free, premium etc...)

Is this possible at all or is this a bug?

0 0 44
0 REPLIES 0