From 9102fb3b02fbe55480428e60fb8df4fd668d7753 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 26 Oct 2016 11:14:06 +0200 Subject: 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. https://fedorahosted.org/freeipa/ticket/6492 Signed-off-by: Christian Heimes Reviewed-By: Martin Babinsky --- ipapython/secrets/store.py | 6 +++++- ipapython/setup.py | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'ipapython') diff --git a/ipapython/secrets/store.py b/ipapython/secrets/store.py index 10fdcb634..30a87d4a5 100644 --- a/ipapython/secrets/store.py +++ b/ipapython/secrets/store.py @@ -217,7 +217,7 @@ NAME_DB_MAP = { } -class iSecStore(CSStore): +class IPASecStore(CSStore): def __init__(self, config=None): self.config = config @@ -255,3 +255,7 @@ class iSecStore(CSStore): 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 0f181ab6a..c0a865bb7 100755 --- a/ipapython/setup.py +++ b/ipapython/setup.py @@ -61,4 +61,12 @@ if __name__ == '__main__': extras_require={ ":python_version<'3'": ["enum34"], }, + entry_points={ + 'custodia.authorizers': [ + 'IPAKEMKeys = ipapython.secrets.kem:IPAKEMKeys', + ], + 'custodia.stores': [ + 'IPASecStore = ipapython.secrets.store:IPASecStore', + ], + }, ) -- cgit