authentik.sources.kerberos.migrations.0001_initial
1# Generated by Django 5.0.9 on 2024-09-23 11:27 2 3import django.db.models.deletion 4from django.db import migrations, models 5 6 7class Migration(migrations.Migration): 8 9 initial = True 10 11 dependencies = [ 12 ("authentik_core", "0039_source_group_matching_mode_alter_group_name_and_more"), 13 ] 14 15 operations = [ 16 migrations.CreateModel( 17 name="GroupKerberosSourceConnection", 18 fields=[ 19 ( 20 "groupsourceconnection_ptr", 21 models.OneToOneField( 22 auto_created=True, 23 on_delete=django.db.models.deletion.CASCADE, 24 parent_link=True, 25 primary_key=True, 26 serialize=False, 27 to="authentik_core.groupsourceconnection", 28 ), 29 ), 30 ], 31 options={ 32 "verbose_name": "Group Kerberos Source Connection", 33 "verbose_name_plural": "Group Kerberos Source Connections", 34 }, 35 bases=("authentik_core.groupsourceconnection",), 36 ), 37 migrations.CreateModel( 38 name="KerberosSource", 39 fields=[ 40 ( 41 "source_ptr", 42 models.OneToOneField( 43 auto_created=True, 44 on_delete=django.db.models.deletion.CASCADE, 45 parent_link=True, 46 primary_key=True, 47 serialize=False, 48 to="authentik_core.source", 49 ), 50 ), 51 ("realm", models.TextField(help_text="Kerberos realm", unique=True)), 52 ( 53 "krb5_conf", 54 models.TextField( 55 blank=True, 56 help_text="Custom krb5.conf to use. Uses the system one by default", 57 ), 58 ), 59 ( 60 "sync_users", 61 models.BooleanField( 62 db_index=True, 63 default=False, 64 help_text="Sync users from Kerberos into authentik", 65 ), 66 ), 67 ( 68 "sync_users_password", 69 models.BooleanField( 70 db_index=True, 71 default=True, 72 help_text="When a user changes their password, sync it back to Kerberos", 73 ), 74 ), 75 ( 76 "sync_principal", 77 models.TextField( 78 blank=True, help_text="Principal to authenticate to kadmin for sync." 79 ), 80 ), 81 ( 82 "sync_password", 83 models.TextField( 84 blank=True, help_text="Password to authenticate to kadmin for sync" 85 ), 86 ), 87 ( 88 "sync_keytab", 89 models.TextField( 90 blank=True, 91 help_text="Keytab to authenticate to kadmin for sync. Must be base64-encoded or in the form TYPE:residual", 92 ), 93 ), 94 ( 95 "sync_ccache", 96 models.TextField( 97 blank=True, 98 help_text="Credentials cache to authenticate to kadmin for sync. Must be in the form TYPE:residual", 99 ), 100 ), 101 ( 102 "spnego_server_name", 103 models.TextField( 104 blank=True, 105 help_text="Force the use of a specific server name for SPNEGO. Must be in the form HTTP@hostname", 106 ), 107 ), 108 ( 109 "spnego_keytab", 110 models.TextField( 111 blank=True, 112 help_text="SPNEGO keytab base64-encoded or path to keytab in the form FILE:path", 113 ), 114 ), 115 ( 116 "spnego_ccache", 117 models.TextField( 118 blank=True, 119 help_text="Credential cache to use for SPNEGO in form type:residual", 120 ), 121 ), 122 ( 123 "password_login_update_internal_password", 124 models.BooleanField( 125 default=False, 126 help_text="If enabled, the authentik-stored password will be updated upon login with the Kerberos password backend", 127 ), 128 ), 129 ], 130 options={ 131 "verbose_name": "Kerberos Source", 132 "verbose_name_plural": "Kerberos Sources", 133 }, 134 bases=("authentik_core.source",), 135 ), 136 migrations.CreateModel( 137 name="KerberosSourcePropertyMapping", 138 fields=[ 139 ( 140 "propertymapping_ptr", 141 models.OneToOneField( 142 auto_created=True, 143 on_delete=django.db.models.deletion.CASCADE, 144 parent_link=True, 145 primary_key=True, 146 serialize=False, 147 to="authentik_core.propertymapping", 148 ), 149 ), 150 ], 151 options={ 152 "verbose_name": "Kerberos Source Property Mapping", 153 "verbose_name_plural": "Kerberos Source Property Mappings", 154 }, 155 bases=("authentik_core.propertymapping",), 156 ), 157 migrations.CreateModel( 158 name="UserKerberosSourceConnection", 159 fields=[ 160 ( 161 "usersourceconnection_ptr", 162 models.OneToOneField( 163 auto_created=True, 164 on_delete=django.db.models.deletion.CASCADE, 165 parent_link=True, 166 primary_key=True, 167 serialize=False, 168 to="authentik_core.usersourceconnection", 169 ), 170 ), 171 ("identifier", models.TextField()), 172 ], 173 options={ 174 "verbose_name": "User Kerberos Source Connection", 175 "verbose_name_plural": "User Kerberos Source Connections", 176 }, 177 bases=("authentik_core.usersourceconnection",), 178 ), 179 ]
class
Migration(django.db.migrations.migration.Migration):
8class Migration(migrations.Migration): 9 10 initial = True 11 12 dependencies = [ 13 ("authentik_core", "0039_source_group_matching_mode_alter_group_name_and_more"), 14 ] 15 16 operations = [ 17 migrations.CreateModel( 18 name="GroupKerberosSourceConnection", 19 fields=[ 20 ( 21 "groupsourceconnection_ptr", 22 models.OneToOneField( 23 auto_created=True, 24 on_delete=django.db.models.deletion.CASCADE, 25 parent_link=True, 26 primary_key=True, 27 serialize=False, 28 to="authentik_core.groupsourceconnection", 29 ), 30 ), 31 ], 32 options={ 33 "verbose_name": "Group Kerberos Source Connection", 34 "verbose_name_plural": "Group Kerberos Source Connections", 35 }, 36 bases=("authentik_core.groupsourceconnection",), 37 ), 38 migrations.CreateModel( 39 name="KerberosSource", 40 fields=[ 41 ( 42 "source_ptr", 43 models.OneToOneField( 44 auto_created=True, 45 on_delete=django.db.models.deletion.CASCADE, 46 parent_link=True, 47 primary_key=True, 48 serialize=False, 49 to="authentik_core.source", 50 ), 51 ), 52 ("realm", models.TextField(help_text="Kerberos realm", unique=True)), 53 ( 54 "krb5_conf", 55 models.TextField( 56 blank=True, 57 help_text="Custom krb5.conf to use. Uses the system one by default", 58 ), 59 ), 60 ( 61 "sync_users", 62 models.BooleanField( 63 db_index=True, 64 default=False, 65 help_text="Sync users from Kerberos into authentik", 66 ), 67 ), 68 ( 69 "sync_users_password", 70 models.BooleanField( 71 db_index=True, 72 default=True, 73 help_text="When a user changes their password, sync it back to Kerberos", 74 ), 75 ), 76 ( 77 "sync_principal", 78 models.TextField( 79 blank=True, help_text="Principal to authenticate to kadmin for sync." 80 ), 81 ), 82 ( 83 "sync_password", 84 models.TextField( 85 blank=True, help_text="Password to authenticate to kadmin for sync" 86 ), 87 ), 88 ( 89 "sync_keytab", 90 models.TextField( 91 blank=True, 92 help_text="Keytab to authenticate to kadmin for sync. Must be base64-encoded or in the form TYPE:residual", 93 ), 94 ), 95 ( 96 "sync_ccache", 97 models.TextField( 98 blank=True, 99 help_text="Credentials cache to authenticate to kadmin for sync. Must be in the form TYPE:residual", 100 ), 101 ), 102 ( 103 "spnego_server_name", 104 models.TextField( 105 blank=True, 106 help_text="Force the use of a specific server name for SPNEGO. Must be in the form HTTP@hostname", 107 ), 108 ), 109 ( 110 "spnego_keytab", 111 models.TextField( 112 blank=True, 113 help_text="SPNEGO keytab base64-encoded or path to keytab in the form FILE:path", 114 ), 115 ), 116 ( 117 "spnego_ccache", 118 models.TextField( 119 blank=True, 120 help_text="Credential cache to use for SPNEGO in form type:residual", 121 ), 122 ), 123 ( 124 "password_login_update_internal_password", 125 models.BooleanField( 126 default=False, 127 help_text="If enabled, the authentik-stored password will be updated upon login with the Kerberos password backend", 128 ), 129 ), 130 ], 131 options={ 132 "verbose_name": "Kerberos Source", 133 "verbose_name_plural": "Kerberos Sources", 134 }, 135 bases=("authentik_core.source",), 136 ), 137 migrations.CreateModel( 138 name="KerberosSourcePropertyMapping", 139 fields=[ 140 ( 141 "propertymapping_ptr", 142 models.OneToOneField( 143 auto_created=True, 144 on_delete=django.db.models.deletion.CASCADE, 145 parent_link=True, 146 primary_key=True, 147 serialize=False, 148 to="authentik_core.propertymapping", 149 ), 150 ), 151 ], 152 options={ 153 "verbose_name": "Kerberos Source Property Mapping", 154 "verbose_name_plural": "Kerberos Source Property Mappings", 155 }, 156 bases=("authentik_core.propertymapping",), 157 ), 158 migrations.CreateModel( 159 name="UserKerberosSourceConnection", 160 fields=[ 161 ( 162 "usersourceconnection_ptr", 163 models.OneToOneField( 164 auto_created=True, 165 on_delete=django.db.models.deletion.CASCADE, 166 parent_link=True, 167 primary_key=True, 168 serialize=False, 169 to="authentik_core.usersourceconnection", 170 ), 171 ), 172 ("identifier", models.TextField()), 173 ], 174 options={ 175 "verbose_name": "User Kerberos Source Connection", 176 "verbose_name_plural": "User Kerberos Source Connections", 177 }, 178 bases=("authentik_core.usersourceconnection",), 179 ), 180 ]
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.
operations =
[<CreateModel name='GroupKerberosSourceConnection', fields=[('groupsourceconnection_ptr', <django.db.models.fields.related.OneToOneField>)], options={'verbose_name': 'Group Kerberos Source Connection', 'verbose_name_plural': 'Group Kerberos Source Connections'}, bases=('authentik_core.groupsourceconnection',)>, <CreateModel name='KerberosSource', fields=[('source_ptr', <django.db.models.fields.related.OneToOneField>), ('realm', <django.db.models.fields.TextField>), ('krb5_conf', <django.db.models.fields.TextField>), ('sync_users', <django.db.models.fields.BooleanField>), ('sync_users_password', <django.db.models.fields.BooleanField>), ('sync_principal', <django.db.models.fields.TextField>), ('sync_password', <django.db.models.fields.TextField>), ('sync_keytab', <django.db.models.fields.TextField>), ('sync_ccache', <django.db.models.fields.TextField>), ('spnego_server_name', <django.db.models.fields.TextField>), ('spnego_keytab', <django.db.models.fields.TextField>), ('spnego_ccache', <django.db.models.fields.TextField>), ('password_login_update_internal_password', <django.db.models.fields.BooleanField>)], options={'verbose_name': 'Kerberos Source', 'verbose_name_plural': 'Kerberos Sources'}, bases=('authentik_core.source',)>, <CreateModel name='KerberosSourcePropertyMapping', fields=[('propertymapping_ptr', <django.db.models.fields.related.OneToOneField>)], options={'verbose_name': 'Kerberos Source Property Mapping', 'verbose_name_plural': 'Kerberos Source Property Mappings'}, bases=('authentik_core.propertymapping',)>, <CreateModel name='UserKerberosSourceConnection', fields=[('usersourceconnection_ptr', <django.db.models.fields.related.OneToOneField>), ('identifier', <django.db.models.fields.TextField>)], options={'verbose_name': 'User Kerberos Source Connection', 'verbose_name_plural': 'User Kerberos Source Connections'}, bases=('authentik_core.usersourceconnection',)>]