FreeIPA's Custodia instance ipa-custodia is a critical service. It has access to secrets such as CA's private key and 389-DS' directory manager. As of now, the service is protected in several ways
ipa-custodia
In order to reduce the potential attack surface, point (2) should be limited to IPA servers instead of any user, service, or host. In case a severe flaw is found in the Python/jwcrypto/Custodia software stack, a limitation to members of the ipaserver host group would reduce the impact of such a vulnerability. Only IPA servers would be able to attack other IPA servers -- which is rather pointless.
ipaserver
AFAIK it is currently not possible to define a HBAC rule for this limitation. HBAC rules define which user is allowed to access combinations of services/service groups and hosts/host groups. Custodia does not have a distinct user but rather uses the host keytab to acquire a TGT.
The feature depends on#5277 to provide HBAC rules and HBAC service groups.
required pam_sss.so
<Location "/ipa/keys/">
ipa.conf
AuthBasicProvider PAM
AuthPAMService ipa-custodia
setsebool -P allow_httpd_mod_auth_pam 1
ipa hbacsvc-add ipa-custodia
Metadata Update from @pvoborni: - Issue set to the milestone: Future Releases