“Dynamic secrets” is the umbrella term for a bundle of processes including quick rotation and short lifespan of secrets. The purpose of implementing dynamic secrets is to mitigate the attack surface of a secret, helping to prevent data breaches. For cloud-based platforms, infrastructural vulnerabilities are no longer the primary attack vector hackers use. Instead, they acquire leaked secrets and then access the inner workings of a platform through valid accounts. This threat vector is challenging to detect because the initial access point appears the same between a hacker and a typical user. The only way to combat the threat of misused valid accounts is to properly secure secrets before they are leaked.
For hackers, the attack surface of a secret is twofold:
Visibility: A secret's visibility refers to how many agents have access to its value and how secure those agents are from external threats. A secret might be highly visible if it is frequently used by various people and services or similarly visible if the login process to view it doesn’t include common protections like multi-factor authentication. When a hacker has multiple avenues to view a secret, its attack surface is much larger.
Lifespan: The lifespan of a secret refers to how long the value of a secret remains viable within the development environment. If a secret is accidentally exposed through a mistaken git commit or compromised credential, the lifespan of the secret will determine its attack surface. Regularly rotating secrets (compromised or not) prevents them from being exploited, regardless of their exposure. If a hacker finds a secret in a repository from months or years ago, it only remains a threat vector if the secret’s value is still active.
Dynamic secrets primarily reduce the attack surface of the latter facet, lifespan, although implementing dynamic secrets requires more control over the secrets lifecycle generally, which can decrease other attack surface vectors as well. Implementing dynamic secrets means altering the current platform to work with and use secrets differently, and can be aided by secrets management solutions that easily facilitate its principles, such as:
Short lifespan: Dynamic secrets are short-lived by design, preventing them from surviving beyond their intended use. This can be achieved in multiple ways. One method is to predetermine a secret's lifespan during its creation, revoking its validity after a set amount of time. Another method is to use scheduled, automatic rotation practices to change the value of a secret at regular intervals determined by its vulnerability risk.
Automatic rotation: Automating the rotation of secrets isn’t just about generating short-lived secrets. It means creating the infrastructure for secrets to be quickly rotated and synced across the platform at any time, a process vital for mitigating damage in the event of a data breach. Automatic rotation is about being able to perform this rotation at a moment’s notice, without causing platform downtime.
Secure injection: Dynamic secrets are injected at application runtime using environment variables, rather than coded directly into the program. Using environment variables helps facilitate the rotation process of dynamic secrets since the file holding the secret for injection can be altered without altering the program's code. Environment variables help prevent secrets from ending up in repositories since the value of a secret should never be written into code.
Security automation is just what it sounds like: altering or creating security practices that operate quickly, predictably, and automatically. It can take many forms across your organization, including in the management of secrets. The primary benefits of security automation are as follows:
When well-designed, automatic processes operate the same way every time. This predictability means reliability! Manual actions are prone to user error, especially with frequent repetition. Automated processes function the same way every time.
Because they don’t involve the same degree of human interaction, automated processes are much faster, and can be run in parallel while developers work on other tasks. Rather than manually sync each instance of a secret across the platform every time its value is updated, an automated system will perform this syncing process for you, saving time.
Automated security practices are generally more secure than manual control. When creating the software for these processes, security teams can include every necessary feature within the automation, ensuring no step is skipped by an employee trying to save time down the line. Additionally, if security features are added or updated, the automated process can be updated without requiring developers to learn each new step or system.
These benefits bleed into other facets of development, but first and foremost, they free up IT resources so the department can tackle more complex and pertinent tasks. The more functions that can be automated away, the more developers can enhance complex platform features without wasting time on unnecessary security.
Effectively implementing dynamic secrets involves automating the secrets management process, since manually rotating, updating, and sharing secrets across a platform doesn’t function at scale. There are plenty of different facets of secrets management to automate, from user provisioning to secrets rotation, and plenty of nuance within each to give anyone a headache.
Doppler is here to help. Doppler covers every facet of dynamic secrets mentioned above, integrates and syncs with your existing infrastructure, and can help you automate your secrets management processes with ease. Check out a free demo or visit our docs to see how Doppler can improve your security posture.
Trusted by the world’s best DevOps and security teams. Doppler is the secrets manager developers love.