I am currently running a Flask web application (Dash to be more precise) on Google App Engine (Standard Environment) as a service. For the moment I have a custom login/logout page and I am handling user sessions with Flask-Login. I am using Flask-Login to serve content based on the currently authenticated user as well as maintaining the current user's session active.
My App Engine service is configured to automatically scale up and down based on traffic and I would like to avoid instances being undesirably created (for instances by DDOS attacks). I already know that:
App Engine sits behind the Google Front End which mitigates and absorbs many Layer 4 and below attacks, [...]
as per an official documentation from Google: link. Moreover, I am aware, again citing the same documentation, that:
Currently, [Google Compute Engine API] projects are limited to an API rate limit of 20 requests/second.
which can mitigate to some extent a DDOS attack (App Engine actually uses Google Compute Engine unless I am mistaken).
I am looking for a solution that would involve a third-party (or Google) application that would act as a middleman between the user and the application. It would basically handle the sign-in part and redirect the user to my web application in case of successful login while protecting my website from being accessed by mistake (e.g. crawlers) and thus avoiding my instances from being created.
Does such an application exist? I am looking into SSO providers that support a login/logout protocol such as SAML or OpenID Connect (Firebase is a good candidate for instance) but I am unsure if this solution would avoid my instances from being created undesirably. Finally, I also do not want to have to whitelist users based on their IP address.