From 9a996e7176bee98e26ea06825bce55cc4a33c182 Mon Sep 17 00:00:00 2001 From: Jens L Date: Wed, 24 May 2023 00:49:20 +0200 Subject: [PATCH] outposts: fix missing radius outpost controller (#5730) Signed-off-by: Jens Langhammer --- authentik/outposts/tasks.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/authentik/outposts/tasks.py b/authentik/outposts/tasks.py index 9c4b4f549..e10cb3026 100644 --- a/authentik/outposts/tasks.py +++ b/authentik/outposts/tasks.py @@ -42,12 +42,15 @@ from authentik.providers.ldap.controllers.docker import LDAPDockerController from authentik.providers.ldap.controllers.kubernetes import LDAPKubernetesController from authentik.providers.proxy.controllers.docker import ProxyDockerController from authentik.providers.proxy.controllers.kubernetes import ProxyKubernetesController +from authentik.providers.radius.controllers.docker import RadiusDockerController +from authentik.providers.radius.controllers.kubernetes import RadiusKubernetesController from authentik.root.celery import CELERY_APP LOGGER = get_logger() CACHE_KEY_OUTPOST_DOWN = "goauthentik.io/outposts/teardown/%s" +# pylint: disable=too-many-return-statements def controller_for_outpost(outpost: Outpost) -> Optional[type[BaseController]]: """Get a controller for the outpost, when a service connection is defined""" if not outpost.service_connection: @@ -63,6 +66,11 @@ def controller_for_outpost(outpost: Outpost) -> Optional[type[BaseController]]: return LDAPDockerController if isinstance(service_connection, KubernetesServiceConnection): return LDAPKubernetesController + if outpost.type == OutpostType.RADIUS: + if isinstance(service_connection, DockerServiceConnection): + return RadiusDockerController + if isinstance(service_connection, KubernetesServiceConnection): + return RadiusKubernetesController return None