mirror of https://github.com/jumpserver/jumpserver
84 lines
4.2 KiB
Python
84 lines
4.2 KiB
Python
# Generated by Django 3.2.14 on 2022-10-13 09:51
|
|
|
|
import common.db.fields
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import uuid
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('assets', '0108_migrate_automation'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RenameModel(
|
|
old_name='ChangePasswordAutomation',
|
|
new_name='ChangeSecretAutomation',
|
|
),
|
|
migrations.AddField(
|
|
model_name='baseautomation',
|
|
name='is_active',
|
|
field=models.BooleanField(default=True, verbose_name='Is active'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='changesecretautomation',
|
|
name='password_rules',
|
|
field=models.JSONField(default=dict, verbose_name='Password rules'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='changesecretautomation',
|
|
name='password_strategy',
|
|
field=models.CharField(choices=[('specific', 'Specific'), ('random_one', 'All assets use the same random password'), ('random_all', 'All assets use different random password')], default='random_one', max_length=16, verbose_name='Password strategy'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='changesecretautomation',
|
|
name='secret_types',
|
|
field=models.JSONField(default=list, verbose_name='Secret types'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='changesecretautomation',
|
|
name='ssh_key',
|
|
field=common.db.fields.EncryptTextField(blank=True, null=True, verbose_name='SSH key'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='changesecretautomation',
|
|
name='ssh_key_change_strategy',
|
|
field=models.CharField(choices=[('add', 'Append SSH KEY'), ('set', 'Empty and append SSH KEY'), ('set_jms', 'Replace (The key generated by JumpServer) ')], default='add', max_length=16, verbose_name='SSH key strategy'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='changesecretautomation',
|
|
name='ssh_key_strategy',
|
|
field=models.CharField(choices=[('specific', 'Specific'), ('random_one', 'All assets use the same random password'), ('random_all', 'All assets use different random password')], default='random_one', max_length=16),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='changesecretautomation',
|
|
name='recipients',
|
|
field=models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='Recipient'),
|
|
),
|
|
migrations.CreateModel(
|
|
name='ChangeSecretRecord',
|
|
fields=[
|
|
('created_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Created by')),
|
|
('updated_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Updated by')),
|
|
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')),
|
|
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
('old_secret', common.db.fields.EncryptTextField(blank=True, null=True, verbose_name='Old secret')),
|
|
('new_secret', common.db.fields.EncryptTextField(blank=True, null=True, verbose_name='Secret')),
|
|
('date_started', models.DateTimeField(blank=True, null=True, verbose_name='Date started')),
|
|
('date_finished', models.DateTimeField(blank=True, null=True, verbose_name='Date finished')),
|
|
('status', models.CharField(default='pending', max_length=16)),
|
|
('error', models.TextField(blank=True, null=True, verbose_name='Error')),
|
|
('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='assets.account')),
|
|
('execution', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assets.automationexecution')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Change secret',
|
|
},
|
|
),
|
|
]
|