raintank / worldping-api

Worldping Backend Service
Other
25 stars 18 forks source link

Fix quota enforcement in old api version #98

Closed woodsaj closed 3 years ago

woodsaj commented 3 years ago

Quota checking was happening when endpoints and probes where updated instead of being checked before creating them. This has allowed free customers to basically have unlimited usage of worldping.

woodsaj commented 3 years ago

Closing this. Unit tests are correctly failing as this change actually breaks quota enforcement. After further review, quota enforcement is correctly working. The issues observed that triggered this investigation have been tracked back to a user who created endpoints when they had a high quota limit, then their limit was reduced. The user has not created any new endpoints since their quota was reduced.