According to the Firebase documentation about onCall 'callable' functions :
The functions.https.onCall trigger automatically deserializes the request body and validates auth tokens.
Also, according to the Firebase callable Functions protocol specification:
If the auth token supplied in the request is invalid, the request is rejected with 401 Unauthorized, with an error code of UNAUTHENTICATED.
However, I experimented that it's possible to call a function with invalid Authorization header like Authorization: fooBar or worst, without providing it:
curl -X POST --location https://my-test-app.cloudfunctions.net/hello -d "{data:{})"
The function responds "Hello world!" as expected (http 200 'ok').
Of course, context.auth is undefined in that case, but still, it's considered as valid.
This is very misleading and dangerous as developers can think their functions are protected by default, but they aren't : anyone can call it publicly.
I know about the default "AllUser" access credential on the firebase deployed function, nevertheless the documentation is confusing.
Did I missed anything to enable or configure to activate a concrete out-of-the-box token validation?