java_ks

Manage arbitrary Java keystore files

4,115,733 downloads

4,941 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 5.1.1 (latest)
  • 5.1.0
  • 5.0.0
  • 4.4.2
  • 4.4.1
  • 4.4.0
  • 4.3.1
  • 4.3.0
  • 4.2.0
  • 4.1.0
  • 4.0.0
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.4.0
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.6.0
  • 1.5.0
  • 1.4.1
  • 1.4.0
  • 1.3.1
  • 1.3.0
  • 1.2.6
  • 1.2.5
  • 1.2.4
  • 1.2.3
  • 1.2.2
  • 1.2.1
  • 1.2.0
  • 1.1.0
  • 1.0.0
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Jan 27th 2025
This version is compatible with:
  • Puppet Enterprise 2025.3.x, 2025.2.x, 2025.1.x, 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , , , , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppetlabs-java_ks', '5.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-java_ks
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-java_ks --version 5.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppetlabs/java_ks — version 5.1.1 Jan 27th 2025

Reference

Table of Contents

Classes

Resource types

  • java_ks: Manages the entries in a java keystore, and uses composite namevars to accomplish the same alias spread across multiple target keystores.

Classes

java_ks::config

java_ks configuration

Parameters

The following parameters are available in the java_ks::config class:

params

Data type: Hash

A hash containing the parameters required for the java config.

Default value: {}

Resource types

java_ks

Manages the entries in a java keystore, and uses composite namevars to accomplish the same alias spread across multiple target keystores.

Properties

The following properties are available in the java_ks type.

ensure

Valid values: present, absent, latest

Has three states: present, absent, and latest. Latest will compare the on disk SHA1 fingerprint of the certificate to that in keytool to determine if insync? returns true or false. We redefine insync? for this parameter to accomplish this.

Default value: present

password

The password used to protect the keystore. If private keys are subsequently also protected this password will be used to attempt unlocking. Must be six or more characters in length. Cannot be used together with :password_file, but you must pass at least one of these parameters.

Parameters

The following parameters are available in the java_ks type.

certificate

A file containing a server certificate, followed by zero or more intermediate certificate authorities. All certificates will be placed in the keystore. This will autorequire the specified file.

certificate_content

A string containing a server certificate, followed by zero or more intermediate certificate authorities. All certificates will be placed in the keystore.

chain

The intermediate certificate authorities, if they are to be taken from a file separate from the server certificate. This will autorequire the specified file.

destkeypass

The password used to protect the key in keystore.

keytool_timeout

Timeout for the keytool command in seconds.

Default value: 120

name

namevar

The alias that is used to identify the entry in the keystore. This will be converted to lowercase.

password_fail_reset

Valid values: true, false

If the supplied password does not succeed in unlocking the keystore file, then delete the keystore file and create a new one. Default: false.

Default value: false

password_file

The path to a file containing the password used to protect the keystore. This cannot be used together with :password, but you must pass at least one of these parameters.

path

The search path used for command (keytool, openssl) execution. Paths can be specified as an array or as a '

private_key

If you want an application to be a server and encrypt traffic, you will need a private key. Private key entries in a keystore must be accompanied by a signed certificate for the keytool provider. This parameter allows you to specify the file name containing the private key. This will autorequire the specified file.

private_key_content

If you want an application to be a server and encrypt traffic, you will need a private key. Private key entries in a keystore must be accompanied by a signed certificate for the keytool provider. This parameter allows you to specify the content of the private key.

private_key_type

Valid values: rsa, dsa, ec

The type of the private key. Usually the private key is of type RSA key but it can also be an Elliptic Curve key (EC) or DSA. Valid options: , , . Defaults to

Default value: rsa

provider

The specific backend to use for this java_ks resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform.

source_alias

The source certificate alias

source_password

The source keystore password

storetype

Valid values: jceks, pkcs12, jks

Optional storetype Valid options: , ,

target

namevar

Destination file for the keystore. This will autorequire the parent directory of the file.

trustcacerts

Valid values: true, false

Certificate authorities aren't by default trusted so if you are adding a CA you need to set this to true. Defaults to :false.

Default value: false