Bug 2144736

Summary: vault interoperability with older RHEL systems is broken
Product: Red Hat Enterprise Linux 9 Reporter: Florence Blanc-Renaud <frenaud>
Component: ipaAssignee: Trivino <ftrivino>
Status: CLOSED ERRATA QA Contact: Ganna Kaihorodova <gkaihoro>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.2CC: amore, gkaihoro, mjurasek, myusuf, pasik, rcritten, tscherf
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.10.1-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2149274 2149275 (view as bug list) Environment:
Last Closed: 2023-05-09 07:32:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2144737    
Bug Blocks: 2149274, 2149275    

Description Florence Blanc-Renaud 2022-11-22 07:24:07 UTC
Cloned from upstream: https://pagure.io/freeipa/issue/9259

### Issue
AES-128-CBC was recently enabled as default wrapping algorithm for transport of secrets.

This change was done in favor of FIPS as crypto-policies disabled 3DES in RHEL9, but
setting AES as default ended-up breaking backwards compatibility with older RHEL systems.

#### Steps to Reproduce
1. spawn a topology with a rhel7.9 server, and a rhel8.7 client
2. add a vault from the client: "ipa vault-add vault"

#### Actual behavior
Client fails with: "ipa: ERROR: an internal error has occurred", for other combinations you could see: "ipa: ERROR: Unknown option: wrapping_algo"

Without FIPS:

oldServer + newReplica + newClient

    client fails with: "ipa: ERROR: Unknown option: wrapping_algo"
    replica works
    master works
    newServer + oldClient:
    client fails with: "ipa: ERROR: an internal error has occurred"
    server works

with FIPS:

oldServer + newReplica + newClient:

    client fails with: "ipa: ERROR: Unknown option: wrapping_algo"
    replica works
    master works
    newServer + oldClient:
    client fails with: "ipa: ERROR: an internal error has occurred"
    server works

where old is RHEL7 and new is RHEL8

#### Expected behavior
ipa vaults work when running in mixed topologies.


#### Additional info:
The new wrapping algo implementation:

40c362e1eeb000867d0e6244ce03b66b6a35e913
"Support AES for KRA archival wrapping"

introduced a new option "--wrapping-algorithm" for "ipa vault-[retrieve/archive]" that is supposed to be internal only, actually it doesn't work. It should be hidden.

Comment 1 Florence Blanc-Renaud 2022-11-22 07:28:48 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/9259

Comment 2 Florence Blanc-Renaud 2022-11-22 07:30:56 UTC
Fixed upstream:
master:
    https://pagure.io/freeipa/c/93548f2569e11a49ffbb5d0f5957be420820f501 Vault: fix interoperability issues with older RHEL systems

ipa-4-10:
    https://pagure.io/freeipa/c/ba962632cd008edd057f61e7e6fadbf464ff94f2 Vault: fix interoperability issues with older RHEL systems

ipa-4-9:
    https://pagure.io/freeipa/c/c643e56e4c45b7cb61aa53989657143627c23e04 Vault: fix interoperability issues with older RHEL systems

Comment 3 Florence Blanc-Renaud 2022-11-22 07:37:24 UTC
The fix is also needed on RHEL 9.0z (9.0 contains 4.9.8 + the patch adding the new option "--wrapping-algorithm") and 9.1 (contains 4.10.0 which embeds the new option).

Comment 15 errata-xmlrpc 2023-05-09 07:32:52 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 (ipa 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/RHBA-2023:2205