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

Primary Selinux policy for tendrl #261

Merged
merged 6 commits into from
Sep 14, 2017

Conversation

TimothyAsirJeyasing
Copy link
Contributor

@TimothyAsirJeyasing TimothyAsirJeyasing commented Sep 7, 2017

Initial selinux policy for tendrl server to run in permissive domain
This provides the following features:

  • Allows tendrl processes to run in permissive mode
  • Perform checks but will not enforce
  • Users don't have to switch to permissive mode globally
  • Allows to catch AVC messages

tendrl-bug-id: #279
Signed-off-by: Timothy Asir J [email protected]

@TimothyAsirJeyasing
Copy link
Contributor Author

This will provide selinux-carbon and tendrl-server-selinux packages

@r0h4n , @nthomas-redhat , @shtripat , Please review

@TimothyAsirJeyasing
Copy link
Contributor Author

@lukas Vrabec [email protected] Please review

type tendrl_unit_file_t;
systemd_unit_file(tendrl_unit_file_t)

type collectd_conf_t;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type definition should be in collectd SELinux module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not have a separate policy for collectd.
Do you want to keep collectd in a separate policy?
Please suggest

allow collectd_t collectd_conf_t:dir manage_dir_perms;
allow collectd_t self:capability { setuid chown sys_resource audit_write };
allow collectd_t self:unix_stream_socket { connectto };
allow dmidecode_t collectd_t:fifo_file { getattr open read };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This twho rules should be fixed in dmidecote SELinux security module

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, i will remove it from here!

')

optional_policy(`
tendrl_stub_collectd()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to stub collectd module here, you cna use collectd intrafaces and in rules where collectd_t is source context, this should be in collectd SELinux module

tendrl-api.spec Outdated
%{buildroot}%{_datadir}/selinux/packages

%post -n tendrl-server-selinux
%_format MODULE %{_datadir}/selinux/packages/tendrl.pp.bz2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have SELinux policy macros for this changes in post install phase. For more info see: https://fedoraproject.org/wiki/SELinux/IndependentPolicy#The_.25post_Section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, Thank you, i will use those macros

@@ -11,5 +11,3 @@
/var/log/carbon(/.*)? gen_context(system_u:object_r:carbon_log_t,s0)

/var/run/carbon-(aggregator|cache)\.pid gen_context(system_u:object_r:carbon_var_run_t,s0)

/var/log/graphite-web(/.*)? gen_context(system_u:object_r:httpd_log_t,s0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

griphite_web should have graphite_log_t SELinux context

@wrabcak
Copy link

wrabcak commented Sep 12, 2017

SELinux review done.

nthomas-redhat
nthomas-redhat previously approved these changes Sep 14, 2017
@nthomas-redhat
Copy link
Contributor

nthomas-redhat commented Sep 14, 2017

Please link with git issue so that we can merge this. @TimothyAsir

Initial selinux policy for tendrl server to run in permissive domain
This provides the following features:
   - Allows tendrl processes to run in permissive mode
   - Perform checks but will not enforce
   - Users don't have to switch to permissive mode globally
   - Allows to catch AVC messages

Signed-off-by: Timothy Asir J <[email protected]>
Initial selinux policy for tendrl server to run in permissive domain
This provides the following features:
 - Allows tendrl processes to run in permissive mode
 - Perform checks but will not enforce
 - Users don't have to switch to permissive mode globally
 - Allows to catch AVC messages

Signed-off-by: Timothy Asir J <[email protected]>
Initial selinux policy for tendrl server to run in permissive domain
This provides selinux permissive policies for tendrl-server,
grafana and carbon with the following features:
  - Allows tendrl processes to run in permissive mode
  - Perform checks but will not enforce
  - Users don't have to switch to permissive mode globally
  - Allows to catch AVC messages

Signed-off-by: Timothy Asir J <[email protected]>
Initial selinux policy for tendrl server to run in permissive domain
This provides selinux permissive policies for tendrl-server,
grafana and carbon with the following features:
   - Allows tendrl processes to run in permissive mode
   - Perform checks but will not enforce
   - Users don't have to switch to permissive mode globally
   - Allows to catch AVC messages

Signed-off-by: Timothy Asir J <[email protected]>
Initial selinux policy for tendrl server to run in permissive domain
This provides selinux permissive policies for tendrl-server,
grafana and carbon with the following features:
 - Allows tendrl processes to run in permissive mode
 - Perform checks but will not enforce
 - Users don't have to switch to permissive mode globally
 - Allows to catch AVC messages

Signed-off-by: Lukas Vrabec <[email protected]>
Signed-off-by: Timothy Asir J <[email protected]>
Initial selinux policy for tendrl server to run in permissive domain
This provides selinux permissive policies for tendrl-server,
grafana and carbon with the following features:
  - Allows tendrl processes to run in permissive mode
  - Perform checks but will not enforce
  - Users don't have to switch to permissive mode globally
  - Allows to catch AVC messages

Signed-off-by: Lukas Vrabec <[email protected]>
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants