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

Enable addition of External Service API keys #626

Closed
LefterisJP opened this issue Jan 16, 2020 · 0 comments · Fixed by #647
Closed

Enable addition of External Service API keys #626

LefterisJP opened this issue Jan 16, 2020 · 0 comments · Fixed by #647
Assignees

Comments

@LefterisJP
Copy link
Member

LefterisJP commented Jan 16, 2020

Problem Definition

External services are slowly closing down their APIs with API Keys. Even though that makes sense from their perspective, it presents a very difficult problem for an application like Rotki because it will require each user to maintain their own set of API keys for external services.

For the ethereum blockchain if the user is not connecting to his own node or to Infura we are heavily relying on Etherscan. With etherscan enforcing API key usage from 15/02/2020 the ability for Rotki users to manage their own API keys becomes paramount.

Task

The available external API services for now will be ["etherscan", "cryptocompare"]

Frontend

In the settings page of the user create a UI element that will allow addition of API keys for all available external API services.

Backend

Either add a new table external_service_credentials

CREATE TABLE IF NOT EXISTS external_service_credentials (
    name VARCHAR[24] NOT NULL PRIMARY KEY,
    api_key TEXT
);

or just add them in the existing DB settings.

For each service that there is a possibility for an API key:

  1. Query the DB to see if it exists
  2. If it does, use it in the query.
  3. If it does not and the API allows queries without a key, proceed.
  4. If it does not and the API requires an API key let the user know.

This will require new errors in some of the API endpoints.

@LefterisJP LefterisJP added this to To do in Release v1.1.0 via automation Jan 16, 2020
LefterisJP added a commit to LefterisJP/rotkehlchen that referenced this issue Jan 25, 2020
Release v1.1.0 automation moved this from To do to Done Jan 25, 2020
LefterisJP added a commit that referenced this issue Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
2 participants