A collection of GNU Make targets to generate secrets for seeding microservices, intended to help automate the creation of ad-hoc test environments and platform prototyping.
This utility is built on GNU Make. To generate new data, specify a make target in the desired directory. By default existing files will not be altered. To force a file to be re-created, see Forcing Re-creation below.
Specify an arbitrary file name in the string/ directory and a plaintext ASCII
file will be created containing a random alpha-numeric string.
make string/test-pwdSpecify an arbitrary file name in the ssh/ directory with a suffix of either
_rsa, _ecdsa, or _ed25519 and an SSH private key of the named type will
be created with a corresponding public key with a .pub extension.
A password for the private key can be specified in an environment variable
named MAKE_SSH_PASS. The default is no password.
For RSA and ECDSA a bit-length can be specified in an environment variable
named MAKE_SSH_BITS. The value will be ignored for ED25519 keys.
make ssh/user_rsa# A leading space will prevent the shell from storing the command in history
make MAKE_SSH_PASS=secret MAKE_SSH_BITS=8096 ssh/user_rsaDefault value for MAKE_SSH_BITS is 4096.
make ssh/user_ecdsaDefault value for MAKE_SSH_BITS is 384.
make ssh/user_ed25519MAKE_SSH_BITS is ignored.
An example showing the use of both an environment variable and a make variable,
as well as auto-generating the password with a string/ target.
make string/sshpass
export MAKE_SSH_BITS=521
make ssh/user_ecdsa MAKE_SSH_PASS=$(< string/sshpass)
Create a self-signed x509 certificate pair with V3 CA extensions by specifying
an arbitrary path under the self-signed/ directory. A subdirectory will be
created with two files: private.pem and public.pem. The certificate subject
is localhost, and the name of the file itself is added as an alternate name.
make self-signed/example.localTo force Make to re-create an existing file, pass the option -B.
make -B $TARGET