authentik.enterprise.providers.ws_federation.models
1from django.db import models 2from django.templatetags.static import static 3from django.utils.translation import gettext_lazy as _ 4from rest_framework.serializers import Serializer 5 6from authentik.providers.saml.models import SAMLProvider 7 8 9class WSFederationSAMLVersion(models.TextChoices): 10 """SAML Assertion version issued by a WS-Federation provider""" 11 12 SAML_1_1 = "1.1", _("SAML 1.1") 13 SAML_2_0 = "2.0", _("SAML 2.0") 14 15 16class WSFederationProvider(SAMLProvider): 17 """WS-Federation for applications which support WS-Fed.""" 18 19 # Alias'd fields: 20 # - acs_url -> reply_url 21 # - audience -> realm / wtrealm 22 23 saml_version = models.TextField( 24 choices=WSFederationSAMLVersion.choices, 25 default=WSFederationSAMLVersion.SAML_2_0, 26 help_text=_( 27 "SAML assertion version to issue in the security token. Microsoft Entra ID and " 28 "classic ADFS-style relying parties typically require SAML 1.1." 29 ), 30 ) 31 32 @property 33 def serializer(self) -> type[Serializer]: 34 from authentik.enterprise.providers.ws_federation.api.providers import ( 35 WSFederationProviderSerializer, 36 ) 37 38 return WSFederationProviderSerializer 39 40 @property 41 def icon_url(self) -> str | None: 42 return static("authentik/sources/wsfed/light.svg") 43 44 @property 45 def component(self) -> str: 46 return "ak-provider-wsfed-form" 47 48 def __str__(self): 49 return f"WS-Federation Provider {self.name}" 50 51 class Meta: 52 verbose_name = _("WS-Federation Provider") 53 verbose_name_plural = _("WS-Federation Providers")
class
WSFederationSAMLVersion(django.db.models.enums.TextChoices):
10class WSFederationSAMLVersion(models.TextChoices): 11 """SAML Assertion version issued by a WS-Federation provider""" 12 13 SAML_1_1 = "1.1", _("SAML 1.1") 14 SAML_2_0 = "2.0", _("SAML 2.0")
SAML Assertion version issued by a WS-Federation provider
SAML_1_1 =
WSFederationSAMLVersion.SAML_1_1
SAML_2_0 =
WSFederationSAMLVersion.SAML_2_0
17class WSFederationProvider(SAMLProvider): 18 """WS-Federation for applications which support WS-Fed.""" 19 20 # Alias'd fields: 21 # - acs_url -> reply_url 22 # - audience -> realm / wtrealm 23 24 saml_version = models.TextField( 25 choices=WSFederationSAMLVersion.choices, 26 default=WSFederationSAMLVersion.SAML_2_0, 27 help_text=_( 28 "SAML assertion version to issue in the security token. Microsoft Entra ID and " 29 "classic ADFS-style relying parties typically require SAML 1.1." 30 ), 31 ) 32 33 @property 34 def serializer(self) -> type[Serializer]: 35 from authentik.enterprise.providers.ws_federation.api.providers import ( 36 WSFederationProviderSerializer, 37 ) 38 39 return WSFederationProviderSerializer 40 41 @property 42 def icon_url(self) -> str | None: 43 return static("authentik/sources/wsfed/light.svg") 44 45 @property 46 def component(self) -> str: 47 return "ak-provider-wsfed-form" 48 49 def __str__(self): 50 return f"WS-Federation Provider {self.name}" 51 52 class Meta: 53 verbose_name = _("WS-Federation Provider") 54 verbose_name_plural = _("WS-Federation Providers")
WS-Federation for applications which support WS-Fed.
def
saml_version(unknown):
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
serializer: type[rest_framework.serializers.Serializer]
33 @property 34 def serializer(self) -> type[Serializer]: 35 from authentik.enterprise.providers.ws_federation.api.providers import ( 36 WSFederationProviderSerializer, 37 ) 38 39 return WSFederationProviderSerializer
Get serializer for this model
def
get_saml_version_display(unknown):
Method descriptor with partial application of the given arguments and keywords.
Supports wrapping existing descriptors and handles non-descriptor callables as instance methods.
samlprovider_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example::
class Restaurant(Model):
place = OneToOneField(Place, related_name='restaurant')
Restaurant.place is a ForwardOneToOneDescriptor instance.
Inherited Members
- authentik.providers.saml.models.SAMLProvider
- acs_url
- sp_binding
- audience
- issuer_override
- sls_url
- sls_binding
- logout_method
- name_id_mapping
- authn_context_class_ref_mapping
- assertion_valid_not_before
- assertion_valid_not_on_or_after
- session_valid_not_on_or_after
- digest_algorithm
- signature_algorithm
- verification_kp
- signing_kp
- encryption_kp
- encryption_algorithm
- default_relay_state
- default_name_id_policy
- sign_assertion
- sign_response
- sign_logout_request
- sign_logout_response
- ignore_force_authn
- jwt_federation_providers
- launch_url
- get_sp_binding_display
- get_sls_binding_display
- get_logout_method_display
- name_id_mapping_id
- authn_context_class_ref_mapping_id
- get_digest_algorithm_display
- get_signature_algorithm_display
- verification_kp_id
- signing_kp_id
- encryption_kp_id
- get_encryption_algorithm_display
- get_default_name_id_policy_display
- provider_ptr_id
- provider_ptr
- samlproviderjwtfederationprovider_set
- samlsession_set
- wsfederationprovider
- authentik.core.models.Provider
- name
- authentication_flow
- invalidation_flow
- property_mappings
- backchannel_application
- is_backchannel
- objects
- authentication_flow_id
- invalidation_flow_id
- backchannel_application_id
- id
- application
- providerpropertymapping_set
- outpost_set
- outpostprovider_set
- oauth2provider
- ldapprovider
- racprovider
- radiusprovider
- samlprovider
- scimprovider
- googleworkspaceprovider
- microsoftentraprovider
- ssfprovider
The requested object does not exist
class
WSFederationProvider.MultipleObjectsReturned(authentik.providers.saml.models.SAMLProvider.MultipleObjectsReturned):
The query returned multiple objects when only one was expected.