RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1857157 - replica install failing with avc denial for custodia component
Summary: replica install failing with avc denial for custodia component
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: 8.3
Assignee: Thomas Woerner
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-15 09:42 UTC by Kaleem
Modified: 2020-11-04 02:51 UTC (History)
4 users (show)

Fixed In Version: ipa-4.8.7-7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:51:20 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure freeipa issue 8412 0 None None None 2020-07-15 09:48:35 UTC
Github freeipa freeipa pull 4920 0 None closed Add missing SELinux rule for ipa-custodia.sock 2020-10-28 08:15:32 UTC
Red Hat Product Errata RHSA-2020:4670 0 None None None 2020-11-04 02:51:37 UTC

Description Kaleem 2020-07-15 09:42:05 UTC
Description of problem:

2020-07-14T16:49:05+0000 [ipa_pytests.qe_class.QeHost.replica.cmd27] DEBUG Done configuring ipa-custodia.
2020-07-14T16:49:06+0000 [ipa_pytests.qe_class.QeHost.replica.cmd27] DEBUG Your system may be partly configured.
2020-07-14T16:49:06+0000 [ipa_pytests.qe_class.QeHost.replica.cmd27] DEBUG Run /usr/sbin/ipa-server-install --uninstall to clean up.
2020-07-14T16:49:06+0000 [ipa_pytests.qe_class.QeHost.replica.cmd27] DEBUG 
2020-07-14T16:49:06+0000 [ipa_pytests.qe_class.QeHost.replica.cmd27] DEBUG 503 Server Error: Service Unavailable for url: https://master.testrealm.test/ipa/keys/ca/caSigningCert%20cert-pki-ca?type=kem&value=eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZDQkMtSFM1MTIiLCJraWQiOm51bGx9.ELWS5XQUgbMW8EXKqSFUiP2Q4lUnIKlgj145zu_qbxczWMDf1gRCOsBjBksg4tbcvMYffQu-RdEhBiCRO9Wf5FQoG1cDbcBz-09XtgSX7VYKV1qjBFU8cF_6rNA9cvoBdxRNFLt5hJk5DUs5k98QenU-pm-BV5PkYhSiEyTaROMMI9Lm9k6Nu_UP5ubpzOWHDTeMoYM4z3IpEcMV9E_mq3HJx4S6xUXi_L-hq0dSDVl2pAS5fiQnTAGNp1AID39WDjYIafNj-wab4j8ZV5rY5Uiia5CU9HpLzGIXaxb_nr6Jj3P1y_LXmueEwFLvBoNKzCfqbWU1NBFoqD-6jRt8xw.vbIVe5pNz4ATICCtAnNaAg.hR8mEB4LiRB4L4tKTikv0-8lH9VWXJs_c9I22LMtIxGyYXc04ogC1Crm6eqvl7SssvNZzjcgJnUzEaf-_7LUYNZwl2fZrjWRZo-6RkRGuskW0WpWuPTIhsW0fSndmELeV1LPhw4dyekSO2AGIWxYawFO3hT9fq631dnqdbiEtgY4Qb2ox3cRJIZti4ZyWy0CuC2fZ3455Opzj59SZ5lLzkpWmtLKO-V24ZnxLsAF4V1ylLtfJHM0Cw1pbdzXAelQJf9dIyqlawAgj6dgpBuRok7rxV7KkxUBQCqFqvF70nCWfkk89UzS3GevFxdzaCv-RRPUSUkKoLWVp4-TtEDDRYcdeDM6pokW_cIqzO7ZiotNjQMqIHMkzWS8q3UFQBYyaDJirfls1AXq2toquCyUG0oIpGfX7VSZ2vDmF_JSh-XZlaaijCtfXzGPHUc3h7t767NBOPgESyDI5UMe8raCDPYLdCfymB6wzArqgZaulMEuScPY7tOLe5V5j0HDS7K8Pyi9sYHguMWjtG0prW5j5kXyAabHb4uoDridP3Xgl2ru-_txk6ZteK75j9-DYRtyjmcKjnH1284RMyWDEp-1svdotneACqgEQrz_MjfPjG7Odmyc5RwwWg8kcG0wGXTtwEH0tA0UeJxwP4JFp26Fh0niAKHQxScAMMLOYBruiQ0.eb_naalA4U6XziPck0OriDGMoX-B2KruNWszxtk9yjQ
2020-07-14T16:49:06+0000 [ipa_pytests.qe_class.QeHost.replica.cmd27] DEBUG The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information
2020-07-14T16:49:07+0000 [paramiko.transport] DEBUG [chan 27] EOF received (27)


snip from audit.log
===================

type=PROCTITLE msg=audit(1594745346.857:2709): proctitle=2F7573722F7362696E2F6874747064002D44464F524547524F554E44
type=SYSCALL msg=audit(1594745346.857:2709): arch=c000003e syscall=42 success=no exit=-13 a0=1a a1=7fcf00012eb0 a2=1e a3=7fcf60337530 items=0 ppid=32280 pid=32294 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null)
type=AVC msg=audit(1594745346.857:2709): avc:  denied  { connectto } for  pid=32294 comm="httpd" path="/run/httpd/ipa-custodia.sock" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:ipa_custodia_t:s0 tclass=unix_stream_socket permissive=0


Version-Release number of selected component (if applicable):
ipa-selinux-4.8.7-6.module+el8.3.0+7359+7ce322ce.noarch
ipa-server-4.8.7-6.module+el8.3.0+7359+7ce322ce.x86_64

How reproducible:
Alwyas

Steps to Reproduce:
1. Install IPA Server
2. Instlall IPA replica


Actual results:
Replica install fails and avc denial for custodia component seen on IPA server.

Expected results:
Replica install successful and no avc denial seen.

Additional info:

Comment 1 Christian Heimes 2020-07-15 12:04:16 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/69da03b4ca16ca42fe6828d7e2e4b525f8f1087e

Comment 2 Christian Heimes 2020-07-15 14:55:02 UTC
Fixed upstream
ipa-4-8:
https://pagure.io/freeipa/c/d83b760d1f76a3ba8e527dd27551e51a600b22c0

Comment 6 Sumedh Sidhaye 2020-07-20 12:47:41 UTC
Reproducer:

[root@replica ~]# rpm -q ipa-server ipa-selinux
ipa-server-4.8.7-6.module+el8.3.0+7359+7ce322ce.x86_64
ipa-selinux-4.8.7-6.module+el8.3.0+7359+7ce322ce.noarch

2020-07-20T12:09:01+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG   [1/2]: starting ipa-otpd 
2020-07-20T12:09:01+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG   [2/2]: configuring ipa-otpd to start on boot
2020-07-20T12:09:02+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG Done configuring ipa-otpd.
2020-07-20T12:09:02+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG Configuring ipa-custodia
2020-07-20T12:09:02+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG   [1/4]: Generating ipa-custodia config file
2020-07-20T12:09:02+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG Custodia uses 'master.testrealm.test' as master peer.
2020-07-20T12:09:02+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG   [2/4]: Generating ipa-custodia keys
2020-07-20T12:09:02+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG   [3/4]: starting ipa-custodia 
2020-07-20T12:09:04+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG   [4/4]: configuring ipa-custodia to start on boot
2020-07-20T12:09:04+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG Done configuring ipa-custodia.
2020-07-20T12:09:05+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG 503 Server Error: Service Unavailable for url: https://master.testrealm.test/ipa/keys/ca/caSigningCert%20cert-pki-ca?type=kem&value=eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZDQkMtSFM1MTIiLCJraWQiOm51bGx9.tMFmmKPp0RcH5gihE6slX9lkk7Cqkdfe_76y4IpaYm9gFfVMTyLiFYsc-Ct5hAOjX_gWD1eQjrL4aADroNz3s_vGSqIKgLRoxhsA7fkxDkDw8o9AEi43YDwaYSB7OxcFkXjfXT6f8WZBZXinM8sycKSZE6Apxav54lAV_2DIUbtmk61SlhLaNdazB67zy8sbWiKROWGF8rKF2get_B9oT2xGDm4Z03zAwCaTwS0WFRtHPpl_JZftTR5P9KP-eY923ulNbOWb8JXLlG15erEIEDNjgOATYI5TC_IadiGuve6Ro9A3faTH_xCuBZT-VZUlsEfmeTKYzHXA4BGu3xo5pA.pKBgcFv3bOiX7K64Y4OF4Q.7szdAiJnwfcqr7BeHKPySUcMmQMONPTL25HYqiCkXOkSo5VRHRAYH0cJ5WE-cEWs-BTOY5xU8bqX_S9U7yPZv5GrNyxx8HkyTt5dPLJzJTS6edj6gNSKPtoq7LNWJFlUJZ8h_T6loggSShpZmXfhQo2TSRknASZuHNtTlxWjPeaO2cI6L3tQmplpO_LL4tv0ekhEMy2CfXnHvql7WSkSA6P-ChZZ6khGNa_dFHGeAJp4N4WtP08vb5DsIqvZ2tSVTPHzSL29o0iBt5LEFF4s7vvguZMPiipIs7ocXcIdmQpe8Vk6YEhMQHMW2Ucq8rqrjIj5orB1Ilds-EkiBPchJE0oFy-bYH0FP9q-4kSP-8wjY20ht03dYq3cjpxh8VOqbZBwefWR-QmJExsLSz4OiLK0o5k0ZMhOZfXJWFuaD5mKoVU2EjKNNVCrEuGA_x5A38zN1DJ6hz4LfNfbh8Pab7H3usRTpfMND4OxK3hdzr8QDndFOIieB0rg_JJQYPuE_iAPf1d698jmlGThKpCIyIDeUDre2do2y6dYMnYjcntYwgp_36_9AXV0qRil-k1lPLd-qSSRKZ9cqgTgOALUcPkleFSWoBShxeN7Y_-YgZ0OclNLCYyNwUX14QN-xck7Jk3y8JNRuaTzVK69NxRJlv33TVwk9XW1JocdMWDfLuk.trGBfjwQmLfwdYu0xZ78rvstLwdE2_-aq9qhyQQYYd0
2020-07-20T12:09:05+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information
2020-07-20T12:09:05+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG Your system may be partly configured.
2020-07-20T12:09:05+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG Run /usr/sbin/ipa-server-install --uninstall to clean up.
2020-07-20T12:09:05+0000 [ipa_pytests.qe_class.QeHost.replica.cmd23] DEBUG 
2020-07-20T12:09:06+0000 [paramiko.transport] DEBUG [chan 23] EOF received (23)
2020-07-20T12:09:06+0000 [paramiko.transport] DEBUG [chan 23] EOF sent (23)




Fixed version

[root@replica ~]# grep -nr "ipa-custodia.sock" /var/log/audit/audit.log 
[root@replica ~]# rpm -q ipa-server ipa-selinux
ipa-server-4.8.7-7.module+el8.3.0+7376+c83e4fcd.x86_64
ipa-selinux-4.8.7-7.module+el8.3.0+7376+c83e4fcd.noarch
[root@replica ~]# 

replica install log

2020-07-20T06:16:42Z DEBUG stderr=
2020-07-20T06:16:42Z DEBUG Restart of ipa.service complete
2020-07-20T06:16:42Z INFO The ipa-replica-install command was successful

Comment 11 errata-xmlrpc 2020-11-04 02:51:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: idm:DL1 and idm:client security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4670


Note You need to log in before you can comment on or make changes to this bug.