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 767741 - Add support for s4u2proxy
Summary: Add support for s4u2proxy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mod_auth_kerb
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Joe Orton
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 767740
Blocks: 750334 768164
TreeView+ depends on / blocked
 
Reported: 2011-12-14 19:06 UTC by Rob Crittenden
Modified: 2012-06-20 14:04 UTC (History)
6 users (show)

Fixed In Version: mod_auth_kerb-5.4-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 767740
Environment:
Last Closed: 2012-06-20 14:04:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch against mod_auth-kerb-5.4-7 (18.19 KB, patch)
2012-01-04 20:04 UTC, Rob Crittenden
no flags Details | Diff
Updated patch including spec file changes (21.78 KB, patch)
2012-02-17 23:24 UTC, Rob Crittenden
no flags Details | Diff
Updated patch, no spec (19.16 KB, patch)
2012-03-01 19:23 UTC, Rob Crittenden
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0877 0 normal SHIPPED_LIVE mod_auth_kerb bug fix and enhancement update 2012-06-19 20:47:44 UTC

Description Rob Crittenden 2011-12-14 19:06:52 UTC
+++ This bug was initially created as a clone of Bug #767740 +++

Description of problem:

Two patches have been submitted upstream to support Constrained Delegation aka s4u2proxy (http://k5wiki.kerberos.org/wiki/Projects/Services4User

The patch thread is http://sourceforge.net/mailarchive/forum.php?thread_name=4EE665D1.3000308%40redhat.com&forum_name=modauthkerb-help

This is needed so the freeIPA project can stop forwarding TGTs and have the web service handle delegation.

Version-Release number of selected component (if applicable):

mod_auth_kerb-5.4-7.fc15

Comment 1 Joe Orton 2011-12-15 11:27:38 UTC
Hi Rob!  

I will defer to you on the Kerberos side of things here...

1) Irrelevant to RHEL, but the 0002 patch includes mutex init for the httpd 1.3.x build using APR functions, which will not work.

2) The mutex handling is not quite correct:

+   tmpnam(client_lock_name);
+   status = apr_global_mutex_create(&client_lock, client_lock_name,
+                                 APR_LOCK_DEFAULT, p);
+   if (status != APR_SUCCESS) {
+      ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
+                  "failed to create lock");
+      return !OK;
+   }
+   apr_pool_cleanup_register(p, NULL, clear_lock, apr_pool_cleanup_null);
    
a) The lockfile name should be configurable, and should default to NULL; APR does not need an actual temp file on most platforms.

b) There is no need for a cleanup here, APR creates one automatically.

c) This code needs to be run only once at startup (post_config runs twice), and needs to set mutex perms correctly too with unixd_set_global_mutex_perms. I'd recommend copying the rewritelock code from mod_rewrite which does all the necessary things.

Comment 3 Jenny Severance 2011-12-20 16:47:03 UTC
From upstream ticket ... 

To test the webUI. in the browser URL box enter about:config and edit the line: network.negotiate-auth.delegation.uris and remove the IPA server. That will stop TGT forwarding.

Comment 4 Rob Crittenden 2012-01-04 20:04:54 UTC
Created attachment 550756 [details]
Patch against mod_auth-kerb-5.4-7

Updated patch based on Joe's comments.

The locking code is now based heavily on the mod_rewrite locking code.

Comment 5 Joe Orton 2012-01-25 12:48:22 UTC
That looks fine.  If the code has actually been copied from mod_rewrite, it should carry the standard ASF licensing header, and we should add a Red Hat copyright notice in there too since there is a bunch of new code.

Comment 12 Rob Crittenden 2012-02-17 23:24:14 UTC
Created attachment 564008 [details]
Updated patch including spec file changes

The location of the Kerberos libraries changed from /usr/kerberos/lib to /usr/lib

The patch itself is the same currently in Fedora stable.

Comment 15 Rob Crittenden 2012-03-01 19:23:31 UTC
Created attachment 566921 [details]
Updated patch, no spec

A set of braces was missing around a conditional which would have led to s4u2proxy to always be checked whether enabled or not.

This patch adds the missing braces.

Comment 16 Joe Orton 2012-03-02 15:30:36 UTC
Thanks Rob, package is respun.

Comment 18 Jenny Severance 2012-04-17 12:48:01 UTC
Forms based authentication would not work without this functionality:

================ final pass/fail report =================
   Test Date: Tue Apr 17 08:43:20 EDT 2012 
   Total : [9] 
   Passed: [9] 
   Failed: [0] 
   Abort : [0]
   Crash : [0]
---------------------------------------------------------
   [   PASS   ]      forms-cli startup  Check for ipa-server package
   [   PASS   ]      forms-cli-01  Destroy credentials
   [   PASS   ]      forms-cli-02  Ensure that json script does not work without a valid session ID
   [   PASS   ]      forms-cli-03  ensure that you cannot get a valid session id with bad credentials.
   [   PASS   ]      forms-cli-04  attempt to create a new group with bad credentials.
   [   PASS   ]      forms-cli-05  Get a valid session id with good credentials.
   [   PASS   ]      forms-cli-06  Create a new user with the aquired session id. ie, retry forms-cli-02 with valid credentials.
   [   PASS   ]      forms-cli-07  Create a new group with the aquired session id. ie, retry forms-cli-03 with valid credentials.
   [   PASS   ]      forms-cli-08  Delete the group created in the last step using valid credentials in a form.

verified:
ipa-server-2.2.0-9.el6.x86_64
mod_auth_kerb-5.4-9.el6.x86_64

Comment 20 errata-xmlrpc 2012-06-20 14:04:48 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, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHBA-2012-0877.html


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