dlr-eoc / prosEO

prosEO – A Processing System for Earth Observation Data
GNU General Public License v3.0
14 stars 1 forks source link

User Manager, Ingestor and PRIP API: Add download quota management #157

Open tangobravo62 opened 3 years ago

tangobravo62 commented 3 years ago

With data model v1.4 quota fields have been added to the User entity.

The User Manager and the Ingestor shall be enhanced so that with every download token request to the Ingestor the size of the requested file is added to the used quota. If the allowed quota would be exceeded by this request, return HTTP status 429 "Too Many Requests" as per PRIP ICD v1.8 sec. 3.3.2. This status value shall be propagated by the PRIP API to the original requester. If the last recorded access in the User record is from a different calendar month, reset the used quota before adding the data volume requested.

tangobravo62 commented 2 years ago

Intermediate implementation to prevent huge return sets (limit on number of products returned in a single request; commit 17e9da2).

Final implementation based on actual download volume still TODO.