• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TykTechnologies / tyk / 5512

Build:
DEFAULT BRANCH: master
Ran 09 Sep 2018 09:34AM UTC
Jobs 2
Files 99
Run time 16s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5512

push

travis-ci

buger
per API partitions option added (#1883)

Added changes for https://github.com/TykTechnologies/tyk/issues/1783

While looking at this feature I tried to follow ideas:
- legacy should continue working without any tricks
- we should be able to use the same concept of partitioned policies but with one more edge case when we can specify quota and rate limit in more than one partitioned policy if they have different APIs in ACL
- we should be able specify quota and rate limit on API level (ACL item) explicitly when we create policy 

The idea is to introduce new option "Per API" in partitions section when we create policy. If this option is unchecked - everything should work as before.

Also, there is one condition - that new option "Per API" comes to play only when another partition option "Enforce access control" (aka ACL) is checked as this is what tells our logic to merge access rights from different policies into one array in key session when several (partitioned) policies attached to key. Imho it is weird, maybe can be fixed on UI level.

Also, I've introduced quota and rate limit on API level (field `limit`) in `AccessDefinition` because:
- we need to be able to specify quota and rate limit per ACL item when we create policy
- we need to store quota and rate limit per ACL policy even if it was not specified per ACL item but just on policy level - so all ACL items kind of inherit quota and rate from policy and overwrite it if it was specified explicitly while policy was created
- when quota and rate on ACL item level inherited from policy `AccessDefinition.Limit` gets new field `SetByPolicy` to true - for informative/debug purposes so we know from where that limit on API level has come from

If we have limits on API level we add API ID to storage keys (leaky bucket and other rate limits keys or keys to store quota for key or org session).

If we don't have limit specified on API level quota and rate limit should work as they were wor... (continued)

9595 of 15895 relevant lines covered (60.36%)

1.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5512.1 (LATEST_GO=true) 09 Sep 2018 09:34AM UTC 0
59.76
Travis Job 5512.1
2 5512.2 (LATEST_GO=true) 09 Sep 2018 09:34AM UTC 0
60.38
Travis Job 5512.2
Source Files on build 5512
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5512
  • 31f70e48 on github
  • Prev Build on master (#5496)
  • Next Build on master (#5521)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc