Unable to enable security on elk instance using puppet

I currently have a puppet configuration of the elasticsearch and kibana, however I cannot get security to enable so I can setup users and then enable the logstash. When I enable the securty it still allows me into the UI without prompting and does not restrict any data.. Under management I do not even see a security option to manage users and roles.

class { 'elastic_stack::repo':
version => 7,

}
class { 'elasticsearch':
config => {
'xpack.security.enabled' => true,
}
}
elasticsearch::instance { 'elk-prod01': }

#`
class { 'kibana':
oss => true,
config => {
'server.port' => '8443',
'server.host' => "$hostname",
'server.ssl.certificate' => "/opt/ssl_certs_public/data/$hostname.lib.crt",
'server.ssl.key' => "/opt/ssl_certs_public/data/$hostname.lib.key",
'server.ssl.enabled' => true,
'logging.dest' => '/var/log/kibana/kibana.log',
'elasticsearch.username' => "kibana",
'elasticsearch.password' => "*********",
},
ensure => latest,
}

been doing some digging and it seems elastic search's xpack is disabled still for some reason even though the yaml says to enable it.

I figured out the cause the elastic/elasticsearch puppet module is not placing the elasticserarch.yml file in /etc/elsaticsearch, but in the subdirectory . The service does not appear to be using the proper instance file.

To finish this up I had to add

security_plugin => 'x-pack',

to the elasticsearch class. Sorry for the post.

Hey @Thaylin, welcome to the discussion boards.

Thanks for following up with your solution! This will help others in the future who might come across this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.