bdangit / chef-influxdb

A cookbook for InfluxDB, a time-series database (influxdb.org)
MIT License
54 stars 83 forks source link

Activate http-auth security #163

Closed Lechucico closed 7 years ago

Lechucico commented 7 years ago

I would like to know how to set auth-enabled = true. I've created an admin and user but I can still bypass authentication for accessing databases.

How I can make authentication mandatory?

Lechucico commented 7 years ago

Solved executing this on my own recipe:

node.override['influxdb']['config']['http']['auth-enabled'] = true

influxdb_config node['influxdb']['config_file_path'] do
  config node['influxdb']['config']
  notifies :restart, 'service[influxdb]', :delayed
end
bdangit commented 7 years ago

hey @Lechucico. Yes, that is a way to do it. If you look in one of our Test-Kitchen setups, we do show how you can modify the config file by doing what you just did.

https://github.com/bdangit/chef-influxdb/blob/master/test/fixtures/cookbooks/influxdb-test/recipes/config_change.rb#L1-L9