#9083 Support MIT Kerberos KDB version 9
Closed: fixed by abbra. Opened by abbra.

Upcoming MIT Kerberos 1.20 version will change KDB interface around PAC record handling. Below are commit messages that describe these changes from MIT Kebreros git repo:

Author: Greg Hudson <ghudson@mit.edu>
Date:   Fri Jan 7 22:41:30 2022 -0500
    Replace AD-SIGNEDPATH with minimal PACs
    Remove all of the AD-SIGNEDPATH code.  Instead, issue a signed minimal
    PAC in all tickets and require a valid PAC to be present in all
    tickets presented for S4U operations.  Remove the get_authdata_info()
    and sign_authdata() DAL methods, and add an issue_pac() method to
    allow the KDB to add or copy buffers to the PAC.  Add a disable_pac
    realm flag.
    Microsoft revised the S4U2Proxy rules for forwardable tickets.  All
    S4U2Proxy operations require forwardable evidence tickets, but
    S4U2Self should issue a forwardable ticket if the requesting service
    has no ok-to-auth-as-delegate bit but also no constrained delegation
    privileges for traditional S4U2Proxy.  Implement these rules,
    extending the check_allowed_to_delegate() DAL method so that the KDC
    can ask if a principal has any delegation privileges.
    Combine the KRB5_KDB_FLAG_ISSUE_PAC and
    KRB5_FLAG_CLIENT_REFERRALS_ONLY flags into KRB5_KDB_FLAG_CLIENT.
    Rename the KRB5_KDB_FLAG_CANONICALIZE flag to
    KRB5_KDB_FLAG_REFERRAL_OK, and only pass it to get_principal() for
    lookup operations that can use a realm referral.
    For consistency with Active Directory, honor the no-auth-data-required
    server principal flag for S4U2Proxy but not for S4U2Self.  Previously
    we did the reverse.
    ticket: 9044 (new)
commit c85894cfb784257a6acb4d77d8c75137d2508f5e
Author: Greg Hudson <ghudson@mit.edu>
Date:   Fri Jan 7 19:58:42 2022 -0500
    Add minimal KDC MS-RPCE (NDR) encoder/decoder
    Add NDR marshalling functions for S4U_DELEGATION_INFO PAC buffers.
    [ghudson@mit.edu: added safety checks; made minor style changes;
    edited commit message]
commit ee4e3c5c9eee061048d5b7393b8f3820d1a563a8
Author: Isaac Boukris <iboukris@gmail.com>
Date:   Fri Jan 7 13:46:24 2022 -0500
    Add PAC ticket signature APIs
    Microsoft added a third PAC signature over the ticket to prevent
    servers from setting the forwardable flag on evidence tickets.  Add
    new APIs to generate and verify ticket signatures, as well as defines
    for this and other new PAC buffer types.  Deprecate the old signing
    functions as they cannot generate ticket signatures.  Modify several
    error returns to better match the protocol errors generated by Active
    Directory.
    [ghudson@mit.edu: adjusted contracts for KDC requirements; simplified
    and commented code changes; wrote commit message.  rharwood@redhat.com
    also did some work on this commit.]
    ticket: 9043 (new)

This ticket tracks changes required for FreeIPA to compile and work with MIT Kerberos 1.20. A test version of MIT Kerberos 1.20 (still unreleased) is built in COPR abbra/krb5-test. It also includes modified Samba 4.15.3 which compiles against new MIT Kerberos version as well.


master:

  • 2dc752018cc452b57bd6018504166131cd33c6c5 ipa-kdb: refactor KDB driver to prepare for KDB version 9

ipa-4-9:

  • ace0bbfdc8eb02a4ba47f8293809ff4734856ab8 ipa-kdb: refactor KDB driver to prepare for KDB version 9

master:

  • f91e9d3fd466041dfc474cc9be2c40dba252aedb ipa-kdb: fix make check

ipa-4-9:

  • 9cd48d1854b19a40a2026891f9e28c1b79af2637 ipa-kdb: fix make check

master:

  • 5e7590981b60c266ba87a2427633f14b3a3b6124 ipa-kdb: refactor MS-PAC processing to prepare for krb5 1.20
  • c1582bd322d239e5270974da5a3678dbba458599 ipa-kdb: add krb5 1.20 support
  • a9018da90d94585a437a2d1730454c5afc36b39f ipa-kdb: handle cross-realm TGT entries when generating PAC
  • e86807b58c67a607bceb568d206af3b3abc03dea ipa-kdb: handle empty S4U proxy in allowed_to_delegate
  • 0c67f0e60766864ec9416a18716e90ff46b5020e ipa-kdb: fix PAC requester check
  • ce05e5fd40e63262e115d7adc4a21915dc2bb32d ipa-kdb: fix comment to make sure we talk about krb5 1.20 or later

ipa-4-10:

  • f0c72dcb87f86b9b00d0c087a959e64ce10eea98 ipa-kdb: refactor MS-PAC processing to prepare for krb5 1.20
  • e9ae0e350dcee5c9bbcd5a6932b4eb0daa90fea7 ipa-kdb: add krb5 1.20 support
  • a5ca25003da5906703e8bd12b0759d48bc52e6b2 ipa-kdb: handle cross-realm TGT entries when generating PAC
  • 1d4db340461298fed66607bde5fb0ca0f033c5aa ipa-kdb: handle empty S4U proxy in allowed_to_delegate
  • 88c1293f3a92451b6d5d5f7cb1a81d55a789b793 ipa-kdb: fix PAC requester check
  • d3c7a4faae8fd58a8d08bf6191d47fefe276ddba ipa-kdb: fix comment to make sure we talk about krb5 1.20 or later

Metadata Update from @abbra:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

master:

  • 21d99b457d688528bf7e4dcd64d20f7189d16fec ipa-kdb: for delegation check, use different error codes before and after krb5 1.20

ipa-4-10:

  • 465d5f5c6a956109b66abf60af0edd31fa2bce41 ipa-kdb: for delegation check, use different error codes before and after krb5 1.20

Metadata Update from @abbra:
- Custom field changelog adjusted to FreeIPA now supports MIT Kerberos 1.20. Resource-based constrained delegation is not yet implemented.

ipa-4-9:

  • 9efa8fe49c08fc584189b9d9ab24dfa8560db824 ipa-kdb: refactor MS-PAC processing to prepare for krb5 1.20
  • a0d840347b453bda141691ac587bc2ec851f15a5 ipa-kdb: add krb5 1.20 support
  • 0dd3315afb1056e3ca5bfd6af161793b5a5b8d86 ipa-kdb: handle cross-realm TGT entries when generating PAC
  • 4755bd42c0f4c8fcda6131ee89b6fa8308d8a75c ipa-kdb: handle empty S4U proxy in allowed_to_delegate
  • 7e504647dd00202c02cd203ca3474a332d1e413e ipa-kdb: fix PAC requester check
  • a35cac3d6fa80d259240b0eb1d4952c321be9e92 ipa-kdb: fix comment to make sure we talk about krb5 1.20 or later
  • e12aa8bb782e1f3722ae93d63632cd93df06faab ipa-kdb: for delegation check, use different error codes before and after krb5 1.20
Metadata