skip to content
New Literacy Technology Consultants

Secrets Management DevOps Tools and More

/ 5 min read

These tools provide a means of securely storing secrets (encryption keys, passwords, all that good stuff that you want to make available to your production systems, but you must protect from exposure) I started my research with This Reddit Post

Simple Tools

๐Ÿ’ซ SOPS: Simple and flexible tool for managing secrets: getsops.io | SOPS: github: SOPS allows the encryption of secrets directly in the configuration files from which your applications load them. Using SOPS, secrets are decrypted at runtime.

๐Ÿ‘‰ using SOPS is kind of a pain, but it doesnโ€™t involve relying on any external webservices. It supports encrypting secrets using PGP (and that got me stuck on looking at allโ€ฆ. It works as follows.

๐Ÿ‘‰ create a sops.yaml file in the root of your project, this file will at minimum need to specify the fingerprint for the pgp key youโ€™ll use to encrypt secrets. It supports other methodsโ€ฆ but why? Iโ€™m not interested.

creation_rules:
- path_regex: ./*
pgp: 'FA2A456F0B079A46CDE2E2275D2D'

๐Ÿ‘‰ move your .env file variables into a json file, converting the list of variables to a dictionary.

env.json
{"SECRET1":"SECRET1VAL", "SECRET2":"SECRET2VAL", ... "SECRETN":"SECRETNVAL"}

๐Ÿ‘‰ run sops encrypt env.json > env.enc.json which will encrypt the individual values within the file. Take a look.

๐Ÿ‘‰ run sops exec-env env.enc.json <your app launch command> any application launched with sops exec-env <encrypted secrets file> will have environment variables defined for each key in the json arrayโ€ฆ which is why we converted our .env variables to json keys. To use this, make sure your app doesnโ€™t specifically need the .env file. I got some warnings that I think came from python dotenv, but it all seems to be working fine anyway.


๐Ÿคข pass the standard unix password manager blehโ€ฆ

Components of Larger Software Packages

๐Ÿช Portainer.io: Container management for Docker and Kubernetes with a built in system for managing secrets | How to create and manage Kubernetes Secrets in Portainer

๐Ÿช Ansible Vault

Webservice Based Solutions

๐Ÿ˜ Arctera Enterprise Vault

โ›” VaultPlusPlus: looks promising, but command is provided binary only and it doesnโ€™t seem to work on my fedora kinoite system

๐Ÿง AWS Secrets Manager$0.40 per secret/month, $0.05 per 10k API Calls so pretty reasonableโ€ฆ except my newest app has like a dozen secrets at least. There are free options below that will be much less expensive,but less full-featured.

๐Ÿคฆ 1password.com: User Account is 2.99, but I think the $19.99 package is necessary to access the secrets management for web applications.

โš ๏ธ Evervault: Free edition limited to 500 decrypts/mo which, depending on how your project is coded, could be plenty or not nearly enough


โœ… ๐Ÿ‘Œ๐Ÿ˜Ž๐Ÿงธ Infisical: Free edition is entirely usable

๐Ÿ‘‰๐Ÿค› Using infisical:fairly simple cli usage,

โ€๐Ÿ‘‰ first install (rpm, apt, or npm),

๐Ÿ‘‰ go to the directory for the project where you want to create an association with an infisical project, runinfisical init and choose the appropriate project

๐Ÿ‘‰ now you can prefix any command with infisical run --env=<dev,staging,production> --path=/path/to/application <application start command>.

๐Ÿ‘‰ Alternately, you can run infisical secrets --env=<dev,staging,production> and it will print out a table SECRET NAME | SECRET VALUE | SECRET TYPE.


โœ… ๐Ÿš€๐Ÿ”ฎ๐ŸชDoppler: Free edition is entirely usable: similar cli usage to Infisical.

๐Ÿงฟ first install (rpm, apt, or shell-script -for the shell-script option on fedoria ostree based installs, you must save install.sh and edit it setting USE_PACKAGE_MANAGER=0 then run it as root)

๐Ÿ’ซ run doppler login to get a token

โ˜„๏ธ go to the directory for the project where you want to create an association with a doppler project and run doppler setup and choose the appropriate project

๐ŸŒŒ now you can prefix any command with doppler run --command= for example, the simplest case, to verify the secrets are accessible, if you created a secret called TEST_SECRET run doppler run --command="echo \$TEST_SECRET" it should print the secret value to the screen demonstrating that it is now available as an environment variable.


โš ๏ธ๐ŸคฆHashicorp Vault: Was Free, now Requires Hasicorp Dedicated ๐Ÿ’ต$400+/month.

๐Ÿ˜ Pulumi IaC ESC : Pulumi is an infratructure as Code Provider.

Summary

In experimenting with the reccomendations from the reddit post I found Doppler and Infisical to be the best webservice optionsโ€ฆ really the only useable ones.


Ubiq: Encryption for Everything

Not exactly a secrets manager, but an interesting service that I feel like mentioning anyway. Designed to be very easy to implement so that no sensitive data need be left unencrypted at rest.

UBIQ It might be possible to setup a workflow using ubiq for secrets management since it provides such generic access to encryption.


Post Quantum Cryptography

and that got me stuck on looking at allโ€ฆ the new encryption types that have appeared in the latest version of gnupg. unfortunately none are quantum safe, even though it sounds like the algorithms exist.

๐Ÿ”ฎ Post Quantum Cryptography PQC

๐Ÿ‘จโ€๐Ÿ’ป Shorโ€™s Algoritm: theoretically capable of defeating all traditonal assymetric key encryption given sufficient quantum computing resources. (RSA, and all variations of the elliptic-curve) because of its potential to be able to factor large numbers. Not proven yet, but theoretical possibility is probable enough to warrant the development of new methods for genration asymmetric keypairs. So far the following have been proposed:

Post-quantum cryptography research is mostly focused on six different approaches:

๐Ÿ” Lattice Based Cryptography

๐Ÿ”‘ Multivariate cryptography

๐Ÿ— Hash Based Cryptography

๐Ÿ’ป Code-based cryptography

๐Ÿ”ข Isogeny-based cryptography

๐Ÿ” Symmetric key quantum resistance

๐Ÿ•ต๐Ÿ›ก๏ธ Hybrid encryption is often recommended, where data is encrypted with both a new Post Quantum Encryption Technology as well as an existing proven non Post Quantum encryption technology like ed25519. This way if the new algorithm turns out to be vulnerable to a non-quantum attack, then the data will be protected by the well tested, but not quantum safe algorithm. This is a good idea since there is a lot of risk with the new algorithms simply because they are that new.