...
Private Key credentials support a private key file upload and have an optional input for a passphrase. You will be able to download the public key based on the private key that is uploaded if it is an OpenSSH key. These credentials FlexDeploy does not support downloading public key for such private key files. These credential can be configured for OAuth purposes where supported by underlying Integration. Additionally, they can be referenced in custom groovy scripts and workflows (see Referencing Private Key Values as Properties section for more information).
...
Input Name | Required | Description | Input Type |
---|---|---|---|
Private Key | Yes | Private Key which will have its content stored in encrypted format. Most private key formats should work in FlexDeploy. The private key will not be tested at save time. | File |
Passphrase | No | Passphrase for accessing the Private key (optional, also stored in an encrypted format). | Text |
You can reference Private Key credential where supported. For example,
...
How to generate Private Key & Certificate
See example commands below to generate Private Key and Certificate. Adjust KEY_ALIAS
and KEY_PASSWORD
before running this. You will get two Private Key files (.pem extension) - with and without Passphrase. You will also get matching Certificate (.cer).
Code Block | ||
---|---|---|
| ||
rm -rf ./generated
mkdir generated
cd generated
export KEY_ALIAS=FDOCI1
export KEY_PASSWORD=Welcome1
keytool -genkey -keyalg RSA -alias $KEY_ALIAS -keystore keystore.jks -storepass $KEY_PASSWORD -validity 365 -keysize 2048 -keypass $KEY_PASSWORD
keytool -exportcert -alias $KEY_ALIAS -file ${KEY_ALIAS}.cer -keystore keystore.jks -storepass $KEY_PASSWORD -rfc
sed -i 's/\r//g' ${KEY_ALIAS}.cer
keytool -importkeystore -srckeystore keystore.jks -srcstorepass $KEY_PASSWORD -destkeystore keystore.p12 -deststoretype pkcs12 -destkeypass $KEY_PASSWORD -deststorepass $KEY_PASSWORD
openssl pkcs12 -in keystore.p12 -passin pass:$KEY_PASSWORD -passout pass:$KEY_PASSWORD -nocerts -out $KEY_ALIAS.pem
openssl rsa -in $KEY_ALIAS.pem -passin pass:$KEY_PASSWORD -out ${KEY_ALIAS}_no_passphrase.pem
cd .. |
Referencing Private Key Values As Properties
...