-
-
Notifications
You must be signed in to change notification settings - Fork 909
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into web/bug/grammar-on-stage-binding
* main: (159 commits) website: bump elliptic from 6.5.7 to 6.6.0 in /website (#11869) core: bump selenium from 4.25.0 to 4.26.0 (#11875) core: bump goauthentik.io/api/v3 from 3.2024083.14 to 3.2024100.1 (#11876) website/docs: add info about invalidation flow, default flows in general (#11800) website: fix docs redirect (#11873) website: remove RC disclaimer for version 2024.10 (#11871) website: update supported versions (#11841) web: bump API Client version (#11870) root: backport version bump 2024.10.0 (#11868) website/docs: 2024.8.4 release notes (#11862) web/admin: provide default invalidation flows for LDAP and Radius (#11861) core, web: update translations (#11858) web/admin: fix code-based MFA toggle not working in wizard (#11854) sources/kerberos: add kiprop to ignored system principals (#11852) translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN (#11846) translate: Updates for file locale/en/LC_MESSAGES/django.po in it (#11845) translate: Updates for file web/xliff/en.xlf in zh_CN (#11847) translate: Updates for file web/xliff/en.xlf in zh-Hans (#11848) translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans (#11849) translate: Updates for file web/xliff/en.xlf in it (#11850) ...
- Loading branch information
Showing
378 changed files
with
28,515 additions
and
3,952 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"authn", | ||
"entra", | ||
"goauthentik", | ||
"jwe", | ||
"jwks", | ||
"kubernetes", | ||
"oidc", | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from rest_framework.permissions import IsAdminUser | ||
from rest_framework.viewsets import ReadOnlyModelViewSet | ||
|
||
from authentik.admin.models import VersionHistory | ||
from authentik.core.api.utils import ModelSerializer | ||
|
||
|
||
class VersionHistorySerializer(ModelSerializer): | ||
"""VersionHistory Serializer""" | ||
|
||
class Meta: | ||
model = VersionHistory | ||
fields = [ | ||
"id", | ||
"timestamp", | ||
"version", | ||
"build", | ||
] | ||
|
||
|
||
class VersionHistoryViewSet(ReadOnlyModelViewSet): | ||
"""VersionHistory Viewset""" | ||
|
||
queryset = VersionHistory.objects.all() | ||
serializer_class = VersionHistorySerializer | ||
permission_classes = [IsAdminUser] | ||
filterset_fields = [ | ||
"version", | ||
"build", | ||
] | ||
search_fields = ["version", "build"] | ||
ordering = ["-timestamp"] | ||
pagination_class = None |
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,22 @@ | ||
"""authentik admin models""" | ||
|
||
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
|
||
class VersionHistory(models.Model): | ||
id = models.BigAutoField(primary_key=True) | ||
timestamp = models.DateTimeField() | ||
version = models.TextField() | ||
build = models.TextField() | ||
|
||
class Meta: | ||
managed = False | ||
db_table = "authentik_version_history" | ||
ordering = ("-timestamp",) | ||
verbose_name = _("Version history") | ||
verbose_name_plural = _("Version history") | ||
default_permissions = [] | ||
|
||
def __str__(self): | ||
return f"{self.version}.{self.build} ({self.timestamp})" |
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
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
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
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
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
55 changes: 55 additions & 0 deletions
55
authentik/core/migrations/0040_provider_invalidation_flow.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,55 @@ | ||
# Generated by Django 5.0.9 on 2024-10-02 11:35 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
from django.apps.registry import Apps | ||
from django.db import migrations, models | ||
from django.db.backends.base.schema import BaseDatabaseSchemaEditor | ||
|
||
|
||
def migrate_invalidation_flow_default(apps: Apps, schema_editor: BaseDatabaseSchemaEditor): | ||
from authentik.flows.models import FlowDesignation, FlowAuthenticationRequirement | ||
|
||
db_alias = schema_editor.connection.alias | ||
|
||
Flow = apps.get_model("authentik_flows", "Flow") | ||
Provider = apps.get_model("authentik_core", "Provider") | ||
|
||
# So this flow is managed via a blueprint, bue we're in a migration so we don't want to rely on that | ||
# since the blueprint is just an empty flow we can just create it here | ||
# and let it be managed by the blueprint later | ||
flow, _ = Flow.objects.using(db_alias).update_or_create( | ||
slug="default-provider-invalidation-flow", | ||
defaults={ | ||
"name": "Logged out of application", | ||
"title": "You've logged out of %(app)s.", | ||
"authentication": FlowAuthenticationRequirement.NONE, | ||
"designation": FlowDesignation.INVALIDATION, | ||
}, | ||
) | ||
Provider.objects.using(db_alias).filter(invalidation_flow=None).update(invalidation_flow=flow) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("authentik_core", "0039_source_group_matching_mode_alter_group_name_and_more"), | ||
("authentik_flows", "0027_auto_20231028_1424"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="provider", | ||
name="invalidation_flow", | ||
field=models.ForeignKey( | ||
default=None, | ||
help_text="Flow used ending the session from a provider.", | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_DEFAULT, | ||
related_name="provider_invalidation", | ||
to="authentik_flows.flow", | ||
), | ||
), | ||
migrations.RunPython(migrate_invalidation_flow_default), | ||
] |
Oops, something went wrong.