Security

How do I create Splunk users with Chef?

aaronclementsny
New Member

How do I provision Splunk user accounts with Chef? Is this even possible?

Tags (2)
0 Karma

kamal2222ahmed
Explorer
group node['splunk']['user']['username'] do
  gid node['splunk']['user']['uid'].to_i 
  system true if %w(linux).include?(node['os'])
end

user node['splunk']['user']['username'] do
  comment node['splunk']['user']['comment']
  shell node['splunk']['user']['shell']
  gid node['splunk']['user']['username']
  uid node['splunk']['user']['uid']
  home node['splunk']['user']['home']
  system true if %w(linux).include?(node['os'])
end
0 Karma

Damien_Dallimor
Ultra Champion

Not a direct answer to your question , but it made me think of these Splunk Chef Recipes on Github that may come in handy for you : https://github.com/bestbuycom/splunk_cookbook

0 Karma

grijhwani
Motivator

How depends very much on how you control authentication and authorisation.

If you use some form of network-based authentication/authorisation (LDAP against a slapd server or Microsoft AD, for instance), then you need to target your updates to those services.

How do you go about adding users/roles presently?

0 Karma

sowings
Splunk Employee
Splunk Employee

If chef can execute scripts on your behalf, there's always splunk add user from the CLI. When I worked on a Splunk OEM before, that's what we did.

aaronclementsny
New Member

They are currently added manually. We'd like to avoid the LDAP option as we control access to our servers with chef. It would be great if we could control user-creation with Chef. However if Splunk isn't built for it, I'll back off before wasting too much time.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...