Module to interact with keystores
salt.modules.keystore.
add
(name, keystore, passphrase, certificate, private_key=None)¶Adds certificates to an existing keystore or creates a new one if necesssary.
name -- alias for the certificate
keystore -- The path to the keystore file to query
passphrase -- The passphrase to use to decode the keystore
certificate -- The PEM public certificate to add to keystore. Can be a string for file.
private_key -- (Optional for TrustedCert) The PEM private key to add to the keystore
CLI Example:
salt '*' keystore.add aliasname /tmp/test.store changeit /tmp/testcert.crt
salt '*' keystore.add aliasname /tmp/test.store changeit certificate="-----BEGIN CERTIFICATE-----SIb...BM=-----END CERTIFICATE-----"
salt '*' keystore.add keyname /tmp/test.store changeit /tmp/512.cert private_key=/tmp/512.key
salt.modules.keystore.
list
(keystore, passphrase, alias=None, return_cert=False)¶Lists certificates in a keytool managed keystore.
keystore -- The path to the keystore file to query
passphrase -- The passphrase to use to decode the keystore
alias -- (Optional) If found, displays details on only this key
return_certs -- (Optional) Also return certificate PEM.
Warning
There are security implications for using return_cert to return decrypted certificates.
CLI Example:
salt '*' keystore.list /usr/lib/jvm/java-8/jre/lib/security/cacerts changeit
salt '*' keystore.list /usr/lib/jvm/java-8/jre/lib/security/cacerts changeit debian:verisign_-_g5.pem
salt.modules.keystore.
remove
(name, keystore, passphrase)¶Removes a certificate from an existing keystore. Returns True if remove was successful, otherwise False
name -- alias for the certificate
keystore -- The path to the keystore file to query
passphrase -- The passphrase to use to decode the keystore
CLI Example:
salt '*' keystore.remove aliasname /tmp/test.store changeit
Generated on June 18, 2020 at 04:09:58 UTC.
You are viewing docs for the latest stable release, 3001. Switch to docs for the previous stable release, 3000.3, or to a recent doc build from the master branch.
© 2020 SaltStack. All Rights Reserved, SaltStack Inc. | Privacy Policy