API Keys service
This service allows issuing and managing API keys via the Platform Manager web interface. End-users of On-Premise services will use these keys to access the deployed On-Premise services.
Administrator issues one or more API keys to a partner. It is a named entity used to store a group of API keys.
On-Premise services that require an end user to supply an API key to operate:
- Maintain a list of the issued API keys for an end user, and update the list and the corresponding usage policies by communicating with the API Keys service.
- Determine whether to allow or deny an end user's request by evaluating all the information received from the API Keys service.
- Send the request's metadata to the API Keys service.
Architecture
The API Keys service consists of a backend service and auxiliary components. The backend service provides a RESTful API: other services use it to check API keys. The administrator manages keys in Platform Manager. Users are authenticated through an OpenID Connect (OIDC) provider, for example, Platform ID.
When preparing to execute an end-user's request, each On-Premise service sends the metadata of the request to the API Keys service (including the API key). The API Keys service reads events related to API keys from the Apache Kafka data storage (Broker on the diagram). Additionally, API Keys usage counters are stored in Redis (Redis-like DBMS on the scheme).
The Tasker service fetches the data about events from the API Keys backend and then takes appropriate administrative actions on keys based on the events: for example, it may block or unblock the certain API key. This allows the API Keys service to control the usage of API keys and to enforce quota-based access rules: for example, if an end-user with a certain API key makes more than 100 requests per minute to the On-Premise maps services, access to the services will be blocked for that API key until the next minute.
For detailed overview of the On-Premise software suite architecture, see the Overview document.
Dependencies
Shared infrastructure:
- Apache Kafka data storage for statistics on API keys usage. Installing this storage is optional, unless you plan on using the Statistics Collection service.
- Redis data storage for storing API keys usage counters.
- PostgreSQL data storage for storing API keys and related data.
You can use alternatives from the unified register of Russian programs for the ones listed above. For available alternatives, see the System requirements section.
For more information on how to check requirements for each service, refer to the System requirements document.
What's next?
-
Find out how to install or update the service:
-
Read more about On-Premise: