0b494d
From a42c4c1be12f64228f196b42f30fb57019e3943e Mon Sep 17 00:00:00 2001
0b494d
From: Fraser Tweedale <ftweedal@redhat.com>
0b494d
Date: Tue, 30 Jul 2019 16:21:35 +1000
0b494d
Subject: [PATCH] CustodiaClient: fix IPASecStore config on ipa-4-7
0b494d
0b494d
The backport of a Custodia client fix for f30 and related refactors
0b494d
and improvements, to the ipa-4-7 branch, had no conflicts.  But
0b494d
there is a change on newer branches that broke the backport.  The
0b494d
running of Custodia handlers in separate processes simplified the
0b494d
configuration of the ISecStore.  For ipa-4-7 we need to continue to
0b494d
explicitly configure it, so restore the old configuration behaviour.
0b494d
0b494d
Part of: https://pagure.io/freeipa/issue/7964
0b494d
0b494d
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
0b494d
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
0b494d
---
0b494d
 ipaserver/secrets/client.py | 7 ++++++-
0b494d
 1 file changed, 6 insertions(+), 1 deletion(-)
0b494d
0b494d
diff --git a/ipaserver/secrets/client.py b/ipaserver/secrets/client.py
0b494d
index 4c03ef8e4140dd507156d88941600a234b71184e..2363b081dbbf3671e8147497bb52811825bdf1a4 100644
0b494d
--- a/ipaserver/secrets/client.py
0b494d
+++ b/ipaserver/secrets/client.py
0b494d
@@ -52,7 +52,12 @@ class CustodiaClient(object):
0b494d
         self.service_name = gssapi.Name(
0b494d
             'HTTP@{}'.format(server), gssapi.NameType.hostbased_service
0b494d
         )
0b494d
-        self.keystore = IPASecStore()
0b494d
+
0b494d
+        config = {'ldap_uri': self.ldap_uri}
0b494d
+        if auth_type is not None:
0b494d
+            config['auth_type'] = auth_type
0b494d
+        self.keystore = IPASecStore(config)
0b494d
+
0b494d
         # use in-process MEMORY ccache. Handler process don't need a TGT.
0b494d
         token = b64encode(os.urandom(8)).decode('ascii')
0b494d
         self.ccache = 'MEMORY:Custodia_{}'.format(token)
0b494d
-- 
0b494d
2.20.1
0b494d