<blockquote>
<p>Would it make sense for API keys to expire if not renewed regularly?</p>
</blockquote>
<p>Most definitely yes.</p>
<p>As it stands, allowing API keys to be embedded in an Overpass query (e.g.<br>
<code>[api_key:"e10359b7d832e21c04c3aa17cbab45c37d7d6244"];</code>) is asking for trouble. An unsuspecting user may hit the "Share" button in overpass turbo, at which time that key can be trivially harvested by any third party.</p>
<p>overpass turbo's share links were never designed to store any kind of secret information. What's worse, once the API key has leaked this way, the unsuspecting user still has absolutely no idea that someone else might abuse their API key (!).</p>
<p>I find it really hard to imagine that all users manage to keep their API key secret, and know when to create a new API key which would then invalidate their old API key.</p>
<p>Time limiting any kind of token would be one essential step to limit the effects of a leaked token.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2145#issuecomment-464365988">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLU9op-TYOBrAN3IAZPl03n1WiAocks5vOEI6gaJpZM4a8_uM">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLfz5gSAyQnx7vVCH5j0Cq_uCCq7gks5vOEI6gaJpZM4a8_uM.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@mmd-osm in #2145: \u003e Would it make sense for API keys to expire if not renewed regularly?\r\n\r\nMost definitely yes.\r\n\r\nAs it stands, allowing API keys to be embedded in an Overpass query (e.g. \r\n`[api_key:\"e10359b7d832e21c04c3aa17cbab45c37d7d6244\"];`) is asking for trouble. An unsuspecting user may hit the \"Share\" button in overpass turbo, at which time that key can be trivially harvested by any third party.\r\n\r\noverpass turbo's share links were never designed to store any kind of secret information. What's worse, once the API key has leaked this way, the unsuspecting user still has absolutely no idea that someone else might abuse their API key (!).\r\n\r\nI find it really hard to imagine that all users manage to keep their API key secret, and know when to create a new API key which would then invalidate their old API key.\r\n\r\nTime limiting any kind of token would be one essential step to limit the effects of a leaked token.\r\n\r\n \r\n\r\n"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/2145#issuecomment-464365988"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2145#issuecomment-464365988",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2145#issuecomment-464365988",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>