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

Enable support for mod_authnz_ldap #356

Merged
merged 1 commit into from
Oct 21, 2013
Merged

Enable support for mod_authnz_ldap #356

merged 1 commit into from
Oct 21, 2013

Conversation

jbartko
Copy link
Contributor

@jbartko jbartko commented Sep 9, 2013

fixes puppetlabs/puppetlabs-apache/#355

fixes puppetlabs/puppetlabs-apache/#355
@jbartko
Copy link
Contributor Author

jbartko commented Sep 9, 2013

This adds support for mod_authnz_ldap with the ability to template custom global LDAP directives for performance tuning and PKI.

It's intended that Location- or Directory-level LDAP configuration is configured via apache::vhost's custom_fragment parameter as in the following:

node 'foo.example.com' {
  apache::vhost { "foo.example.com":
    ...
    custom_fragment => template('apache/custom_ldap_fragment.erb'),
    ...
  }
}

The template itself may look something like:

<Location />
  AuthType Basic
  AuthName "Authorization Required"
  AuthBasicProvider ldap
  AuthLDAPBindDN "CN=ldap-bind-account,OU=example.com service accounts,DC=ad,DC=example,DC=com"
  AuthLDAPBindPassword "SuperSecretBindPassword"
  AuthLDAPUrl ldaps://ad.example.com:3269/DC=com?sAMAccountName?sub?(objectClass=*)
  Require ldap-group CN=some-ldap-group,OU=Groups,DC=ad,DC=example,DC=com
</Location>

@@ -0,0 +1 @@
LDAPVerifyServerCert off
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a bad choice. Why would you make this a default?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Active Directory :P

Copy link
Contributor

Choose a reason for hiding this comment

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

That excuse sounds like you don't understand how TLS works. It's not Active Directory's fault that you aren't validating its certificate. Active Directory (unfortunately) often provides its own CA, feeding that CA's chain to your (ldap library's) SSL store will enable you to validate the cert.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have to agree. "Insecure by default" is not a great design goal.

@igalic
Copy link
Contributor

igalic commented Sep 27, 2013

If somehow possible could you add rspec and/or rspec system tests for this feature?

@hunner hunner merged commit f8a3dd6 into puppetlabs:master Oct 21, 2013
@igalic igalic mentioned this pull request Oct 22, 2013
traylenator pushed a commit to traylenator/puppetlabs-apache that referenced this pull request Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants