I am deploying a 2nd generation cloud function in python of type https or rest, I need the authentication to be mandatory, ie it is not public and can only be invoked by service accounts. as I managed it from console or by continuous integration pipeline.
Have you tried the Cloud Functions Invoker IAM role, which allows a particular service account to invoke the Cloud functions? Make sure your cloud functions require an authentication setting enabled.
Thanks
Vinoth_GCP.