-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
1 parent
ff298f9
commit b204cbd
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/etc/grafana(/.*)? gen_context(system_u:object_r:grafana_conf_t,s0) | ||
|
||
/usr/sbin/grafana-server -- gen_context(system_u:object_r:grafana_exec_t,s0) | ||
|
||
/usr/lib/systemd/system/grafana-server.* -- gen_context(system_u:object_r:grafana_unit_file_t,s0) | ||
|
||
/var/lib/grafana(/.*)? gen_context(system_u:object_r:grafana_var_lib_t,s0) | ||
|
||
/var/log/grafana(/.*)? gen_context(system_u:object_r:grafana_log_t,s0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
policy_module(grafana, 1.0.0) | ||
|
||
######################################## | ||
# | ||
# Declarations | ||
# | ||
|
||
type grafana_t; | ||
type grafana_exec_t; | ||
init_daemon_domain(grafana_t, grafana_exec_t) | ||
|
||
type grafana_conf_t; | ||
files_config_file(grafana_conf_t) | ||
|
||
type grafana_log_t; | ||
logging_log_file(grafana_log_t) | ||
|
||
type grafana_var_lib_t; | ||
files_type(grafana_var_lib_t) | ||
|
||
type grafana_var_run_t; | ||
files_pid_file(grafana_var_run_t) | ||
|
||
type grafana_unit_file_t; | ||
systemd_unit_file(grafana_unit_file_t) | ||
|
||
permissive grafana_t; | ||
|
||
######################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
######################################## | ||
## <summary> | ||
## Allow the specified domain to read | ||
## tendrl configuration files. | ||
## </summary> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed access. | ||
## </summary> | ||
## </param> | ||
## <rolecap/> | ||
# | ||
interface(`tendrl_read_config',` | ||
gen_require(` | ||
type tendrl_conf_t; | ||
') | ||
|
||
read_files_pattern($1, tendrl_conf_t, tendrl_conf_t) | ||
') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters