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

Send credentials via environment variables. Support DNS forwarders without DNSSEC. Support latest version of BIND. #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fraajad
Copy link

@fraajad fraajad commented Dec 20, 2017

Hello,

This pull request does three things.

  1. Sends admin and ldap user credentials via environment variables to prevent them from showing up in the Salt master/minion logs.

  2. Supports DNS forwarders without DNSSEC. The use case is using the Amazon forwarders.

  3. Updates named.conf to use the new dyndb parameter which is used in the latest version of BIND.

Best,
Doug

…thout DNSSEC. Support latest version of BIND.
Copy link
Member

@epcim epcim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add formula testing, at bets in separate commit that we merge first:
https://salt-formulas.readthedocs.io/en/latest/develop/index.html#testing

(an example is in every other formula, See last line in README on here for info how to easily add tests: https://github.com/salt-formulas/salt-formulas-cookiecutter/tree/master/salt-formula)

@@ -25,13 +25,15 @@ freeipa_server_pkgs:
ldap_secure_binds:
cmd.run:
- name: |
Copy link
Member

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.

Copy link
Contributor

@jdshewey jdshewey Jan 5, 2018

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.

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arg "sasl_mech GSSAPI";
arg "sasl_user DNS/{{ hostname }}";
arg "serial_autoincrement yes";
dyndb "ipa" "/usr/lib64/bind/ldap.so" {
Copy link
Member

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

@fraajad
Copy link
Author

fraajad commented Jan 4, 2018

Thanks, I will take a look at your docs on using test kitchen.

# Conflicts:
#	freeipa/files/named.conf
#	freeipa/server/common.sls
#	freeipa/server/master.sls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants