certbot, various: allow various services to read certbot certs

Signed-off-by: Kenton Groombridge <me@concord.sh>
This commit is contained in:
Kenton Groombridge 2021-11-06 21:23:18 -04:00
parent fbadd1ae4f
commit 2d33258db7
6 changed files with 48 additions and 0 deletions

View File

@ -757,6 +757,10 @@ optional_policy(`
calamaris_read_www_files(httpd_t)
')
optional_policy(`
certbot_read_lib(httpd_t)
')
optional_policy(`
clamav_domtrans_clamscan(httpd_t)
')

View File

@ -44,3 +44,23 @@ interface(`certbot_run',`
certbot_domtrans($1)
role $2 types certbot_t;
')
########################################
## <summary>
## Read TLS certificates and keys
## generated by certbot.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`certbot_read_lib',`
gen_require(`
type certbot_lib_t;
')
search_dirs_pattern($1, certbot_lib_t, certbot_lib_t)
read_files_pattern($1, certbot_lib_t, certbot_lib_t)
')

View File

@ -198,6 +198,10 @@ tunable_policy(`use_samba_home_dirs',`
fs_manage_cifs_symlinks(dovecot_t)
')
optional_policy(`
certbot_read_lib(dovecot_t)
')
optional_policy(`
kerberos_manage_host_rcache(dovecot_t)
kerberos_read_keytab(dovecot_t)

View File

@ -182,6 +182,10 @@ tunable_policy(`exim_manage_user_files',`
userdom_manage_user_tmp_files(exim_t)
')
optional_policy(`
certbot_read_lib(exim_t)
')
optional_policy(`
clamav_domtrans_clamscan(exim_t)
clamav_scannable_files(exim_spool_t)

View File

@ -121,6 +121,10 @@ sysnet_read_config(jabberd_t)
userdom_dontaudit_use_unpriv_user_fds(jabberd_t)
userdom_dontaudit_search_user_home_dirs(jabberd_t)
optional_policy(`
certbot_read_lib(jabberd_t)
')
########################################
#
# Router local policy

View File

@ -312,6 +312,10 @@ mta_spec_filetrans_aliases(postfix_master_t, postfix_etc_t, file)
mta_read_sendmail_bin(postfix_master_t)
mta_getattr_spool(postfix_master_t)
optional_policy(`
certbot_read_lib(postfix_master_t)
')
optional_policy(`
cyrus_stream_connect(postfix_master_t)
')
@ -763,6 +767,10 @@ rw_files_pattern(postfix_smtp_t, postfix_spool_maildrop_t, postfix_spool_maildro
corenet_tcp_bind_generic_node(postfix_smtp_t)
optional_policy(`
certbot_read_lib(postfix_smtp_t)
')
optional_policy(`
cyrus_stream_connect(postfix_smtp_t)
')
@ -800,6 +808,10 @@ fs_getattr_all_fs(postfix_smtpd_t)
mta_read_aliases(postfix_smtpd_t)
mta_map_aliases(postfix_smtpd_t)
optional_policy(`
certbot_read_lib(postfix_smtpd_t)
')
optional_policy(`
dbus_send_system_bus(postfix_smtp_t)
dbus_system_bus_client(postfix_smtp_t)