From 909461e5337580bd299cd6c6ef21a5e32a831ab4 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 5 Nov 2021 01:03:16 +0100 Subject: [PATCH] providers/*: include list of outposts Signed-off-by: Jens Langhammer --- authentik/providers/ldap/api.py | 5 ++++- authentik/providers/proxy/api.py | 2 ++ schema.yml | 12 ++++++++++++ website/docs/releases/v2021.10.md | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/authentik/providers/ldap/api.py b/authentik/providers/ldap/api.py index ecd086be02..05e1036d0f 100644 --- a/authentik/providers/ldap/api.py +++ b/authentik/providers/ldap/api.py @@ -1,5 +1,5 @@ """LDAPProvider API Views""" -from rest_framework.fields import CharField +from rest_framework.fields import CharField, ListField from rest_framework.serializers import ModelSerializer from rest_framework.viewsets import ModelViewSet, ReadOnlyModelViewSet @@ -11,6 +11,8 @@ from authentik.providers.ldap.models import LDAPProvider class LDAPProviderSerializer(ProviderSerializer): """LDAPProvider Serializer""" + outpost_set = ListField(child=CharField(), read_only=True) + class Meta: model = LDAPProvider @@ -21,6 +23,7 @@ class LDAPProviderSerializer(ProviderSerializer): "tls_server_name", "uid_start_number", "gid_start_number", + "outpost_set", ] diff --git a/authentik/providers/proxy/api.py b/authentik/providers/proxy/api.py index c1224b4dfc..f9ac69e75c 100644 --- a/authentik/providers/proxy/api.py +++ b/authentik/providers/proxy/api.py @@ -36,6 +36,7 @@ class ProxyProviderSerializer(ProviderSerializer): """ProxyProvider Serializer""" redirect_uris = CharField(read_only=True) + outpost_set = ListField(child=CharField(), read_only=True) def validate(self, attrs) -> dict[Any, str]: """Check that internal_host is set when mode is Proxy""" @@ -74,6 +75,7 @@ class ProxyProviderSerializer(ProviderSerializer): "redirect_uris", "cookie_domain", "token_validity", + "outpost_set", ] diff --git a/schema.yml b/schema.yml index 1d1cd67dca..0b58de6cc3 100644 --- a/schema.yml +++ b/schema.yml @@ -22168,12 +22168,18 @@ components: generated from the group.Pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber + outpost_set: + type: array + items: + type: string + readOnly: true required: - assigned_application_name - assigned_application_slug - authorization_flow - component - name + - outpost_set - pk - verbose_name - verbose_name_plural @@ -28652,6 +28658,11 @@ components: type: string description: 'Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).' + outpost_set: + type: array + items: + type: string + readOnly: true required: - assigned_application_name - assigned_application_slug @@ -28659,6 +28670,7 @@ components: - component - external_host - name + - outpost_set - pk - redirect_uris - verbose_name diff --git a/website/docs/releases/v2021.10.md b/website/docs/releases/v2021.10.md index 65d68476b3..1ed2ac923a 100644 --- a/website/docs/releases/v2021.10.md +++ b/website/docs/releases/v2021.10.md @@ -173,7 +173,7 @@ A huge shoutout to all the people that contributed, helped test and also transla - stages/authenticator_*: add default name for authenticators - web/admin: only show flows with an invitation stage configured instead of all enrollment flows - web/admin: show warning on invitation list when no stage exists or is bound -- web/flows: fix authenticator_validate not allowing alpha-numeric codes due to empty pattern +- web/flows: fix authenticator_validate not allowing alphanumeric codes due to empty pattern - web/flows: improve display of static tokens - web/user: fix ak-user-settings-password getting wrong configureUrl - web/user: fix device type for static tokens