BR +55 11 3069 3925 | USA +1 469 620 7643

API Keys: Do You Know What Is?

by | Nov 4, 2019 | BLOG

Controlling access and ensuring the security of employee and customer data has been one of the biggest security challenges faced by organizations today, and this is intensified when sensitive information and assets are stored where access identifiers are not protected. 

Configuring and granting access in cloud environments, for example, has given even the most experienced system administrators a headache. Recently, Imperva, which provides Web Application Firewall (WAF) services – a system that stays between the application server and the internet, protecting against attacks such as SQL Injections, DDoS, and others – gave details on its blog about a security incident that has occurred through the theft of an AWS API key and lead to data being extracted from its customers. 

But before talking further on the subject, we need to know some definitions about API keys.

What are API Keys?

First, APIs are instructional codes for an application that allow other software to develop products by adapting the original features to the ways in which their services can be used. 

Facebook, Google, Twitter, and other services provide documentation so that their APIs can be used in various applications. As an example, we can mention that when an application offers authentication through a Google account, such application has used a Google API to implement this feature in its code. 

Both Google and other API providers use keys to identify and track requests and thus measure how well the application uses their services.

API keys are the access credentials that authorize the use of API-specific features and help prevent their misuse by identifying its permission and sharing necessary data, so the server can block abnormal requests made in association with that API Key.

It is important to mention that the keys identify the application calling the functions and not the user using them. Therefore, they cannot restrict users, but requests, environments, applications, and IPs. 

Although there is a possibility of restricting their use, API keys are assets that should be kept secure, as they have no expiration and can be used by anyone who knows them, which becomes a more serious problem when these keys are used to access environments in which critical data is stored. 

API Key Storage

Today, many organizations already know the benefits of using the cloud, store data and a lot of sensitive information in this environment, but they use standard or basic configurations that these services offer. In other contexts, they even perform security settings correctly, but when credentials such as accounts, keys, tokens, and other items used to access and handle these environments are not protected, the occurrence of an incident is almost certain. 

In the case of AWS – Amazon Cloud Computing Services Platform – access control and keys are integrated into its security. However, many service keys have already been exposed in public repositories or given to developers to expedite task execution, but this is not recommended. 

The incident that occurred with Imperva, according to its Chief Technology Officer Kunal Anand, was due to access from an internal instance where the AWS API Key was stored. The chief officer described the decisions that led to the leak:

API keys, in most scenarios, are not the kingdom-wide access keys, but they open the way to the crown jewels. Unfortunately, this valuable item is handled without proper care or relevance, being stored in places accessible to anyone, when instead it should be managed, tracked, protected, and moderately used. 

How to Protect API Keys

Protecting any asset in an organization is not a simple task. Some controls, however robust they can be, require additional measures to be effective. 

In order to ensure the minimum security of your API Keys, some measures are important:

  • Do not put keys in configuration files on the system as they can be found easily. 
  • Each integration must have its own key. 
  • Just like credentials and passwords, keys should be changed from time to time, because in case they are compromised, they will be valid for a short time. 
  • Eliminate keys that are no longer needed to shrink the attack surface. 
  • Label each key to know which ones work in each application. A key inventory is a good measure. 
  • API keys should not be emailed so there is no risk of being intercepted. 
  • Monitor the use of the API for immediate key change when a misuse or abnormal use occurs or is observed. 

These and other measures can be taken through a PAM solution, which aims to manage privileged access by using a set of technologies and practices to monitor and manage access to critical data. 

A PAM solution can assist in the creation and execution of an access workflow consisting of the request and approval to use the key, as well as requiring authentication for viewing and using the key, preventing an unauthorized user from exploiting it. 

As much as API providers make security settings available, organizations should not remain exempt from the responsibility of doing their job to ensure that access and use of assets are done correctly and authentically. In this context, a PAM solution becomes even more necessary when it is up to the organization, not the API provider, to rotate, grant, and revoke the use of keys. 

Protecting any kind of access credentials is the foundation for any strategy aimed at securing sensitive information and assets. If accounts, passwords, and keys are not preserved, later controls will not be as effective as they should. It is the implementation of security controls on credentials that will be responsible for reducing the chances of an incident. 


ANAND, Kunal. Security Incident Update. Oct 10, 2019. Available at: Accessed on: Oct 25, 2019.

An Overview of Saudi Arabia’s Personal Data Protection Act (PDPL)

Saudi Arabia’s Personal Data Protection Law (PDPL) was implemented by Royal Decree M/19 of 9/2/1443H (September 16, 2021), which approved Resolution No. 98 of 7/2/1443 H (September 14, 2021). It was published in the Republic Journal on September 24, 2021. The Saudi...

The 5 Biggest Data Leaks of 2021

During the pandemic, cyberattacks grew more than ever. Theft, hijacks, and data leaks are increasingly popular practices in cybercrime. The lock and hijack for ransom (ransomware) category has stood out a lot, as data is a highly valuable resource and most companies...

HIPAA: Five Tips for Complying with The Certificate

What is HIPAA? Currently, this is one of the most frequently asked questions by many professionals working in the healthcare industry, especially in times of the Covid-19 pandemic. But why is it so important and what are its benefits for healthcare companies? First,...

How Does The LGPD Impact Companies?

Due to the growing technological development in the market, we can clearly see how much how consumers tend to buy products and services has changed. Through more practical technologies, such as cellphones, laptops, and tablets, for example, they are just a click away...

What Is the Difference Between IAM and PAM?

It is important to know the differences between IAM (Identity & Access Management) and PAM (Privileged Access Management). However, this theme still raises doubts for some people. First, it is necessary to understand that the need to obtain an identity is...
Copy link
Powered by Social Snap