Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Certificate credentials support a certificate file upload.

...

Input Name

Required

Description

Input Type

Certificate

Yes

Certificate which will have its content stored in encrypted format.

File

You can reference Certificate credential where supported. For example,

...

Code Block
languagebash
rm -rf ./generated
mkdir generated
cd generated

export KEY_ALIAS=FDOCI1
export KEY_PASSWORD=Welcome1

# Generate Private Key and Certificate with Passphrase 
keytool -genkey -keyalg RSA -alias $KEY_ALIAS -keystore keystore.jks -storepass $KEY_PASSWORD -validity 365 -keysize 2048 -keypass $KEY_PASSWORD

# Export Certificate
# This Certificate can be uploaded for FlexDeploy Certificate type Credential
keytool -exportcert -alias $KEY_ALIAS -file ${KEY_ALIAS}.cer -keystore keystore.jks -storepass $KEY_PASSWORD -rfc
sed -i 's/\r//g' ${KEY_ALIAS}.cer

# Convert to Keystore to PKCS12 format and export Private Key file.
keytool -importkeystore -srckeystore keystore.jks -srcstorepass $KEY_PASSWORD -destkeystore keystore.p12 -deststoretype pkcs12 -destkeypass $KEY_PASSWORD -deststorepass $KEY_PASSWORD

# This Private Key can be uploaded to FlexDeploy Private Key type Credential along with Passphrase (set in KEY_PASSWORD on line 6 above)
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 Certificate Values As Properties

...