authentik.providers.oauth2.migrations.0011_oauth2provider_jwks_sources_and_more

 1# Generated by Django 4.0.4 on 2022-05-23 20:41
 2
 3from django.db import migrations, models
 4
 5
 6class Migration(migrations.Migration):
 7    dependencies = [
 8        (
 9            "authentik_sources_oauth",
10            "0007_oauthsource_oidc_jwks_oauthsource_oidc_jwks_url_and_more",
11        ),
12        ("authentik_crypto", "0003_certificatekeypair_managed"),
13        ("authentik_providers_oauth2", "0010_alter_oauth2provider_verification_keys"),
14    ]
15
16    operations = [
17        migrations.AddField(
18            model_name="oauth2provider",
19            name="jwks_sources",
20            field=models.ManyToManyField(
21                blank=True,
22                default=None,
23                related_name="oauth2_providers",
24                to="authentik_sources_oauth.oauthsource",
25                verbose_name=(
26                    "Any JWT signed by the JWK of the selected source can be used to authenticate."
27                ),
28            ),
29        ),
30        migrations.AlterField(
31            model_name="oauth2provider",
32            name="verification_keys",
33            field=models.ManyToManyField(
34                blank=True,
35                default=None,
36                help_text=(
37                    "JWTs created with the configured certificates can authenticate with this"
38                    " provider."
39                ),
40                related_name="oauth2_providers",
41                to="authentik_crypto.certificatekeypair",
42                verbose_name="Allowed certificates for JWT-based client_credentials",
43            ),
44        ),
45    ]
class Migration(django.db.migrations.migration.Migration):
 7class Migration(migrations.Migration):
 8    dependencies = [
 9        (
10            "authentik_sources_oauth",
11            "0007_oauthsource_oidc_jwks_oauthsource_oidc_jwks_url_and_more",
12        ),
13        ("authentik_crypto", "0003_certificatekeypair_managed"),
14        ("authentik_providers_oauth2", "0010_alter_oauth2provider_verification_keys"),
15    ]
16
17    operations = [
18        migrations.AddField(
19            model_name="oauth2provider",
20            name="jwks_sources",
21            field=models.ManyToManyField(
22                blank=True,
23                default=None,
24                related_name="oauth2_providers",
25                to="authentik_sources_oauth.oauthsource",
26                verbose_name=(
27                    "Any JWT signed by the JWK of the selected source can be used to authenticate."
28                ),
29            ),
30        ),
31        migrations.AlterField(
32            model_name="oauth2provider",
33            name="verification_keys",
34            field=models.ManyToManyField(
35                blank=True,
36                default=None,
37                help_text=(
38                    "JWTs created with the configured certificates can authenticate with this"
39                    " provider."
40                ),
41                related_name="oauth2_providers",
42                to="authentik_crypto.certificatekeypair",
43                verbose_name="Allowed certificates for JWT-based client_credentials",
44            ),
45        ),
46    ]

The base class for all migrations.

Migration files will import this from django.db.migrations.Migration and subclass it as a class called Migration. It will have one or more of the following attributes:

  • operations: A list of Operation instances, probably from django.db.migrations.operations
  • dependencies: A list of tuples of (app_path, migration_name)
  • run_before: A list of tuples of (app_path, migration_name)
  • replaces: A list of migration_names

Note that all migrations come out of migrations and into the Loader or Graph as instances, having been initialized with their app label and name.

dependencies = [('authentik_sources_oauth', '0007_oauthsource_oidc_jwks_oauthsource_oidc_jwks_url_and_more'), ('authentik_crypto', '0003_certificatekeypair_managed'), ('authentik_providers_oauth2', '0010_alter_oauth2provider_verification_keys')]
operations = [<AddField model_name='oauth2provider', name='jwks_sources', field=<django.db.models.fields.related.ManyToManyField>>, <AlterField model_name='oauth2provider', name='verification_keys', field=<django.db.models.fields.related.ManyToManyField>>]