Heroku buildpack to generate RSA public/private keys
$ heroku buildpacks:add -a appname https://github.com/velizarn/heroku-buildpack-rsa-keys
Optional config variables:
- RSA_NUMBITS - The size of the private key to generate in bits. This must be the last option specified. The default is 1024 and values less than 512 are not allowed.
- RSA_PRIVATEKEYPATH - Path where to store private key file, default './private_key.pem'
- RSA_PUBLICKEYPATH - Path where to store public key file, default './public_key.pem'
- RSA_COMMAND_ENV - additional command to execute after RSA keys generation, if needed, e.g.
echo export RSA_PUBLIC_KEY_BASE_64=$(cat $RSA_PUBLICKEYPATH | base64 -w 0) >$BUILD_DIR/.profile.d/rsakeys.sh
Following command will set numbits value to 1024 and path to key files in app root directory:
$ heroku config:set -a appname RSA_NUMBITS=1024 RSA_PRIVATEKEYPATH=./private_key.pem RSA_PUBLICKEYPATH=./public_key.pem
- https://devcenter.heroku.com/articles/stack-packages
- https://cryptotools.net/rsagen
- https://ss64.com/bash/
- https://docs.openssl.org/3.4/man1/openssl-genrsa/
- https://docs.openssl.org/3.4/man1/openssl-rsa/
MIT