Secrets management meaning, in plain words

Secrets management keeps passwords and keys in a dedicated safe with limited access and rotation. What OWASP and CWE-798 say, and what small teams can do.

Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated

Secrets management is the operation of keeping passwords and keys in a dedicated safe. OWASP's sheet lists API keys, database credentials, IAM permissions, SSH keys, and certificates as secret information. Handling them under one set of rules, down to where they are kept, who can take them out, and when they are replaced, is secrets management.

How does secrets management work?

Think of the operation of a bank's safe deposit boxes. Important keys go in a dedicated safe. Only limited people can take them out, who took them out and when is kept in a log, and the keys are changed regularly. Not leaving keys in a desk drawer or a notepad is the basic promise.

OWASP's sheet lists the pillars of operation. The first is to bring storage, issuing, logging, and replacement together in one place and so reduce the chances of leaks. The second is to reduce the points where people handle things by hand, and to use automatic replacement and secrets that are used once.

The third is replacement. If you replace regularly, the time a stolen secret can be used becomes short.

The fourth is minimum permissions. Do not leave a state where engineers can see every secret, but divide permissions finely by secret and by component. The fifth is records. Keep a record of who asked for and used a secret and when, and when it was replaced, and also guard the record against tampering.

All of these sit on the opposite side from writing things in plain text in code or settings files. CWE-798 defines embedding credentials directly in code as a weakness. As a countermeasure it lists keeping them in encrypted, protected configuration outside the code.

What is visible from outside your company can be checked with the free URL check. The problem of secrets written into code is in hard-coded secrets.

Why does secrets management matter?

If secret information gets out, someone may get into a system without going through a login screen. For example, if a key that operates the cloud leaks, a third party can do what the key's owner can. Real cases and responses are covered in access key leaks.

At small companies, passwords are sometimes handed over by chat or email in dealings with production firms and contractors. The difficulty is that it is hard to grasp where they remain afterwards and who can see them. If you decide a dedicated place and a procedure for taking them out, you will not be at a loss when a person in charge changes or a contract ends. For help setting that up, contact us.

OWASP's sheet also touches on secrets inside automated mechanisms. For deployment procedures it recommends short-lived authentication over long-lived fixed cloud keys. It also says it is preferable that the running service itself goes to fetch the secret at run time.

Related terms

  • Hard-coded secrets: writing passwords and keys directly into a program
  • Key management: the operation of making, keeping, and replacing encryption keys
  • Access key leak: keys that operate the cloud getting out
  • IAM: the mechanism that decides who may do what in the cloud

Frequently asked questions

Does a small company need a dedicated secrets management mechanism?

The thinking is the same regardless of size. Four points, not writing in plain text in code or settings files, narrowing permissions, rotating, and keeping records, can be kept even in a small operation. Whether to use a dedicated tool depends on the number of secrets you manage and the number of people who handle them.

Should passwords be replaced regularly too?

According to OWASP's sheet, secrets used by machines are replaced regularly. Credentials used by people are normally left out of regular replacement and replaced when there is a suspicion they were stolen.

Next step

First list where the passwords and keys you use are kept. How to look at secrets written into code is in hard-coded secrets. The free URL check shows only what is visible from outside, and for sorting out your operation, contact us.

Frequently asked questions

Does a small company need a dedicated secrets management mechanism?

The thinking is the same regardless of size. Four points, not writing in plain text in code or settings files, narrowing permissions, rotating, and keeping records, can be kept even in a small operation. Whether to use a dedicated tool depends on the number of secrets you manage and the number of people who handle them.

Should passwords be replaced regularly too?

According to OWASP's sheet, secrets used by machines are replaced regularly. Credentials used by people are normally left out of regular replacement and replaced when there is a suspicion they were stolen.

See what an attacker can see, today

The free URL check returns a grade in under a minute. For costs and next steps, book a free consultation.