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

Splunk as non-root user by default for UNIX systems. #159

Open
JeremieBethmont opened this issue Oct 29, 2017 · 2 comments
Open

Splunk as non-root user by default for UNIX systems. #159

JeremieBethmont opened this issue Oct 29, 2017 · 2 comments
Labels
enhancement New feature or request

Comments

@JeremieBethmont
Copy link

JeremieBethmont commented Oct 29, 2017

This is an enhancement request.
As part of Splunk Enterprise best practices Splunk should run as 'non-root user'. See official splunk documentation http://docs.splunk.com/Documentation/Splunk/7.0.0/Installation/RunSplunkasadifferentornon-rootuser

Code involved: ~/puppet-splunk/manifests/params.pp

 } else {
    $forwarder_dir = pick($forwarder_installdir, '/opt/splunkforwarder')
    $server_dir    = pick($server_installdir, '/opt/splunk')
    $splunk_user   = 'root'
  }

What are you seeing

splunk runs as "root" user by default. Which is against splunk best practices.

What behaviour did you expect instead

The module should create a non-root user (i.e "splunk" user) and run splunk as it.

@TraGicCode
Copy link
Contributor

Hey @jbethmont ,
Thanks for the enhancement request. Here are a couple things we need to figure out first.

1.) What is the default chosen/selected user for splunk when fresh installed. If this is wrong we should get this fixed up. If the default user on fresh install is not based on splunk best practices I would argue that this should be left alone. I would think the scenario your describing is for advanced users and might be too restrictive for regular users to figure out.

@JeremieBethmont
Copy link
Author

@TraGicCode The default user on a fresh install is the user that owns the splunk directory and is used to launch the splunk process. So technically it could be any user. But Splunk has the ability to run scripts as scripted inputs on the system. So for security best practices we don't want Splunk to run as root.

I would recommend then that the module creates a "splunk" user by default that will own the directory and run splunk processes. But definitely not "root" by default".

And for the module not to be "too restrictive", the user should be able to override the 'splunk_user' value.

@juniorsysadmin juniorsysadmin added the enhancement New feature or request label Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants