Skip Navigation

[Resolved] Warning from Google: publicly accessible Google API key

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 2 replies, has 2 voices.

Last updated by simonC-7 1 year, 6 months ago.

Author
Posts
#2567471

Tell us what you are trying to do?

I received the following warning from Google, and wonder if it is right that Toolset show the Google API Key publicly?:

~~~
We have detected a publicly accessible Google API key associated with the following Google Cloud Platform project:

Project Amii Expert Listing (id: amii-expert-listing) with API key AIzaSyCs03jjjsH2TxvU5uqwakmYP13Aoui4D2Y

The key was found at the following URL: hidden link

We believe that you or your organization may have inadvertently published the affected API key in public sources or on public websites (for example, credentials mistakenly uploaded to a service such as GitHub.)

Please note that as the project/account owner, you are responsible for securing your keys.
~~~

That page does indeed show the Google API Key in the code. Is that correct. Should Toolset be showing that publicly?

What is the link to your site?
hidden link

#2567489

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

That's perhaps a slightly confusing message from Google, inasmuch as the requests to its API from browsers *must* include the API key, and that key is visible to anyone that knows where to look for it.

You can secure such public keys within the Google API settings by adding a domain restriction, so that the API key only "works" when the request comes from amii.org.uk, making it useless to anyone else. That has always been best practice, but it seems like Google are sending warnings about this now.

#2567491

Thanks Nigel, that answers my question. I have restricted the API Key to just the production and staging sites.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.