-
Notifications
You must be signed in to change notification settings - Fork 210
fireabase enforceAppCheck doesn't work #1377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Thanks for the issue report @bolds07. Do you mind sharing version of the |
Hey @bolds07. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @bolds07 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
Hello @taeold, I am not able to fully replicate this but wanted to make some notes about my observations and make a feature request. I have been able to verify that the Additionally, I believe that the Thank you! |
I have the same issue with onRequest. By putting "enforceAppCheck: true", the function is still accessible via Postman without any token |
I am having the same issue. |
Until this is fix, i am using this function on Typescript
|
@jjoffrey This does not secure against malicious behavior intended to make you incur a high bill by polling your endpoint though, if I'm not mistaken? |
That is correct, however I believe that is still the case for onCall
functions with native enforceAppCheck support. I believe that you would
need to use something like Cloudflare or a Google Cloud Load Balancer +
Cloud Armor to fully prevent a denial-of-wallet attack.
…On Thu, Oct 12, 2023 at 11:39 PM cloudatlas9 ***@***.***> wrote:
@jjoffrey <https://github.com/jjoffrey> This does not secure against
malicious behavior intended to make you incur a high bill by polling your
endpoint though, if I'm not mistaken?
—
Reply to this email directly, view it on GitHub
<#1377 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3TIK5P3QCMR5R52EJBMOTLX7DOZJAVCNFSM6AAAAAAW564RH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRQHE4DGOBYGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@jjoffrey Based on what I remember from looking into it a year ago, I was of the opinion it would not count as a billed invocation (since the AppCheck token is evaluated in the middleware, before executing the actual Cloud Function logic). But now I tried for 45 minutes to find information confirming this, unsuccessfully. So perhaps you're right. Don't know if anyone can confirm for sure whether a rejected onCall request using the |
I'm using firebase functions to build my system, I want to add extra layers of security to avoid brute force attacks and others and the app check mechanism looked like a nice solution
BUT IT DOESN'T WORK
i did everything writter in here:
https://firebase.google.com/docs/app-check/cloud-functions
https://firebase.google.com/docs/app-check/web/recaptcha-enterprise-provider
my function looks like:
exports.test= functions.runWith({ timeoutSeconds: 30, memory: '128MB', enforceAppCheck: true }).https.onCall(async (data, context) => { console.log(JSON.stringif(data)); console.log(JSON.stringif(context)); });
but yet it doesn't work
i can open postman or any other rest request maker put the function url and just post anything like
{
"data" : { "foo" : {}, "bar" : "bar"}
}
no headers, just a post as this with the right url and the request goes through...
wasn't enforceAppCheck: true supposed to ban the random requests like this? if i look the function logs i even get a log like this:
{
insertId: "6438df00000d1c3cc2e2d44e"
jsonPayload: {
message: "Callable request verification passed"
verifications: {
app: "MISSING"
auth: "MISSING"
}
}
labels: {3}
logName: "projects/qe/logs/cloudfunctions.googleapis.com%2Fcloud-functions"
receiveTimestamp: "2023-04-14T05:05:04.982509106Z"
resource: {2}
severity: "INFO"
timestamp: "2023-04-14T05:05:04.859196Z"
}
"Callable request verification passed"
what verification? it was literally a random request
after this log line i get 2 more lines printing the stuff i put in the function the context shows that context.app == null and context.auth == null
doesn't this app verification works for nothing? is firebase letting people randomly brute-force our functions?
The text was updated successfully, but these errors were encountered: