【发布时间】:2018-02-09 16:47:09
【问题描述】:
我目前正在 puppet 中设置反向代理,以便我可以使用 Active Directory 进行身份验证。
我的 puppet 模块中有以下内容。
class { 'apache::mod::ldap' :}
class { 'apache::mod::authnz_ldap' :}
apache::vhost { 'reverse-proxy':
port => '443',
docroot => '/var/www/html',
ssl => true,
ssl_cert => '/etc/httpd/ssl/cert.crt',
ssl_key => '/etc/httpd/ssl/cert.key',
require => [ File['/etc/httpd/ssl/cert.crt'], File['/etc/httpd/ssl/cert.key']],
rewrites => [
{
comment => 'Eliminate Trace and Track',
rewrite_cond => ['%{REQUEST_METHOD} ^(TRACE|TRACK)'],
rewrite_rule => [' .* - [F]'],
},
],
proxy_preserve_host => true,
proxy_pass => {
path => '/',
url => 'http://127.0.0.1:5601/',
},
directories => [
{
path => '/',
provider => 'location',
auth_name => 'Kibana Authentication',
auth_type => 'Basic',
auth_basic_provider => 'ldap',
auth_ldap_bind_dn => 'cn=serviceuser,ou=Users,dc=example,dc=com',
auth_ldap_bind_password => 'supersecretpassword',
auth_ldap_url => 'ldaps://ldap.example.com/dc=example,dc=com?CN?
sub?(objectClass=user)',
require => 'ldap-group
cn=application_users,ou=application_groups,ou=groups,dc=example,dc=com',
},
],
}
我遇到的问题是,当我将此配置应用于我的 apache 服务器时,auth_ldap_bind_dn、auth_ldap_bind_password 和 auth_ldap_url 没有被复制。 Puppet 没有抛出任何错误并且 apache 运行良好,但它没有针对 LDAP 进行身份验证。
【问题讨论】:
-
请添加您正在使用的 Puppet Master、Puppet 代理和 Puppet Apache 模块的版本。
标签: linux apache puppet httpd.conf