areguera / rpms / ipa

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