Secrets management

Keeping machine credentials such as API keys, database passwords, tokens and private keys out of code, in a controlled vault that issues, rotates and logs them for software at run time.

Secrets management covers the credentials that software, rather than people, uses: database passwords, API keys, access tokens, encryption keys and the private keys behind certificates. The central rule is that a secret should not sit in source code, configuration files committed to a code repository, in container images or in build logs. A secrets manager instead holds them encrypted, releases each one only to the workload authorised to use it, records every access and supports rotation. Some also issue short-lived credentials that expire on their own.

The reason is exposure. A secret committed to a repository is copied to every clone and stays in the version history after the line is deleted, so removing it from the code does not end the risk: the secret has to be revoked and replaced. Many DevSecOps pipelines scan commits for secrets, and SAST tools can flag hardcoded credentials. A secrets manager is related to a password vault and to privileged access management, but it is aimed mainly at applications and pipelines rather than human administrators.

Exam relevance: a scenario describing credentials found in source code or a public repository is likely to point to secrets management as the lasting fix. Candidates are expected to recognise that the exposed secret itself must also be rotated, since it remains readable in the history.