Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1421663 - support proper SASL GSS-SPNEGO in CyrusSASL
support proper SASL GSS-SPNEGO in CyrusSASL
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cyrus-sasl (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jakub Jelen
Namita Soman
Mirek Jahoda
:
Depends On:
Blocks: 1181853 1345975
  Show dependency treegraph
 
Reported: 2017-02-13 06:54 EST by Alexander Bokovoy
Modified: 2017-08-01 16:56 EDT (History)
5 users (show)

See Also:
Fixed In Version: cyrus-sasl-2.1.26-21
Doc Type: Bug Fix
Doc Text:
SPNEGO in Cyrus SASL is now compatible with Microsoft Windows Prior to this update, the Red Hat Enterprise Linux implementation of Simple and Protected GSSAPI Negotiation Mechanism (SPNEGO) in Cyrus Simple Authentication and Security Layer (SASL) was not compatible with the Microsoft Windows counterpart. As a consequence, the Red Hat Enterprise Linux tools using the _cyrus-sasl_ packages were not able to use SPNEGO when attempting to connect to Windows services. These tools were also not able to accept connections from Windows clients. The _cyrus-sasl_ packages have been fixed, and SPNEGO in the Red Hat Enterprise Linux Cyrus SASL version is now compatible with the Microsoft Windows counterpart.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 16:56:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2034 normal SHIPPED_LIVE cyrus-sasl bug fix update 2017-08-01 14:34:43 EDT

  None (edit)
Description Alexander Bokovoy 2017-02-13 06:54:36 EST
we need to support GSS-SPNEGO in CyrusSASL in order to even start
testing Global Catalog service for FreeIPA. Windows clients always use
SASL GSS-SPNEGO when talking to LDAP and Global Catalog so without
CyrusSASL supporting it there is no way to test in real environment.

For references, here is Simo's quote from GSS-NTLMSSP site:
----------
Cyrus-sasl's GSS-SPNEGO support is equally broken with GSS-NTLMSSP, the
actual authentication works fine, but then it fails to correctly
negotiate the SASL SSF properties due again to the incorrect assumption
that the authentication negotiation always terminates with the last
message being sent from the server to the client. In NTLMSSP usually the
last message is from the client back to the server.
----------

Micheal Brown hacked up a build last year at devconf.cz'16 which
improved CyrusSASL GSS-SPNEGO for Kerberos-based creds:
-----------------
I've been hacking with FreeIPA trying to get Windows to connect and perform
LDAP queries.  I've finally managed to hack cyrus-sasl to accept the
GSS-SPNEGO (with Kerberos credentials) that Windows provides.  This is
currently a hideously ugly hack.  In the "/* Switch to ssf negotation */" in
gssapi_server_mech_authneg(), I added;

  if ( is_spnego ) {
        text->state = SASL_GSSAPI_STATE_AUTHENTICATED;
        ret = SASL_OK;
        oparams->encode = &gssapi_privacy_encode;
        oparams->decode = &gssapi_decode;
        oparams->mech_ssf = K5_MAX_SSF;
        _plug_decode_init(&text->decode_context,
                      text->utils,
                      (params->props.maxbufsize > 0xFFFFFF) ? 0xFFFFFF :
                      params->props.maxbufsize);
  }

i.e. taking the code to finish setting up the SASL encoding/decoding from
gssapi_server_mech_ssfreq() and dumping it into gssapi_server_mech_authreq()
if this is using SPNEGO.

This enables Windows' ldp.exe to bind and query the LDAP server.

I'd like to turn this into a proper fix for cyrus-sasl, but I don't know
enough about the architecture of SASL/GSSAPI/SPNEGO.  Could you give me any
hints on how a proper fix ought to be structured?
-----------------

To test potential fix on the server side, stand up FreeIPA with trust to AD and try to access FreeIPA LDAP server from Windows machine using ldp.exe. I can provide a test environment.
Comment 3 Jakub Jelen 2017-03-06 02:33:02 EST
For the record, the pull request was submitted upstream by Simo and is now merged into the master:

https://github.com/cyrusimap/cyrus-sasl/pull/424
Comment 12 errata-xmlrpc 2017-08-01 16:56:22 EDT
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.

https://access.redhat.com/errata/RHBA-2017:2034

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