-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supply service & busconfig ACLs from the repo.
This change required as a part of privilege separation work: openbmc/openbmc#3383 Dependant meta-phosphor change: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/41430 Signed-off-by: Anton D. Kachalov <[email protected]> Change-Id: Ic0b1b57f8a088defe096f1ab793efa1f015ca5be
- Loading branch information
Showing
11 changed files
with
132 additions
and
8 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
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
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
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,44 @@ | ||
certmgrenvdir=$(datadir)/phosphor-certificate-manager | ||
|
||
dbuspolicy_DATA = | ||
certmgrenv_DATA = | ||
SYSTEM_UNIT_ALIASES = | ||
|
||
systemdsystemunit_DATA = [email protected] | ||
|
||
if CA_CERT_EXTENSION | ||
dbuspolicy_DATA += busconfig/bmc-vmi-ca.conf | ||
systemdsystemunit_DATA += bmc-vmi-ca-manager.service | ||
endif | ||
|
||
if ENABLE_BMCWEB_CERT_CONFIG | ||
dbuspolicy_DATA += busconfig/phosphor-bmcweb-cert-config.conf | ||
certmgrenv_DATA += env/bmcweb | ||
SYSTEM_UNIT_ALIASES += \ | ||
../[email protected] multi-user.target.wants/[email protected] | ||
endif | ||
|
||
if ENABLE_NSLCD_AUTHORITY_CERT_CONFIG | ||
dbuspolicy_DATA += busconfig/phosphor-nslcd-authority-cert-config.conf | ||
certmgrenv_DATA += env/authority | ||
SYSTEM_UNIT_ALIASES += \ | ||
../[email protected] multi-user.target.wants/[email protected] | ||
endif | ||
|
||
install-aliases-hook: | ||
set -- $(SYSTEM_UNIT_ALIASES) && \ | ||
dir=$(systemdsystemunitdir) && $(install-aliases) | ||
|
||
define install-aliases | ||
while [ -n "$$1" ]; do \ | ||
$(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \ | ||
rm -f $(DESTDIR)$$dir/$$2 && \ | ||
$(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \ | ||
shift 2 || exit $$?; \ | ||
done | ||
endef | ||
|
||
INSTALL_DATA_HOOKS = \ | ||
install-aliases-hook | ||
|
||
install-data-hook: $(INSTALL_DATA_HOOKS) |
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
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,8 @@ | ||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | ||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | ||
<busconfig> | ||
<policy user="root"> | ||
<allow own="xyz.openbmc_project.Certs.ca.authority.Manager"/> | ||
<allow send_destination="xyz.openbmc_project.Certs.ca.authority.Manager"/> | ||
</policy> | ||
</busconfig> |
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,8 @@ | ||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | ||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | ||
<busconfig> | ||
<policy user="root"> | ||
<allow own="xyz.openbmc_project.Certs.Manager.Server.Https"/> | ||
<allow send_destination="xyz.openbmc_project.Certs.Manager.Server.Https"/> | ||
</policy> | ||
</busconfig> |
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,8 @@ | ||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | ||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | ||
<busconfig> | ||
<policy user="root"> | ||
<allow own="xyz.openbmc_project.Certs.Manager.Authority.Ldap"/> | ||
<allow send_destination="xyz.openbmc_project.Certs.Manager.Authority.Ldap"/> | ||
</policy> | ||
</busconfig> |
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,12 @@ | ||
#REST URI endpoint | ||
#example: /xyz/openbmc_project/certs/authority/ldap | ||
ENDPOINT=ldap | ||
|
||
#Path for the certificate file | ||
CERTPATH=/etc/ssl/certs/authority | ||
|
||
#Units to restart | ||
UNIT=bmcweb.service | ||
|
||
#Type of service | ||
TYPE=authority |
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,12 @@ | ||
#D-Bus object path | ||
#example: /xyz/openbmc_project/certs/server/https | ||
ENDPOINT=https | ||
|
||
#Path for the certificate file | ||
CERTPATH=/etc/ssl/certs/https/server.pem | ||
|
||
#Units to restart | ||
UNIT=bmcweb.service | ||
|
||
#Type of the service client/server | ||
TYPE=server |
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,12 @@ | ||
[Unit] | ||
Description=Phosphor certificate manager for %I | ||
|
||
[Service] | ||
EnvironmentFile=/usr/share/phosphor-certificate-manager/%I | ||
ExecStart=/usr/bin/env phosphor-certificate-manager --endpoint=${ENDPOINT} --path=${CERTPATH} --unit=${UNIT} --type=${TYPE} | ||
SyslogIdentifier=phosphor-certificate-manager | ||
Restart=always | ||
UMask=0007 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |