-
-
Notifications
You must be signed in to change notification settings - Fork 998
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enterprise/providers/microsoft_entra: initial account sync to microso…
…ft entra (#9632) * 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>
- Loading branch information
Showing
85 changed files
with
6,930 additions
and
1,061 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
authentik/enterprise/providers/google_workspace/api/groups.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""GoogleWorkspaceProviderGroup API Views""" | ||
|
||
from rest_framework.viewsets import ModelViewSet | ||
|
||
from authentik.core.api.sources import SourceSerializer | ||
from authentik.core.api.used_by import UsedByMixin | ||
from authentik.core.api.users import UserGroupSerializer | ||
from authentik.enterprise.providers.google_workspace.models import GoogleWorkspaceProviderGroup | ||
|
||
|
||
class GoogleWorkspaceProviderGroupSerializer(SourceSerializer): | ||
"""GoogleWorkspaceProviderGroup Serializer""" | ||
|
||
group_obj = UserGroupSerializer(source="group", read_only=True) | ||
|
||
class Meta: | ||
|
||
model = GoogleWorkspaceProviderGroup | ||
fields = [ | ||
"id", | ||
"group", | ||
"group_obj", | ||
] | ||
|
||
|
||
class GoogleWorkspaceProviderGroupViewSet(UsedByMixin, ModelViewSet): | ||
"""GoogleWorkspaceProviderGroup Viewset""" | ||
|
||
queryset = GoogleWorkspaceProviderGroup.objects.all().select_related("group") | ||
serializer_class = GoogleWorkspaceProviderGroupSerializer | ||
filterset_fields = ["provider__id", "group__name", "group__group_uuid"] | ||
search_fields = ["provider__name", "group__name"] | ||
ordering = ["group__name"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
authentik/enterprise/providers/google_workspace/api/users.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""GoogleWorkspaceProviderUser API Views""" | ||
|
||
from rest_framework.viewsets import ModelViewSet | ||
|
||
from authentik.core.api.groups import GroupMemberSerializer | ||
from authentik.core.api.sources import SourceSerializer | ||
from authentik.core.api.used_by import UsedByMixin | ||
from authentik.enterprise.providers.google_workspace.models import GoogleWorkspaceProviderUser | ||
|
||
|
||
class GoogleWorkspaceProviderUserSerializer(SourceSerializer): | ||
"""GoogleWorkspaceProviderUser Serializer""" | ||
|
||
user_obj = GroupMemberSerializer(source="user", read_only=True) | ||
|
||
class Meta: | ||
|
||
model = GoogleWorkspaceProviderUser | ||
fields = [ | ||
"id", | ||
"user", | ||
"user_obj", | ||
] | ||
|
||
|
||
class GoogleWorkspaceProviderUserViewSet(UsedByMixin, ModelViewSet): | ||
"""GoogleWorkspaceProviderUser Viewset""" | ||
|
||
queryset = GoogleWorkspaceProviderUser.objects.all().select_related("user") | ||
serializer_class = GoogleWorkspaceProviderUserSerializer | ||
filterset_fields = ["provider__id", "user__username", "user__id"] | ||
search_fields = ["provider__name", "user__username"] | ||
ordering = ["user__username"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lumhtawng2002May 25, 2024