This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/providers/saml/migrations/0001_initial.py

135 lines
5.2 KiB
Python
Raw Normal View History

# Generated by Django 3.0.6 on 2020-05-19 22:08
2018-11-16 10:41:14 +00:00
import django.db.models.deletion
from django.db import migrations, models
2018-11-16 10:41:14 +00:00
import passbook.lib.utils.time
2018-11-16 10:41:14 +00:00
class Migration(migrations.Migration):
initial = True
dependencies = [
("passbook_crypto", "0001_initial"),
2019-12-31 11:51:16 +00:00
("passbook_core", "0001_initial"),
2018-11-16 10:41:14 +00:00
]
operations = [
2019-10-07 14:33:48 +00:00
migrations.CreateModel(
2019-12-31 11:51:16 +00:00
name="SAMLPropertyMapping",
2019-10-07 14:33:48 +00:00
fields=[
2019-12-31 11:51:16 +00:00
(
"propertymapping_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="passbook_core.PropertyMapping",
),
),
("saml_name", models.TextField(verbose_name="SAML Name")),
2019-12-31 11:51:16 +00:00
(
"friendly_name",
models.TextField(blank=True, default=None, null=True),
),
2019-10-07 14:33:48 +00:00
],
options={
2019-12-31 11:51:16 +00:00
"verbose_name": "SAML Property Mapping",
"verbose_name_plural": "SAML Property Mappings",
2019-10-07 14:33:48 +00:00
},
2019-12-31 11:51:16 +00:00
bases=("passbook_core.propertymapping",),
2019-10-07 14:33:48 +00:00
),
2018-11-16 10:41:14 +00:00
migrations.CreateModel(
2019-12-31 11:51:16 +00:00
name="SAMLProvider",
2018-11-16 10:41:14 +00:00
fields=[
2019-12-31 11:51:16 +00:00
(
"provider_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="passbook_core.Provider",
),
),
("name", models.TextField()),
("processor_path", models.CharField(choices=[], max_length=255)),
("acs_url", models.URLField(verbose_name="ACS URL")),
2019-12-31 11:51:16 +00:00
("audience", models.TextField(default="")),
("issuer", models.TextField(help_text="Also known as EntityID")),
(
"assertion_valid_not_before",
models.TextField(
default="minutes=-5",
help_text="Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3).",
validators=[passbook.lib.utils.time.timedelta_string_validator],
),
),
(
"assertion_valid_not_on_or_after",
models.TextField(
default="minutes=5",
help_text="Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).",
validators=[passbook.lib.utils.time.timedelta_string_validator],
),
),
(
"session_valid_not_on_or_after",
models.TextField(
default="minutes=86400",
help_text="Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).",
validators=[passbook.lib.utils.time.timedelta_string_validator],
),
),
(
"digest_algorithm",
models.CharField(
choices=[("sha1", "SHA1"), ("sha256", "SHA256")],
default="sha256",
max_length=50,
),
),
(
"signature_algorithm",
models.CharField(
choices=[
("rsa-sha1", "RSA-SHA1"),
("rsa-sha256", "RSA-SHA256"),
("ecdsa-sha256", "ECDSA-SHA256"),
("dsa-sha1", "DSA-SHA1"),
],
default="rsa-sha256",
max_length=50,
),
),
(
"require_signing",
models.BooleanField(
default=False,
help_text="Require Requests to be signed by an X509 Certificate. Must match the Certificate selected in `Singing Keypair`.",
),
),
(
"signing_kp",
models.ForeignKey(
default=None,
help_text="Singing is enabled upon selection of a Key Pair.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="passbook_crypto.CertificateKeyPair",
verbose_name="Signing Keypair",
),
),
2018-11-16 10:41:14 +00:00
],
options={
2019-12-31 11:51:16 +00:00
"verbose_name": "SAML Provider",
"verbose_name_plural": "SAML Providers",
2018-11-16 10:41:14 +00:00
},
2019-12-31 11:51:16 +00:00
bases=("passbook_core.provider",),
2018-11-16 10:41:14 +00:00
),
]