-
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
Open
fraajad
wants to merge
4
commits into
salt-formulas:master
Choose a base branch
from
fraajad:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | ||
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.get('minssf', 0) }} | ||
EOF | ||
- unless: "ldapsearch -h localhost -D 'cn=directory manager' -w {{ server.ldap.password }} -b 'cn=config' -Z | grep 'nsslapd-minssf: {{ server.ldap.get('minssf', 0) }}'" | ||
- 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
you may use:
output_loglevel: quiet
, but ENV looks better, as you still get the output and log's are not full of sensitive passwords.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 comment
The 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.