What is secrets management?

Secrets management is the process of securing and controlling credentials for the automated components of an application.

What is secrets management?

Secrets management is the practice of securely storing sensitive information that, if leaked, could give malicious or unauthorized parties access to application infrastructure. A "secret" in this context refers to the encryption keys, API keys, SSH keys, tokens, passwords, or certificates that enable disparate parts of application infrastructure to connect to each other.

While a user may only need to know one password to log into an application, that application is itself composed of various parts that all need credentials — those secrets — to talk to each other.

Almost everyone is familiar with how difficult it can be to remember passwords for multiple applications, especially when those passwords need to be updated regularly. Because of this, many people start using unsafe password practices, such as writing their passwords down or using the same password across all applications.

Developers face similar challenges when making software. The infrastructure that makes applications work, or that a business runs on, can require hundreds or even millions of keys, tokens, and passwords. Because managing all these secrets is so taxing, they often end up hard-coded into application software. They may never get updated and are sometimes coded in plaintext, leaving them vulnerable to attackers.

What is a 'secret'?

In the context of application development, a secret is a piece of data used as a credential. Just as a person needs to authenticate in order to access their email by entering a username and password, the non-human components of that email application (or any application) need to authenticate to each other for the application to work. These components can include API connections, containers, microservices, scripts, functions, and automation tools. To authenticate, they use credentials.

Secrets can include:

  • IPsec keys or certificates

  • TLS certificates

  • Keys

  • API keys

  • Passwords

  • Tokens

Think of how children's building blocks (such as LEGO ) lock together to form a sturdy, if miniature, structure. Secrets are like those locking mechanisms holding an application together. Without them, the application falls apart.

Why is it important to update secrets?

Unlike building blocks, which always have the same ridges for locking into each other, secrets need to be changed regularly. If a secret is used for too long, an attacker may be able to guess it via a brute force attack. Also, the longer a secret is used, the more likely it is to leak.

The need to rotate secrets adds to the complexity of securely managing them. Just as remembering an updated password can be difficult, regularly rotating secrets is a big challenge. A dozen apps might depend on a single API, and all those apps will have to update their secrets if the API requires new credentials. In some cases, an organization may not even know how many apps are dependent on that API, and what will break when a secret is updated.

Sometimes, development teams opt out of updating secrets altogether for the sake of efficiency, just as many people prefer not to update their passwords. They may even hard-code secrets into scripts and functions, assuming the secrets will not need to be changed.

What are the other challenges of secrets management?

Manual sharing: Developers who lack a secrets management solution may be forced to use manual processes to share secrets across development teams, leading to poor documentation and introducing secrets into unsecured environments.

Third party accounts: External users may need access to internal APIs and databases. Because they are outside the organization, enforcing secure secrets management is difficult.

Cloud computing: Cloud environments are sprawling and ephemeral. New virtual machine instances spin up to support services on a regular basis, and all of them require their own secrets. Cloud applications also allow broad access from an almost unlimited range of locations, vastly expanding the number of credentials and privileges that must be managed.

Lack of centralized management: Just as getting a group of people to agree on a time for dinner can be a challenge, managing secrets spread out among multiple teams and functions is hard. Each team may document secrets differently, store them differently, or lack visibility into the secrets other teams are using.

How a secrets management solution works

Secrets management tools can automate all the necessary processes for securely managing secrets. They also store secrets in a secure environment, separate from the application's code. This enables developers to avoid hard-coding secrets or storing them in plaintext, where they could be compromised.

How does Cloudflare assist with secrets management?

Cloudflare offers a highly scalable development platform for running code across its global network. Cloudflare Secrets Store enables developers to securely store and manage the secrets their applications need, from API tokens to request authorization headers. Learn about Secrets Store.

FAQs

What is secrets management?

Secrets management is the practice of protecting and regulating digital credentials used by the automated parts of an application. It involves securely storing sensitive data that, if exposed, could allow unauthorized individuals to access an application's infrastructure.

What is considered a secret in application development?

In this context, a secret is a piece of data that serves as a credential for non-human components. These non-human elements, such as API connections, microservices, and automation tools, use these credentials to authenticate with one another so the application can function. Examples include IPsec keys, TLS private keys, API keys, and passwords.

Which types of sensitive data are commonly managed as secrets?

Common secrets include API keys, encryption keys, passwords, and tokens. They also include certificates, such as TLS or IPsec certificates, and SSH keys that allow different parts of an infrastructure to connect.

Why is it necessary to rotate secrets regularly?

Secrets must be updated to reduce the risk of an attacker guessing them through a brute force attack. Additionally, the longer a secret remains in use, the more likely it is to leak. Regular rotation helps maintain the security of the application over time.

What are the primary challenges of managing secrets in a cloud environment?

Cloud environments are often sprawling and change frequently, with new virtual machines constantly starting up that each require their own credentials. Additionally, the various components are often interdependent on each other, so when a secret is updated it can break connections between components that have not been updated with the new information. This expansion increases the total number of privileges and secrets that an organization must monitor and manage. The number of secrets they need to manage often vastly exceeds internal teams' manual capabilities.

How do secrets management tools improve security for developers?

Secrets management solutions automate the management process and store credentials in a secure environment separate from the application's code. This allows developers to avoid hard-coding secrets or saving them as plaintext, where they are much easier for attackers to find.

How does Cloudflare assist with the management of application credentials?

Cloudflare provides a tool called Secrets Store, which is built on its global network. This service allows developers to securely store and handle the various credentials their applications need.