Handle passwords and credentials
mainkafkactl supports several strategies for supplying sensitive credentials (SASL, TLS passphrases, Schema Registry).
1. Interactive Prompting
If a credential is missing from the config/environment, kafkactl will prompt you in the terminal.
2. OS Keyring (Recommended)
By default, kafkactl stores successfully entered passwords in your OS keyring (GNOME Keyring, macOS Keychain, or Windows Credential Manager). Subsequent commands will retrieve them automatically.
- Disable Keyring: Set
keyring.enabled: falseinconfig.yml. - Clear Credentials: Use the
--clear-keyringflag to delete a stored entry and force a re-prompt.kafkactl get topics --clear-keyring
3. Configuration File
You can store credentials in plaintext in config.yml. Not recommended for production.
4. Kubernetes Secrets
When running in Kubernetes mode, use the saslSecret configuration to avoid passing credentials as plaintext environment variables in the pod spec.
keyring:
enabled: true