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 1441376 - gssproxy unable to access /var/lib/ipa/gssproxy/http.keytab
Summary: gssproxy unable to access /var/lib/ipa/gssproxy/http.keytab
Keywords:
Status: CLOSED DUPLICATE of bug 1432115
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Martin Bašti
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-11 20:19 UTC by Scott Poore
Modified: 2017-04-20 10:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-20 10:52:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Scott Poore 2017-04-11 20:19:08 UTC
Description of problem:

It appears that on a fresh IPA install, there may be issues with SELinux and/or permissions set for /var/lib/ipa/gssproxy/http.keytab.

With SELinux in enforcing mode, we see ipa commands fail and AVC denials.

[root@rhel7-2 audit]# ipa user-find
ipa: ERROR: No valid Negotiate header in server response

[root@rhel7-2 audit]# cat audit.log|audit2allow 
#============= gssproxy_t ==============
allow gssproxy_t self:capability { dac_override dac_read_search };


With some digging, we see the following failure in /var/log/messages from when gssproxy started:

Apr 11 15:00:57 rhel7-2 gssproxy: gssproxy[6803]: (OID: { 1 2 840 113554 1 2 2 }) Unspecified GSS failure.  Minor code may provide more information, Keytab FILE:/var/lib/ipa/gssproxy/http.keytab is nonexistent or empty

Looking at the directory and file:

[root@rhel7-2 ~]# ls -ldZ /var/lib/ipa/gssproxy
drwx------. root root system_u:object_r:ipa_var_lib_t:s0 /var/lib/ipa/gssproxy

[root@rhel7-2 ~]# ls -ldZ /var/lib/ipa/gssproxy/http.keytab 
-rw-------. apache apache unconfined_u:object_r:ipa_var_lib_t:s0 /var/lib/ipa/gssproxy/http.keytab


Version-Release number of selected component (if applicable):
ipa-server-4.5.0-5.el7.x86_64
gssproxy-0.7.0-3.el7.x86_64


How reproducible:
always if gssproxy is started when SELinux in enforcing mode.

Steps to Reproduce:
1.  ipa-server-install*
2.  setenforce 1
3.  ipactl restart
4.  ipa user-find

*note that due to some other unrelated AVC work still being finished, this had to be run with in permissive mode.

Actual results:
Throws errors and AVCs

Expected results:
No errors or AVCs 

Additional info:

Comment 2 Scott Poore 2017-04-11 20:20:05 UTC
FYI, full AVC denial messages:

[root@rhel7-2 ~]# ausearch -m avc
----
time->Tue Apr 11 15:12:24 2017
type=SYSCALL msg=audit(1491941544.278:552): arch=c000003e syscall=2 success=no exit=-13 a0=7fde7002a670 a1=0 a2=1b6 a3=24 items=0 ppid=1 pid=6803 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="gssproxy" exe="/usr/sbin/gssproxy" subj=system_u:system_r:gssproxy_t:s0 key=(null)

type=AVC msg=audit(1491941544.278:552): avc:  denied  { dac_read_search } for  pid=6803 comm="gssproxy" capability=2  scontext=system_u:system_r:gssproxy_t:s0 tcontext=system_u:system_r:gssproxy_t:s0 tclass=capability

type=AVC msg=audit(1491941544.278:552): avc:  denied  { dac_override } for  pid=6803 comm="gssproxy" capability=1  scontext=system_u:system_r:gssproxy_t:s0 tcontext=system_u:system_r:gssproxy_t:s0 tclass=capability

Comment 3 Petr Vobornik 2017-04-12 08:01:10 UTC
Martin, are these AVCs part of the ones you reported after your investigation?

Comment 4 Martin Bašti 2017-04-12 08:19:32 UTC
Well,

I reported following:

Raw Audit Messages
type=AVC msg=audit(1491815464.382:104238): avc:  denied  { dac_override } for  pid=109579 comm="gssproxy" capability=1  scontext=system_u:system_r:gssproxy_t:s0 tcontext=system_u:system_r:gssproxy_t:s0 tclass=capability


type=SYSCALL msg=audit(1491815464.382:104238): arch=x86_64 syscall=open success=yes exit=EEXIST a0=7f8c34047c90 a1=0 a2=1b6 a3=24 items=0 ppid=1 pid=109579 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=gssproxy exe=/usr/sbin/gssproxy subj=system_u:system_r:gssproxy_t:s0 key=(null)


But for unknown reason it misses this AVC:

type=AVC msg=audit(1491941544.278:552): avc:  denied  { dac_read_search } for  pid=6803 comm="gssproxy" capability=2  scontext=system_u:system_r:gssproxy_t:s0 tcontext=system_u:system_r:gssproxy_t:s0 tclass=capability

Comment 5 Martin Bašti 2017-04-12 08:42:43 UTC
Maybe because gssproxy in enforcing mode failed to access keytab, it probably tried another method and caused a new AVC that I haven't been able to get in permissive mode.

Comment 6 Martin Bašti 2017-04-20 10:52:20 UTC
Reported as part of bug 1432115

*** This bug has been marked as a duplicate of bug 1432115 ***


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