Hey community,
All instructions worked without any issues or errors, but my function is still callable publicly.
Here is my yaml file as instructed:
swagger: '2.0'
info:
title: ***
description: Sample API on Cloud Endpoints with a Google Cloud Functions backend
version: 1.0.0
host: ***
schemes:
- https
produces:
- application/json
x-google-backend:
path_translation: APPEND_PATH_TO_ADDRESS
protocol: h2
paths:
/hello:
get:
summary: Greet a user
operationId: hello
responses:
'200':
description: A successful response
schema:
type: string
securityDefinitions:
firebase:
authorizationUrl: ""
flow: "implicit"
type: "oauth2"
x-google-audiences: "***"
security:
- firebase: []
What i am expecting to happen:
My function hello can only be invoked through the endpoints proxy when i provide a valid jwt token in the requests "Authorization" header.
What is happening:
My Function can still be called publicly without any token sent.
I simply want to restrict the invocation of this function to a valid jtw token from firebase auth.
The how-to-guide on gcp is not working for me unfortunately :(
Any suggestions?
Thanks a lot