Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Function Firewall

I'm building a very lightweight API using Azure Functions, one thing I'm concerned about is abuse of the functions. What's to stop someone hammering a single method and causing my costs to escalate? Are there any ways I can blacklist IP address' if they start acting suspicious?

I have a last resort of looking up the IP in Table Storage, but I'd ideally like to block the IP before it even makes it to the function, is this possible? (Programatically)

Nick.

like image 985
Nick Avatar asked Feb 05 '23 12:02

Nick


1 Answers

In the Consumption plan, you're only billed for the time your function code actually runs. For HTTP triggered functions (or WebHooks) that won't include any time taken to receive or authorize a request and dispatch it to your code.

Assuming your function is secured (i.e. authLevel is not anonymous) only authorized requests can invoke it, so unauthorized requests won't incur you any executions.

like image 56
mathewc Avatar answered Feb 17 '23 05:02

mathewc