## Jetty - HTTP server and Servlet container ######################################## ## ## Execute jetty_exec_t in the jetty domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`jetty_domtrans',` gen_require(` type jetty_t, jetty_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, jetty_exec_t, jetty_t) ') ###################################### ## ## Execute jetty in the caller domain. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_exec',` gen_require(` type jetty_exec_t; ') corecmd_search_bin($1) can_exec($1, jetty_exec_t) ') ######################################## ## ## Search jetty cache directories. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_search_cache',` gen_require(` type jetty_cache_t; ') allow $1 jetty_cache_t:dir search_dir_perms; files_search_var($1) ') ######################################## ## ## Read jetty cache files. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_read_cache_files',` gen_require(` type jetty_cache_t; ') files_search_var($1) read_files_pattern($1, jetty_cache_t, jetty_cache_t) ') ######################################## ## ## Create, read, write, and delete ## jetty cache files. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_manage_cache_files',` gen_require(` type jetty_cache_t; ') files_search_var($1) manage_files_pattern($1, jetty_cache_t, jetty_cache_t) ') ######################################## ## ## Manage jetty cache dirs. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_manage_cache_dirs',` gen_require(` type jetty_cache_t; ') files_search_var($1) manage_dirs_pattern($1, jetty_cache_t, jetty_cache_t) ') ######################################## ## ## Read jetty's log files. ## ## ## ## Domain allowed access. ## ## ## # interface(`jetty_read_log',` gen_require(` type jetty_log_t; ') logging_search_logs($1) read_files_pattern($1, jetty_log_t, jetty_log_t) ') ######################################## ## ## Append to jetty log files. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_append_log',` gen_require(` type jetty_log_t; ') logging_search_logs($1) append_files_pattern($1, jetty_log_t, jetty_log_t) ') ######################################## ## ## Manage jetty log files ## ## ## ## Domain allowed access. ## ## # interface(`jetty_manage_log',` gen_require(` type jetty_log_t; ') logging_search_logs($1) manage_dirs_pattern($1, jetty_log_t, jetty_log_t) manage_files_pattern($1, jetty_log_t, jetty_log_t) manage_lnk_files_pattern($1, jetty_log_t, jetty_log_t) ') ######################################## ## ## Do not audit attempts to read, ## jetty tmp files ## ## ## ## Domain to not audit. ## ## # interface(`jetty_dontaudit_read_tmp_files',` gen_require(` type jetty_tmp_t; ') dontaudit $1 jetty_tmp_t:file read_file_perms; ') ######################################## ## ## Read jetty tmp files ## ## ## ## Domain allowed access. ## ## # interface(`jetty_read_tmp_files',` gen_require(` type jetty_tmp_t; ') files_search_tmp($1) read_files_pattern($1, jetty_tmp_t, jetty_tmp_t) ') ######################################## ## ## Manage jetty tmp files ## ## ## ## Domain allowed access. ## ## # interface(`jetty_manage_tmp',` gen_require(` type jetty_tmp_t; ') files_search_tmp($1) manage_dirs_pattern($1, jetty_tmp_t, jetty_tmp_t) manage_files_pattern($1, jetty_tmp_t, jetty_tmp_t) manage_lnk_files_pattern($1, jetty_tmp_t, jetty_tmp_t) ') ######################################## ## ## Search jetty lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_search_lib',` gen_require(` type jetty_var_lib_t; ') allow $1 jetty_var_lib_t:dir search_dir_perms; files_search_var_lib($1) ') ######################################## ## ## Read jetty lib files. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_read_lib_files',` gen_require(` type jetty_var_lib_t; ') files_search_var_lib($1) read_files_pattern($1, jetty_var_lib_t, jetty_var_lib_t) ') ######################################## ## ## Manage jetty lib files. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_manage_lib_files',` gen_require(` type jetty_var_lib_t; ') files_search_var_lib($1) manage_files_pattern($1, jetty_var_lib_t, jetty_var_lib_t) ') ######################################## ## ## Manage jetty lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_manage_lib_dirs',` gen_require(` type jetty_var_lib_t; ') files_search_var_lib($1) manage_dirs_pattern($1, jetty_var_lib_t, jetty_var_lib_t) ') ######################################## ## ## Read jetty PID files. ## ## ## ## Domain allowed access. ## ## # interface(`jetty_read_pid_files',` gen_require(` type jetty_var_run_t; ') files_search_pids($1) read_files_pattern($1, jetty_var_run_t, jetty_var_run_t) ') ######################################## ## ## Execute jetty server in the jetty domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`jetty_systemctl',` gen_require(` type jetty_t; type jetty_unit_file_t; ') systemd_exec_systemctl($1) systemd_read_fifo_file_passwd_run($1) allow $1 jetty_unit_file_t:file read_file_perms; allow $1 jetty_unit_file_t:service manage_service_perms; ps_process_pattern($1, jetty_t) ') ######################################## ## ## All of the rules required to administrate ## an jetty environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## ## # interface(`jetty_admin',` gen_require(` type jetty_t; type jetty_cache_t; type jetty_log_t; type jetty_tmp_t; type jetty_var_lib_t; type jetty_var_run_t; type jetty_unit_file_t; ') allow $1 jetty_t:process { signal_perms }; ps_process_pattern($1, jetty_t) tunable_policy(`deny_ptrace',`',` allow $1 jetty_t:process ptrace; ') files_search_var($1) admin_pattern($1, jetty_cache_t) logging_search_logs($1) admin_pattern($1, jetty_log_t) files_search_tmp($1) admin_pattern($1, jetty_tmp_t) files_search_var_lib($1) admin_pattern($1, jetty_var_lib_t) files_search_pids($1) admin_pattern($1, jetty_var_run_t) jetty_systemctl($1) admin_pattern($1, jetty_unit_file_t) allow $1 jetty_unit_file_t:service all_service_perms; optional_policy(` systemd_passwd_agent_exec($1) systemd_read_fifo_file_passwd_run($1) ') ')