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

API daemon should run under non root user #115

Open
mkudlej opened this issue Mar 27, 2017 · 4 comments
Open

API daemon should run under non root user #115

mkudlej opened this issue Mar 27, 2017 · 4 comments

Comments

@mkudlej
Copy link

mkudlej commented Mar 27, 2017

I think that Tendrl API daemon should run under non root user because API communicates only with clients and ETCD via HTTP API.

@mkudlej mkudlej changed the title API daemon should run under non root unser API daemon should run under non root user Mar 31, 2017
@brainfunked
Copy link
Contributor

brainfunked commented Apr 19, 2017

@TimothyAsir here's what needs to be done in the spec file:

%global name tendrl-api
%global app_group %{name}
%global app_user %{name}
%global install_dir %{_datadir}/%{name}
%global config_dir %{_sysconfdir}/tendrl
%global config_file %{config_dir}/etcd.yml

%pre
getent group %{app_group} > /dev/null || \
  groupadd -r %{app_group}
getent passwd %{app_user} > /dev/null || \
  useradd -r -d %{install_dir} -M -g %{app_group} \
    -s /sbin/nologin %{app_user}

%files
%config %attr(0640, root, %{app_group}) %{config_file}

You'll also need to update the systemd service file to start the process as the tendrl-api user and group.

No other changes should be required anywhere else.

@anivargi
Copy link
Contributor

@TimothyAsir what is the updated on this?

TimothyAsirJeyasing added a commit to TimothyAsirJeyasing/tendrl-api that referenced this issue May 25, 2017
@r0h4n
Copy link
Contributor

r0h4n commented Aug 8, 2017

@TimothyAsirJeyasing Are you done with this issue?

@TimothyAsirJeyasing
Copy link
Contributor

@r0h4n Sure, The patch already exists at #188. I will send to master branch

TimothyAsirJeyasing added a commit to TimothyAsirJeyasing/tendrl-api that referenced this issue Nov 9, 2017
tendrl-bug-id: Tendrl#115

Signed-off-by: Timothy Asir J <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants