node_encrypt::certificates
: Class: node_encrypt::certificates This class distributes public certificates from your CA node to all compile server configurations. It is r
node_decrypt
: Decrypt data with node_encrypt. This is intended to be used as a Deferred function on the agent via the node_encrypted::secret wrapper.node_encrypt
: Encrypt data with node_encrypt.node_encrypt
: This function simply encrypts the String or Sensitive passed to it using the certificate belonging to the client the catalog is being compilenode_encrypt::secret
: This function encrypts a string on the server, and then decrypts it on the agent during catalog application.redact
: This function will modify the catalog during compilation to remove the named parameter from the class from which it was called. For example,
Class: node_encrypt::certificates
This class distributes public certificates from your CA node to all compile server configurations. It is recommended to classify all your server nodes, including the CA, with this class.
It sets up a file mountpoint on the CA node and synchronizes all agent public
certificates to the $ssldir/certs
directory on each compile server. These
certificates can be used to encrypt secrets for agents.
Note: If this class is applied to nodes in a flat hierarchy (i.e., without a primary server), then all agents will have all public certificates synced. This is not a security risk, as public certificates are designed to be shared widely. However, it is something you should be aware of.
Parameters:
[ca_server] If the CA autodetection fails, you can specify the FQDN of the CA server here.
[sort_order]
If you have customized your HOCON-based auth.conf
, set the appropriate sort
order here. The default rule's weight is 500, so this parameter defaults to
300
to ensure that it overrides the default.
The following parameters are available in the node_encrypt::certificates
class:
Data type: Optional[String[1]]
Default value: undef
Data type: Integer
Default value: 300
Type: Ruby 4.x API
Decrypt data with node_encrypt. This is intended to be used as a Deferred function on the agent via the node_encrypted::secret wrapper.
Decrypt data with node_encrypt. This is intended to be used as a Deferred function on the agent via the node_encrypted::secret wrapper.
Returns: Any
Data type: String
Type: Ruby 4.x API
Encrypt data with node_encrypt.
The node_encrypt function.
Returns: Any
Data type: String
The node_encrypt function.
Returns: Any
Data type: Sensitive
Type: Ruby 3.x API
This function simply encrypts the String or Sensitive passed to it using the certificate belonging to the client the catalog is being compiled for.
This function simply encrypts the String or Sensitive passed to it using the certificate belonging to the client the catalog is being compiled for.
Returns: Any
Type: Puppet Language
This function encrypts a string on the server, and then decrypts it on the agent during catalog application.
The node_encrypt::secret function.
Returns: Deferred
Data type: Variant[String, Sensitive[String]]
Type: Ruby 3.x API
This function will modify the catalog during compilation to remove the named
parameter from the class from which it was called. For example, if you wrote a
class named foo
and called redact('bar')
from within that class, then the
catalog would not record the value of bar
that foo
was called with.
class foo($bar) {
# this call will display the proper output, but because it's not a resource
# the string won't exist in the catalog.
notice("Class['foo'] was called with param ${bar}")
# but the catalog won't record what the passed in param was.
redact('bar')
}
class { 'foo':
bar => 'this will not appear in the catalog',
}
Warning: If you use that parameter to declare other classes or resources, then you must take further action to remove the parameter from those declarations!
This takes an optional second parameter of the value to replace the original
parameter declaration with. This parameter is required if the class declares
a type that is not String
for the parameter you're redacting.
This function will modify the catalog during compilation to remove the named
parameter from the class from which it was called. For example, if you wrote a
class named foo
and called redact('bar')
from within that class, then the
catalog would not record the value of bar
that foo
was called with.
class foo($bar) {
# this call will display the proper output, but because it's not a resource
# the string won't exist in the catalog.
notice("Class['foo'] was called with param ${bar}")
# but the catalog won't record what the passed in param was.
redact('bar')
}
class { 'foo':
bar => 'this will not appear in the catalog',
}
Warning: If you use that parameter to declare other classes or resources, then you must take further action to remove the parameter from those declarations!
This takes an optional second parameter of the value to replace the original
parameter declaration with. This parameter is required if the class declares
a type that is not String
for the parameter you're redacting.
Returns: Any