WPIntell

Source evidence

Google API keys public visible in source code

Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps) · support · 2023-03-21T00:35:00+00:00

complaintsentiment
mediumseverity
0.87relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 34 rows with source links

14.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
johannes68 unresolved
I got a warning from Google stuff, about my Google API key public visible on website. On further investigation, I found it really published in site source code by leaflet mapsmarker plugin. This is an absolute no-go, the API key should never ever be public visible in the site sourcecode through any plugin. Hi Johannes, thank you for expressing your concerns about the Google API key being publicly visible on your website. For any plugin, including ours, to utilize the Google Maps JavaScript API as per Google’s documentation, the API key must be loaded in the source code on the page where the map is displayed. I would like to clarify that the Leaflet Maps Marker plugin is a third-party plugin for WordPress, and it is not directly related to the Google Maps JavaScript API. However, I will provide you with some guidance on how to mitigate this issue. To help protect your Google API key, please follow the steps below: Regenerate your API key: To ensure that your current API key remains secure, please go to the Google Cloud Console ( https://console.cloud.google.com/ ), navigate to the “Credentials” section under the “APIs & Services” menu, and regenerate your API key. Restrict your API key: In the Google Cloud Console, you can set restrictions on your API key to limit its usage to specific IP addresses, referrers, or apps. This will help prevent unauthorized access to your API key. To learn more about how to restrict your API key, please follow this guide: https://www.mapsmarker.com/kb/user-guide/google-maps-javascript-api (section “Optional steps (recommended)”. If you have any questions or need further assistance, please don’t hesitate to ask. Best regards, Robert

Comments

1 shown
Robert Seyfriedsberger 2023-03-24T16:32:00+00:00

Hi Johannes, thank you for expressing your concerns about the Google API key being publicly visible on your website. For any plugin, including ours, to utilize the Google Maps JavaScript API as per Google’s documentation, the API key must be loaded in the source code on the page where the map is displayed. I would like to clarify that the Leaflet Maps Marker plugin is a third-party plugin for WordPress, and it is not directly related to the Google Maps JavaScript API. However, I will provide you with some guidance on how to mitigate this issue. To help protect your Google API key, please follow the steps below: Regenerate your API key: To ensure that your current API key remains secure, please go to the Google Cloud Console ( https://console.cloud.google.com/ ), navigate to the “Credentials” section under the “APIs & Services” menu, and regenerate your API key. Restrict your API key: In the Google Cloud Console, you can set restrictions on your API key to limit its usage to specific IP addresses, referrers, or apps. This will help prevent unauthorized access to your API key. To learn more about how to restrict your API key, please follow this guide: https://www.mapsmarker.com/kb/user-guide/google-maps-javascript-api (section “Optional steps (recommended)”. If you have any questions or need further assistance, please don’t hesitate to ask. Best regards, Robert