Skip to content

Commit

Permalink
feat: add PAM auth support directors.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
adf-patrickha committed Nov 7, 2024
1 parent fcd9013 commit a45cc9b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ argument_specs:
allowed_cns:
type: "str"
description: "Allowed common names"
pam_console_name:
type: "str"
description: >
Name of Bareos Console to use for PAM authentication.
See: https://github.com/bareos/bareos/tree/master/contrib/misc/bareos_pam_integration#bareos-pam-integration
pam_console_password:
type: "str"
description: >
Password of Bareos Console to use for PAM authentication.
See: https://github.com/bareos/bareos/tree/master/contrib/misc/bareos_pam_integration#bareos-pam-integration
bareos_webui_configuration:
type: "list"
Expand Down
2 changes: 2 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
ca_file: "{{ bareos_webui_tls_ca_cert_dest }}"
cert_file: "{{ bareos_webui_tls_cert_chain_dest }}"
allowed_cns: bareos.example.com
pam_console_name: webui-pam
pam_console_password: MySecretPAMPassword

# TLS connection to director
bareos_webui_tls_enable: true
Expand Down
4 changes: 4 additions & 0 deletions templates/directors.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ cert_file_passphrase = "{{ director.cert_file_passphrase }}"
; Allowed common names
allowed_cns = "{{ director.allowed_cns }}"
{% endif %}
{% if director.pam_console_name is defined and director.pam_console_password is defined %}
pam_console_name = "{{ director.pam_console_name }}"
pam_console_password = "{{ director.pam_console_password }}"
{% endif %}

{% endif %}
{% endfor %}

0 comments on commit a45cc9b

Please sign in to comment.