From 4b1440944e031c85b38a5943c69c4649692425de Mon Sep 17 00:00:00 2001 From: Jens L Date: Mon, 13 Mar 2023 23:36:24 +0100 Subject: [PATCH] providers: fix authorization_flow not required in API (#4932) Signed-off-by: Jens Langhammer --- authentik/providers/ldap/api.py | 1 + authentik/providers/oauth2/api/providers.py | 1 + authentik/providers/proxy/api.py | 1 + authentik/providers/saml/api/providers.py | 1 + schema.yml | 20 ++++++++------------ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/authentik/providers/ldap/api.py b/authentik/providers/ldap/api.py index 51810eaf6..64876b424 100644 --- a/authentik/providers/ldap/api.py +++ b/authentik/providers/ldap/api.py @@ -26,6 +26,7 @@ class LDAPProviderSerializer(ProviderSerializer): "search_mode", "bind_mode", ] + extra_kwargs = ProviderSerializer.Meta.extra_kwargs class LDAPProviderViewSet(UsedByMixin, ModelViewSet): diff --git a/authentik/providers/oauth2/api/providers.py b/authentik/providers/oauth2/api/providers.py index f93265660..2b03dc4e6 100644 --- a/authentik/providers/oauth2/api/providers.py +++ b/authentik/providers/oauth2/api/providers.py @@ -39,6 +39,7 @@ class OAuth2ProviderSerializer(ProviderSerializer): "issuer_mode", "jwks_sources", ] + extra_kwargs = ProviderSerializer.Meta.extra_kwargs class OAuth2ProviderSetupURLs(PassiveSerializer): diff --git a/authentik/providers/proxy/api.py b/authentik/providers/proxy/api.py index 4505718ad..215a6ed37 100644 --- a/authentik/providers/proxy/api.py +++ b/authentik/providers/proxy/api.py @@ -95,6 +95,7 @@ class ProxyProviderSerializer(ProviderSerializer): "refresh_token_validity", "outpost_set", ] + extra_kwargs = ProviderSerializer.Meta.extra_kwargs class ProxyProviderViewSet(UsedByMixin, ModelViewSet): diff --git a/authentik/providers/saml/api/providers.py b/authentik/providers/saml/api/providers.py index 6dffe55fa..55328eec6 100644 --- a/authentik/providers/saml/api/providers.py +++ b/authentik/providers/saml/api/providers.py @@ -154,6 +154,7 @@ class SAMLProviderSerializer(ProviderSerializer): "url_slo_post", "url_slo_redirect", ] + extra_kwargs = ProviderSerializer.Meta.extra_kwargs class SAMLMetadataSerializer(PassiveSerializer): diff --git a/schema.yml b/schema.yml index 7cb33fe6b..505a8e74d 100644 --- a/schema.yml +++ b/schema.yml @@ -30195,7 +30195,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -30268,6 +30267,7 @@ components: required: - assigned_application_name - assigned_application_slug + - authorization_flow - component - meta_model_name - name @@ -30285,7 +30285,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -30328,6 +30327,7 @@ components: bind_mode: $ref: '#/components/schemas/LDAPAPIAccessMode' required: + - authorization_flow - name LDAPSource: type: object @@ -30927,7 +30927,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -31027,6 +31026,7 @@ components: required: - assigned_application_name - assigned_application_slug + - authorization_flow - component - meta_model_name - name @@ -31043,7 +31043,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -31121,6 +31120,7 @@ components: authenticate. title: Any JWT signed by the JWK of the selected source can be used to authenticate. required: + - authorization_flow - name OAuth2ProviderSetupURLs: type: object @@ -35608,7 +35608,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -35838,7 +35837,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -36299,7 +36297,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -36426,7 +36423,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -37873,7 +37869,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -37981,6 +37976,7 @@ components: required: - assigned_application_name - assigned_application_slug + - authorization_flow - client_id - component - external_host @@ -38001,7 +37997,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -38075,6 +38070,7 @@ components: description: 'Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).' required: + - authorization_flow - external_host - name RedirectChallenge: @@ -38315,7 +38311,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -38431,6 +38426,7 @@ components: - acs_url - assigned_application_name - assigned_application_slug + - authorization_flow - component - meta_model_name - name @@ -38471,7 +38467,6 @@ components: authorization_flow: type: string format: uuid - nullable: true description: Flow used when authorizing this provider. property_mappings: type: array @@ -38542,6 +38537,7 @@ components: * `post` - Post required: - acs_url + - authorization_flow - name SAMLSource: type: object