Skip to content
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

Plugins that require 3rd-party API keys #228

Open
johnd0e opened this issue Jul 28, 2019 · 6 comments
Open

Plugins that require 3rd-party API keys #228

johnd0e opened this issue Jul 28, 2019 · 6 comments
Labels
development general development issue

Comments

@johnd0e
Copy link
Contributor

johnd0e commented Jul 28, 2019

In fact we have already included some:

  • Bing (hardcoded api key, seems enough for current usage)
  • Yandex (api key usage will be forced soon)

And there are also some plugins that are currently excluded from official list, because their backend services at some point started to require API keys

  • HERE (former Nokia)
  • Thunderforest (opencyclemap)
  • MapBox
  • MapQuest
  • ...

In most cases we can't predefine api keys. But every user can come and get own key.

So the issue: we need user-friendly way to enter custom key into iitc/plugin.

@johnd0e
Copy link
Contributor Author

johnd0e commented Jul 28, 2019

As every plugin is js-script, users could edit source code (to add api key) themselves. But it wouldn't be good, as every update of plugin will brake such customization.
More proper way'd be to add api-keys customization separately (in separate plugin, which sole function'd be to override api-key).

But it is definitely not friendly way.
So we need some dialog-based way, ideally - common for all plugins.

And it would be useful not only for api-keys overriding.

@johnd0e johnd0e changed the title Plugins for 3rd-party services that need API keys Plugins that need 3rd-party API keys Jul 28, 2019
@johnd0e johnd0e added the development general development issue label Jul 28, 2019
@johnd0e johnd0e changed the title Plugins that need 3rd-party API keys Plugins that require 3rd-party API keys Jan 2, 2020
@Aradiv
Copy link

Aradiv commented Jan 2, 2020

The APIKeys should be stored in a secure way like with GM_set/getValue so only the Plugins owning the APIKey can read it.
#355

@johnd0e
Copy link
Contributor Author

johnd0e commented Mar 8, 2020

In most cases apikeys are not top secret. And it's not easy to secure them from other scripts (#354 (comment)).

So opening this issue I've rather meant some user-friendly UI, like #336 (comment)

@Aradiv
Copy link

Aradiv commented Mar 8, 2020

yes it is possible to combine both:

just register apiKey handlers to the UI that are able to set secure apikeys this way we can have a user friendly UI with secured apikeys.

The problem with apikeys is that often the services only have a limited free tier and by exposing the apikey you can easily create a lot of costs for the apikey owner.

So we definatly should make plugins that require ApiKeys like this as secure as possible

@johnd0e
Copy link
Contributor Author

johnd0e commented Mar 8, 2020

Api key are typically designed to belong to whole application, with all it's users.
So if you use own key only for yourself you rarely face with limits.

Api keys typically are limited by specified host, and have no value beyond it.

I never heard about malicious scripts scraping intel.ingress.com for some api keys.

Most of userscripts are open-sourced, and just cannot hide such code.

Thus in 99% cases we do not need extreme security. And this issue is about these 99%, where we just need conventional way of redefine some option.

I'm sure that there can be special cases where we really need to secure some data. Obviously that cannot be done in convenient way, with some common settings dialog. So that should be separate issue.

@Aradiv
Copy link

Aradiv commented Mar 8, 2020

Yes but they are also designed to stay secret to the application and some of the services you listed above provide a way to use temporary/limited tokens if you have to expose them to limit possible attack vectors the others suggest using a proxy that will add the apikey.

For mapbox you even need a secret token which is only visible to you once to get the list of custom maps the user might have defined. unless you want the user to manually specify the mapids.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development general development issue
Projects
None yet
Development

No branches or pull requests

2 participants