News for hackers. Stuff that matters.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by singpolyma3 on Thursday April 16, 2026 @08:42AM (#47792160)
Um. What? In what world are API keys not secrets?
Re:€54k spike in 13h from unrestricted Firebase browser key ... by boredpudding on Thursday April 16, 2026 @08:47AM (#47792225)
Google API keys have been used for ages on the frontend. For example on Google Maps embeds. Those are not possible without exposing a key to the frontend. They weren't secret, until Gemini arrived.

https://trufflesecurity.com/blog/google-api-keys-werent-secr...

https://medium.com/@ahhyesic/your-google-maps-api-key-now-ha...

https://www.malwarebytes.com/blog/news/2026/02/public-google...

Re:€54k spike in 13h from unrestricted Firebase browser key ... by someothherguyy on Thursday April 16, 2026 @09:16AM (#47792521)
If one ignores 70% of the documentation, it makes for a demonizing blog post about it, sure.

" API keys for Firebase services are not secret

API keys for Firebase services only identify your Firebase project and app to those services. Authorization is handled through Google Cloud IAM permissions, Firebase Security Rules, and Firebase App Check.

All Firebase-provisioned API keys are automatically restricted to Firebase-related APIs. If your app's setup follows the guidelines in this page, then API keys restricted to Firebase services do not need to be treated as secrets, and it's safe to include them in your code or configuration files. Set up API key restrictions

If you use API keys for other Google services, make sure that you apply API key restrictions to scope your API keys to your app clients and the APIs you use.

Use your Firebase-provisioned API keys only for Firebase-related APIs. If your app uses any other APIs (for example, the Places API for Maps or the Gemini Developer API), use a separate API key and restrict it to the applicable API."

https://firebase.google.com/support/guides/security-checklis...

Re:€54k spike in 13h from unrestricted Firebase browser key ... by three14 on Thursday April 16, 2026 @09:39AM (#47792792)
The only reasonable design is to have two kinds of API keys that cannot be used interchangeably: public API keys, that cannot be configured to use private APIs, and private API keys, that cannot be configured to use public APIs. There's no one who must use a single API key for both purposes, and almost all cases in which someone does configure an API key like that will be a mistake. It would be even better if the API keys started with a different prefix or had some other easy way to distinguish between the two types so that I can stop getting warnings about my Firebase keys being "public".
Re:€54k spike in 13h from unrestricted Firebase browser key ... by SAI_Peregrinus on Thursday April 16, 2026 @03:49PM (#47798580)
It'd be much better to call them something like "API usernames" or "API Client IDs". Though I also dislike the naming of "public keys" in asymmetric cryptography, for the same reasons, and I'm definitely not winning that fight!
Re:€54k spike in 13h from unrestricted Firebase browser key ... by c0smic on Wednesday April 22, 2026 @09:00PM (#47871177)
They've updated that documentation significantly since thousands of projects were issued automatically generated Firebase API keys, pre-Gemini. See this version from Oct 2022: https://web.archive.org/web/20221001052713/https://firebase....

Back then, they did not automatically restrict those keys to only Firebase-related APIs.

So yes, if you read the documentation as it exists today it's much more clear what they're trying to prevent, but this is only after this issue has become more apparent.

Re:€54k spike in 13h from unrestricted Firebase browser key ... by someothherguyy on Friday April 24, 2026 @01:09PM (#47893039)
> Back then, they did not automatically restrict those keys to only Firebase-related APIs.

If that is the case, why is this also in the 2022 link?

The part about scoping links to the restrictions documentation.

"Understand API keys

API keys for Firebase services are not secret

Firebase uses API keys only to identify your app's Firebase project to Firebase services, and not to control access to database or Cloud Storage data, which is done using Firebase Security Rules. For this reason, you do not need to treat API keys for Firebase services as secrets, and you can safely embed them in client code. Learn more about API keys for Firebase.

Set up API key scoping

As an additional deterrent against an attacker attempting to use your API key to spoof requests, you can create API keys scoped to your app clients.

Keep FCM server keys secret

Unlike API keys for Firebase services, FCM server keys (used by the legacy FCM HTTP API) are sensitive and must be kept secret.

Keep service account keys secret

Also unlike API keys for Firebase services, service account private keys (used by the Admin SDK) are sensitive and must be kept secret. "

Re:€54k spike in 13h from unrestricted Firebase browser key ... by darrenf on Thursday April 16, 2026 @08:46AM (#47792205)
In Firebase world API keys are for identification, not authorisation.

https://firebase.google.com/docs/projects/api-keys

Public by design: API keys for Firebase services only identify your Firebase project and app to those services. Authorization is handled through Google Cloud IAM permissions, Firebase Security Rules, and Firebase App Check.

Re:€54k spike in 13h from unrestricted Firebase browser key ... by fg137 on Thursday April 16, 2026 @08:50AM (#47792253)
Google's world. They explicitly tell you that API keys are not secrets.

https://trufflesecurity.com/blog/google-api-keys-werent-secr...

Re:€54k spike in 13h from unrestricted Firebase browser key ... by lxgr on Thursday April 16, 2026 @09:22AM (#47792595)
API keys for Firebase. While Google really messed up here, I doubt they ever published anything claiming that no Google API keys at all are secrets.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by pwdisswordfishs on Thursday April 16, 2026 @09:36AM (#47792765)
Google Maps is not Firebase.

And "Firebase AI Logic" sure sounds like something easy to confuse with a Firebase service...

Re:€54k spike in 13h from unrestricted Firebase browser key ... by lxgr on Thursday April 16, 2026 @09:48AM (#47792903)
The same principle applies, though.

I'm absolutely not defending Google here, to be clear: Retroactively expanding the scope of an API "key" explicitly designated as "public/non-sensitive" is very bad.

But the concept itself does make some sense, and I'm just noting that there's precedent both across Google and other companies.

Re:€54k spike in 13h from unrestricted Firebase browser key ... by pwdisswordfishs on Thursday April 16, 2026 @09:52AM (#47792975)
> The same principle applies, though.

How?

"Firebase AI Logic"

Is this a Firebase service or not?

Re:€54k spike in 13h from unrestricted Firebase browser key ... by embedding-shape on Thursday April 16, 2026 @08:45AM (#47792189)
In the frontend world where you have client-side API keys talking directly to 3rd party services from the client. Think things like Google Maps and similar.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by londons_explore on Thursday April 16, 2026 @09:02AM (#47792375)
Which is a stupid idea for something where there is billing involved... Anyone on the internet can take that key and scrape the Google maps API (faking the referer header) and cost you $$$$$.

Google should have simply done with by origin URL if they wanted stuff to be open like that.

Re:€54k spike in 13h from unrestricted Firebase browser key ... by someothherguyy on Thursday April 16, 2026 @09:22AM (#47792596)
Once upon a time Google maps loads were nearly free, and there was no way to restrict that key.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by lxgr on Thursday April 16, 2026 @09:21AM (#47792580)
Public API keys are a thing. Arguably they are poorly named (it's really more of a client identifier), and modeling them as primarily a key instead of primarily as a non-secret identifier can go very wrong, as evidenced here.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by il-b on Thursday April 16, 2026 @11:27AM (#47794664)
Yeah, just like “public key” in the cryptography sense
Re:€54k spike in 13h from unrestricted Firebase browser key ... by lxgr on Thursday April 16, 2026 @03:46PM (#47798528)
They’re not really cryptographic keys in that sense usually; I’d say “bearer token” is more accurate.