URL: https://github.com/freeipa/freeipa/pull/187 Author: tiran Title: #187: Register entry points of Custodia plugins Action: synchronized
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/187/head:pr187 git checkout pr187
From 3dd18735a309bd8de0d2c0d6d59976f060642135 Mon Sep 17 00:00:00 2001 From: Christian Heimes <[email protected]> Date: Wed, 26 Oct 2016 11:14:06 +0200 Subject: [PATCH] Register entry points of Custodia plugins With setuptools in place FreeIPA is able to register its Custodia plugins. Custodia 0.1 ignores the plugins directives. Custodia 0.2 uses the entry points to discover plugins. Signed-off-by: Christian Heimes <[email protected]> --- ipapython/secrets/store.py | 6 +++++- ipapython/setup.py | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ipapython/secrets/store.py b/ipapython/secrets/store.py index 10fdcb6..30a87d4 100644 --- a/ipapython/secrets/store.py +++ b/ipapython/secrets/store.py @@ -217,7 +217,7 @@ def import_key(self, value): } -class iSecStore(CSStore): +class IPASecStore(CSStore): def __init__(self, config=None): self.config = config @@ -255,3 +255,7 @@ def cut(self, key): def span(self, key): raise NotImplementedError + + +# backwards compatibility with FreeIPA 4.3 and 4.4. +iSecStore = IPASecStore diff --git a/ipapython/setup.py b/ipapython/setup.py index 47acdd6..def4130 100755 --- a/ipapython/setup.py +++ b/ipapython/setup.py @@ -38,4 +38,12 @@ "ipapython.secrets", "ipapython.install" ], + entry_points={ + 'custodia.authorizers': [ + 'IPAKEMKeys = ipapython.secrets.kem:IPAKEMKeys', + ], + 'custodia.stores': [ + 'IPASecStore = ipapython.secrets.store:IPASecStore', + ], + }, )
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
