Skip to content

Commit ae649f9

Browse files
committed
Packaging: Remove world read perms from st2.conf
When testing the packages, we should discover any non-root processes that rely on access to st2.conf. Hopefully giving them access will be as simple as switching the group to ST2_SVC_USER. Otherwise, we might need to revert this change and make st2.conf world readable. Also note that ST2 now supports passing secrets in env vars. So, people could theoretically include the secrets in systemd conf files that are only accessible by root. If any utils, like st2ctl, need access to those secrets, however, they will need to get them from somewhere else if they are not in st2.conf.
1 parent 1ad65e4 commit ae649f9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

conf/BUILD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ nfpm_content_files(
9494
file_group="root",
9595
file_mode="rw-r--r--",
9696
overrides={
97+
"/etc/st2/st2.conf": dict(
98+
# st2.conf typically contains secrets, so it is not world readable.
99+
file_mode="rw-r-----", # NOTE: Packaging used to install this world readable.
100+
# TODO: Maybe set file_group=ST2_SVC_USER if a non-root process needs access.
101+
),
97102
"/etc/st2/htpasswd": dict(
98103
file_owner=ST2_SVC_USER,
99104
file_group=ST2_SVC_USER,

0 commit comments

Comments
 (0)