diff --git a/authentik/policies/event_matcher/migrations/0014_alter_eventmatcherpolicy_app.py b/authentik/policies/event_matcher/migrations/0014_alter_eventmatcherpolicy_app.py new file mode 100644 index 000000000..c424c2b86 --- /dev/null +++ b/authentik/policies/event_matcher/migrations/0014_alter_eventmatcherpolicy_app.py @@ -0,0 +1,85 @@ +# Generated by Django 3.2.1 on 2021-05-05 17:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_policies_event_matcher", "0013_alter_eventmatcherpolicy_app"), + ] + + operations = [ + migrations.AlterField( + model_name="eventmatcherpolicy", + name="app", + field=models.TextField( + blank=True, + choices=[ + ("authentik.admin", "authentik Admin"), + ("authentik.api", "authentik API"), + ("authentik.events", "authentik Events"), + ("authentik.crypto", "authentik Crypto"), + ("authentik.flows", "authentik Flows"), + ("authentik.outposts", "authentik Outpost"), + ("authentik.lib", "authentik lib"), + ("authentik.policies", "authentik Policies"), + ("authentik.policies.dummy", "authentik Policies.Dummy"), + ( + "authentik.policies.event_matcher", + "authentik Policies.Event Matcher", + ), + ("authentik.policies.expiry", "authentik Policies.Expiry"), + ("authentik.policies.expression", "authentik Policies.Expression"), + ("authentik.policies.hibp", "authentik Policies.HaveIBeenPwned"), + ("authentik.policies.password", "authentik Policies.Password"), + ("authentik.policies.reputation", "authentik Policies.Reputation"), + ("authentik.providers.proxy", "authentik Providers.Proxy"), + ("authentik.providers.ldap", "authentik Providers.LDAP"), + ("authentik.providers.oauth2", "authentik Providers.OAuth2"), + ("authentik.providers.saml", "authentik Providers.SAML"), + ("authentik.recovery", "authentik Recovery"), + ("authentik.sources.ldap", "authentik Sources.LDAP"), + ("authentik.sources.oauth", "authentik Sources.OAuth"), + ("authentik.sources.plex", "authentik Sources.Plex"), + ("authentik.sources.saml", "authentik Sources.SAML"), + ( + "authentik.stages.authenticator_static", + "authentik Stages.Authenticator.Static", + ), + ( + "authentik.stages.authenticator_totp", + "authentik Stages.Authenticator.TOTP", + ), + ( + "authentik.stages.authenticator_validate", + "authentik Stages.Authenticator.Validate", + ), + ( + "authentik.stages.authenticator_webauthn", + "authentik Stages.Authenticator.WebAuthn", + ), + ("authentik.stages.captcha", "authentik Stages.Captcha"), + ("authentik.stages.consent", "authentik Stages.Consent"), + ("authentik.stages.deny", "authentik Stages.Deny"), + ("authentik.stages.dummy", "authentik Stages.Dummy"), + ("authentik.stages.email", "authentik Stages.Email"), + ( + "authentik.stages.identification", + "authentik Stages.Identification", + ), + ("authentik.stages.invitation", "authentik Stages.User Invitation"), + ("authentik.stages.password", "authentik Stages.Password"), + ("authentik.stages.prompt", "authentik Stages.Prompt"), + ("authentik.stages.user_delete", "authentik Stages.User Delete"), + ("authentik.stages.user_login", "authentik Stages.User Login"), + ("authentik.stages.user_logout", "authentik Stages.User Logout"), + ("authentik.stages.user_write", "authentik Stages.User Write"), + ("authentik.core", "authentik Core"), + ("authentik.managed", "authentik Managed"), + ], + default="", + help_text="Match events created by selected application. When left empty, all applications are matched.", + ), + ), + ] diff --git a/authentik/sources/plex/migrations/0001_initial.py b/authentik/sources/plex/migrations/0001_initial.py index c5b87959b..b1d99c80d 100644 --- a/authentik/sources/plex/migrations/0001_initial.py +++ b/authentik/sources/plex/migrations/0001_initial.py @@ -3,6 +3,7 @@ import django.contrib.postgres.fields import django.db.models.deletion from django.db import migrations, models +import authentik.providers.oauth2.generators class Migration(migrations.Migration): @@ -31,7 +32,7 @@ class Migration(migrations.Migration): ( "client_id", models.TextField( - default="yOuPQQvgNfBGreZZ38WoOY1d3qk3Xso2AuQHi6RG", + default=authentik.providers.oauth2.generators.generate_client_id, help_text="Client identifier used to talk to Plex.", ), ), diff --git a/authentik/sources/plex/models.py b/authentik/sources/plex/models.py index f7d48a146..1feed40a9 100644 --- a/authentik/sources/plex/models.py +++ b/authentik/sources/plex/models.py @@ -23,7 +23,7 @@ class PlexSource(Source): """Authenticate against plex.tv""" client_id = models.TextField( - default=generate_client_id(), + default=generate_client_id, help_text=_("Client identifier used to talk to Plex."), ) allowed_servers = ArrayField(