-
Notifications
You must be signed in to change notification settings - Fork 34
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
Send credentials via environment variables. Support DNS forwarders without DNSSEC. Support latest version of BIND. #6
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ freeipa_server_pkgs: | |
file.managed: | ||
- contents: {{ server.ldap.password }} | ||
- mode: 640 | ||
- owner: root | ||
- user: root | ||
{%- if pillar.get('sensu', {}).get('client', {}).get('enabled', False) %} | ||
- group: sensu | ||
- require: | ||
|
@@ -25,13 +25,15 @@ freeipa_server_pkgs: | |
ldap_secure_binds: | ||
cmd.run: | ||
- name: | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you may use: the person who executes the command may any time get the pillar data and get the clear text password. I agree that this doesn't have a better solution, unless: saltstack/salt#26236 comes with kind of obfuscate solution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to also remember that this is a ONE TIME password. As soon as it is used, it is no longer valuable or sensitive. For it to be useful, you would need to have A) used the same OTP on multiple hosts or B) successfully snarf this from salt and then beat the FreeIPA installer to registration between OTP generation in salt and the host creation and the free-ipa-install registration or fail a run and take the place of that host. But either way, I like this change. |
||
ldapmodify -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -Z << EOF | ||
ldapmodify -h localhost -D 'cn=directory manager' -w "$FREEIPA_LDAP_PASSWORD" -Z << EOF | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
dn: cn=config | ||
changetype: modify | ||
replace: nsslapd-minssf | ||
nsslapd-minssf: {{ server.ldap.minssf }} | ||
EOF | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -b 'cn=config' -Z | grep 'nsslapd-minssf: {{ server.ldap.minssf }}'" | ||
- env: | ||
- FREEIPA_LDAP_PASSWORD: {{ server.ldap.password }} | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w \"$FREEIPA_LDAP_PASSWORD\" -b 'cn=config' -Z | grep 'nsslapd-minssf: {{ server.ldap.get('minssf', 0) }}'" | ||
- require: | ||
- cmd: freeipa_server_install | ||
- file: ldap_conf | ||
|
@@ -40,13 +42,15 @@ ldap_secure_binds: | |
ldap_logs_audit: | ||
cmd.run: | ||
- name: | | ||
ldapmodify -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -Z << EOF | ||
ldapmodify -h localhost -D 'cn=directory manager' -w "$FREEIPA_LDAP_PASSWORD" -Z << EOF | ||
dn: cn=config | ||
changetype: modify | ||
replace: nsslapd-auditlog-logging-enabled | ||
nsslapd-auditlog-logging-enabled: {% if server.ldap.logging.audit %}on{% else %}off{% endif %} | ||
EOF | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -b 'cn=config' -Z | grep 'nsslapd-auditlog-logging-enabled: {% if server.ldap.logging.audit %}on{% else %}off{% endif %}'" | ||
- env: | ||
- FREEIPA_LDAP_PASSWORD: {{ server.ldap.password }} | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w \"$FREEIPA_LDAP_PASSWORD\" -b 'cn=config' -Z | grep 'nsslapd-auditlog-logging-enabled: {% if server.ldap.logging.audit %}on{% else %}off{% endif %}'" | ||
- require: | ||
- cmd: freeipa_server_install | ||
- file: ldap_conf | ||
|
@@ -56,13 +60,15 @@ ldap_logs_audit: | |
ldap_logs_access: | ||
cmd.run: | ||
- name: | | ||
ldapmodify -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -Z << EOF | ||
ldapmodify -h localhost -D 'cn=directory manager' -w "$FREEIPA_LDAP_PASSWORD" -Z << EOF | ||
dn: cn=config | ||
changetype: modify | ||
replace: nsslapd-accesslog-logging-enabled | ||
nsslapd-accesslog-logging-enabled: {% if server.ldap.logging.access %}on{% else %}off{% endif %} | ||
EOF | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -b 'cn=config' -Z | grep 'nsslapd-accesslog-logging-enabled: {% if server.ldap.logging.access %}on{% else %}off{% endif %}'" | ||
- env: | ||
- FREEIPA_LDAP_PASSWORD: {{ server.ldap.password }} | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w \"$FREEIPA_LDAP_PASSWORD\" -b 'cn=config' -Z | grep 'nsslapd-accesslog-logging-enabled: {% if server.ldap.logging.access %}on{% else %}off{% endif %}'" | ||
- require: | ||
- cmd: freeipa_server_install | ||
- file: ldap_conf | ||
|
@@ -72,13 +78,15 @@ ldap_logs_access: | |
ldap_disable_anonymous: | ||
cmd.run: | ||
- name: | | ||
ldapmodify -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -Z << EOF | ||
ldapmodify -h localhost -D 'cn=directory manager' -w "$FREEIPA_LDAP_PASSWORD" -Z << EOF | ||
dn: cn=config | ||
changetype: modify | ||
replace: nsslapd-allow-anonymous-access | ||
nsslapd-allow-anonymous-access: off | ||
EOF | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -b 'cn=config' -Z | grep 'nsslapd-allow-anonymous-access: off'" | ||
- env: | ||
- FREEIPA_LDAP_PASSWORD: {{ server.ldap.password }} | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w \"$FREEIPA_LDAP_PASSWORD\" -b 'cn=config' -Z | grep 'nsslapd-allow-anonymous-access: off'" | ||
- require: | ||
- cmd: freeipa_server_install | ||
- file: ldap_conf | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to me bit hardcoded, store it on the map.jinja with other defaults