$linuxjunkies
>

Secret

also: credential, sensitive data, authentication token

In Linux security contexts, a secret is any sensitive credential or data (passwords, API keys, tokens, certificates) that must be kept confidential and protected from unauthorized access.

A secret is sensitive information that grants access to resources, authenticates users or services, or reveals confidential data. Secrets include passwords, private cryptographic keys, authentication tokens, database credentials, and API keys.

Linux systems handle secrets through various mechanisms: environment variables, files with restricted permissions (mode 600), dedicated secret management tools like pass or HashiCorp Vault, and in containerized environments, Docker Secrets or Kubernetes Secrets. The principle is always the same—restrict access, avoid logging, and store securely.

Example: A database password stored in /etc/db.conf with permissions chmod 600 ensures only the owner can read it. Modern DevOps practices use external secret managers to avoid hardcoding credentials in configuration files or source code.

Related terms