This PR is the first step in implementing data consumption quotas for SAS API Token Issuance. I created a new Azure Function App which runs periodically to execute a KQL query against Storage Account Blob Logs to aggregate the bytes read per IP address over a window of time (e.g., 24 hours). IPs which have read above a certain threshold will be added to an Azure storage table called blob storage banned ip which serves as a temporary ban list.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
Unit test uses mocked response from log query client and writes test data to azurite. The integration/E2E test queries the log analytics workspace and writes to test table in storage account and deletes it after testing is complete.
Make sure correct roles have been assigned, run ./scripts/server to start azurite service and scripts/test --funcs [--no-integration] to run unit tests. and integration tests (optionally).
Description
This PR is the first step in implementing data consumption quotas for SAS API Token Issuance. I created a new Azure Function App which runs periodically to execute a KQL query against Storage Account Blob Logs to aggregate the bytes read per IP address over a window of time (e.g., 24 hours). IPs which have read above a certain threshold will be added to an Azure storage table called
blob storage banned ip
which serves as a temporary ban list.Please refer to the design doc for more details.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Unit test uses mocked response from log query client and writes test data to azurite. The integration/E2E test queries the log analytics workspace and writes to test table in storage account and deletes it after testing is complete.
Make sure correct roles have been assigned, run
./scripts/server
to start azurite service andscripts/test --funcs [--no-integration]
to run unit tests. and integration tests (optionally).Checklist:
Please delete options that are not relevant.