
* initial Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add entra mappings Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix some stuff Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make API endpoints more consistent Signed-off-by: Jens Langhammer <jens@goauthentik.io> * implement more things Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add user tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix most group tests + fix bugs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * more group tests, fix bugs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix missing __init__ Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add ui for provisioned users Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix a bunch of bugs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add `creating` to property mapping env Signed-off-by: Jens Langhammer <jens@goauthentik.io> * always sync group members Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix stuff Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix group membership Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix some types Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add group member add test Signed-off-by: Jens Langhammer <jens@goauthentik.io> * create sync status component to dedupe Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix discovery tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * get rid of more code and fix more issues Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add error handling for auth and transient Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make sure autoretry is on Signed-off-by: Jens Langhammer <jens@goauthentik.io> * format web Signed-off-by: Jens Langhammer <jens@goauthentik.io> * wait for task in signal Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add squashed google migration Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
55 lines
1.8 KiB
Python
55 lines
1.8 KiB
Python
"""Google Provider API Views"""
|
|
|
|
from rest_framework.viewsets import ModelViewSet
|
|
|
|
from authentik.core.api.providers import ProviderSerializer
|
|
from authentik.core.api.used_by import UsedByMixin
|
|
from authentik.enterprise.api import EnterpriseRequiredMixin
|
|
from authentik.enterprise.providers.google_workspace.models import GoogleWorkspaceProvider
|
|
from authentik.enterprise.providers.google_workspace.tasks import google_workspace_sync
|
|
from authentik.lib.sync.outgoing.api import OutgoingSyncProviderStatusMixin
|
|
|
|
|
|
class GoogleWorkspaceProviderSerializer(EnterpriseRequiredMixin, ProviderSerializer):
|
|
"""GoogleWorkspaceProvider Serializer"""
|
|
|
|
class Meta:
|
|
model = GoogleWorkspaceProvider
|
|
fields = [
|
|
"pk",
|
|
"name",
|
|
"property_mappings",
|
|
"property_mappings_group",
|
|
"component",
|
|
"assigned_backchannel_application_slug",
|
|
"assigned_backchannel_application_name",
|
|
"verbose_name",
|
|
"verbose_name_plural",
|
|
"meta_model_name",
|
|
"delegated_subject",
|
|
"credentials",
|
|
"scopes",
|
|
"exclude_users_service_account",
|
|
"filter_group",
|
|
"user_delete_action",
|
|
"group_delete_action",
|
|
"default_group_email_domain",
|
|
]
|
|
extra_kwargs = {}
|
|
|
|
|
|
class GoogleWorkspaceProviderViewSet(OutgoingSyncProviderStatusMixin, UsedByMixin, ModelViewSet):
|
|
"""GoogleWorkspaceProvider Viewset"""
|
|
|
|
queryset = GoogleWorkspaceProvider.objects.all()
|
|
serializer_class = GoogleWorkspaceProviderSerializer
|
|
filterset_fields = [
|
|
"name",
|
|
"exclude_users_service_account",
|
|
"delegated_subject",
|
|
"filter_group",
|
|
]
|
|
search_fields = ["name"]
|
|
ordering = ["name"]
|
|
sync_single_task = google_workspace_sync
|