def reconcile(self): return [ EnsureExists( ScopeMapping, "goauthentik.io/providers/oauth2/scope-openid", name="authentik default OAuth Mapping: OpenID 'openid'", scope_name="openid", expression=SCOPE_OPENID_EXPRESSION, ), EnsureExists( ScopeMapping, "goauthentik.io/providers/oauth2/scope-email", name="authentik default OAuth Mapping: OpenID 'email'", scope_name="email", description="Email address", expression=SCOPE_EMAIL_EXPRESSION, ), EnsureExists( ScopeMapping, "goauthentik.io/providers/oauth2/scope-profile", name="authentik default OAuth Mapping: OpenID 'profile'", scope_name="profile", description="General Profile Information", expression=SCOPE_PROFILE_EXPRESSION, ), ]
def reconcile(self): def outpost_created(outpost: Outpost): """When outpost is initially created, and we already have a service connection, auto-assign it.""" if KubernetesServiceConnection.objects.exists(): outpost.service_connection = KubernetesServiceConnection.objects.first( ) elif DockerServiceConnection.objects.exists(): outpost.service_connection = DockerServiceConnection.objects.first( ) outpost.config = OutpostConfig(kubernetes_disabled_components=[ "deployment", "secret", ]) outpost.save() return [ EnsureExists( Outpost, MANAGED_OUTPOST, created_callback=outpost_created, name="authentik Embedded Outpost", type=OutpostType.PROXY, ), ]
def reconcile(self): return [ EnsureExists( Source, "goauthentik.io/sources/inbuilt", name="authentik Built-in", ), ]
def reconcile(self): return [ EnsureExists( ScopeMapping, "goauthentik.io/providers/proxy/scope-proxy", name="authentik default OAuth Mapping: Proxy outpost", scope_name=SCOPE_AK_PROXY, expression=SCOPE_AK_PROXY_EXPRESSION, ), ]
def reconcile(self): return [ EnsureExists( LDAPPropertyMapping, "goauthentik.io/sources/ldap/default-name", name="authentik default LDAP Mapping: Name", object_field="name", expression="return ldap.get('name')", ), EnsureExists( LDAPPropertyMapping, "goauthentik.io/sources/ldap/default-mail", name="authentik default LDAP Mapping: mail", object_field="email", expression="return ldap.get('mail')", ), # Active Directory-specific mappings EnsureExists( LDAPPropertyMapping, "goauthentik.io/sources/ldap/ms-samaccountname", name= "authentik default Active Directory Mapping: sAMAccountName", object_field="username", expression="return ldap.get('sAMAccountName')", ), EnsureExists( LDAPPropertyMapping, "goauthentik.io/sources/ldap/ms-userprincipalname", name= "authentik default Active Directory Mapping: userPrincipalName", object_field="attributes.upn", expression="return ldap.get('userPrincipalName')", ), EnsureExists( LDAPPropertyMapping, "goauthentik.io/sources/ldap/ms-givenName", name="authentik default Active Directory Mapping: givenName", object_field="attributes.givenName", expression="return ldap.get('givenName')", ), EnsureExists( LDAPPropertyMapping, "goauthentik.io/sources/ldap/ms-sn", name="authentik default Active Directory Mapping: sn", object_field="attributes.sn", expression="return ldap.get('sn')", ), # OpenLDAP specific mappings EnsureExists( LDAPPropertyMapping, "goauthentik.io/sources/ldap/openldap-uid", name="authentik default OpenLDAP Mapping: uid", object_field="username", expression="return ldap.get('uid')", ), EnsureExists( LDAPPropertyMapping, "goauthentik.io/sources/ldap/openldap-cn", name="authentik default OpenLDAP Mapping: cn", object_field="name", expression="return ldap.get('cn')", ), ]
def reconcile(self): return [ EnsureExists( SAMLPropertyMapping, "goauthentik.io/providers/saml/upn", name="authentik default SAML Mapping: UPN", saml_name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn", expression="return user.attributes.get('upn', user.email)", friendly_name="", ), EnsureExists( SAMLPropertyMapping, "goauthentik.io/providers/saml/name", name="authentik default SAML Mapping: Name", saml_name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", expression="return user.name", friendly_name="", ), EnsureExists( SAMLPropertyMapping, "goauthentik.io/providers/saml/email", name="authentik default SAML Mapping: Email", saml_name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", expression="return user.email", friendly_name="", ), EnsureExists( SAMLPropertyMapping, "goauthentik.io/providers/saml/username", name="authentik default SAML Mapping: Username", saml_name="http://schemas.goauthentik.io/2021/02/saml/username", expression="return user.username", friendly_name="", ), EnsureExists( SAMLPropertyMapping, "goauthentik.io/providers/saml/uid", name="authentik default SAML Mapping: User ID", saml_name="http://schemas.goauthentik.io/2021/02/saml/uid", expression="return user.pk", friendly_name="", ), EnsureExists( SAMLPropertyMapping, "goauthentik.io/providers/saml/groups", name="authentik default SAML Mapping: Groups", saml_name="http://schemas.xmlsoap.org/claims/Group", expression=GROUP_EXPRESSION, friendly_name="", ), EnsureExists( SAMLPropertyMapping, "goauthentik.io/providers/saml/ms-windowsaccountname", name="authentik default SAML Mapping: WindowsAccountname (Username)", saml_name=( "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname" ), expression="return user.username", friendly_name="", ), ]