Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDM supports disabling authentication. #77

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The following parameters are available in the `hdm` class:
* [`group`](#-hdm--group)
* [`puppetdb_settings`](#-hdm--puppetdb_settings)
* [`puppet_code_dir`](#-hdm--puppet_code_dir)
* [`disable_authentication`](#-hdm--disable_authentication)
* [`allow_encryption`](#-hdm--allow_encryption)
* [`read_only`](#-hdm--read_only)
* [`git_data`](#-hdm--git_data)
Expand Down Expand Up @@ -232,6 +233,15 @@ defaults to '/etc/puppetlabs/code'

Default value: `'/etc/puppetlabs/code'`

##### <a name="-hdm--disable_authentication"></a>`disable_authentication`

Data type: `Boolean`

Disable user and login
This makes HDM available to anyone.

Default value: `false`

##### <a name="-hdm--allow_encryption"></a>`allow_encryption`

Data type: `Boolean`
Expand Down
14 changes: 9 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
# Puppet environments (similar to puppet config code_dir)
# defaults to '/etc/puppetlabs/code'
#
# @param disable_authentication Disable user and login
# This makes HDM available to anyone.
#
# @param allow_encryption Specify if HDM should use EYAML
# Needs HDM access to EYAML keys (public and private)
# Values for keys are taken from hiera.yaml file and can
Expand Down Expand Up @@ -142,11 +145,12 @@
Stdlib::Unixpath $puppet_code_dir = '/etc/puppetlabs/code',
String[1] $hdm_hiera_config_file = 'hiera.yaml',
# additional application parameter
Boolean $allow_encryption = false,
Boolean $read_only = true,
Optional[Hdm::Gitdata] $git_data = undef,
Optional[Hdm::Ldap_settings] $ldap_settings = undef,
Optional[Sensitive[String[1]]] $ldap_bind_dn_password = undef,
Boolean $disable_authentication = false,
Boolean $allow_encryption = false,
Boolean $read_only = true,
Optional[Hdm::Gitdata] $git_data = undef,
Optional[Hdm::Ldap_settings] $ldap_settings = undef,
Optional[Sensitive[String[1]]] $ldap_bind_dn_password = undef,
) {
if $ldap_settings {
if $ldap_bind_dn_password {
Expand Down
1 change: 1 addition & 0 deletions templates/hdm.yml.epp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<%- } -%>
hiera_config_file: "<%= $hdm::hdm_hiera_config_file %>"
config_dir: <%= $hdm::puppet_code_dir %>
authentication_disabled: <%= $hdm::disable_authentication %>
<%- if ! $hdm::final_ldap_settings.empty { -%>
ldap:
<%- $hdm::final_ldap_settings.each |$key, $value| { -%>
Expand Down