Commit 352a4166 authored by chirac's avatar chirac Committed by Maël Kervella

Precision, clef ssh pub et pas hash stocké

parent 7ccc93cf
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-06-24 10:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('machines', '0085_auto_20180623_1817'),
]
operations = [
migrations.RenameField(
model_name='sshfingerprint',
old_name='hash_entry',
new_name='pub_key_entry',
),
migrations.AlterField(
model_name='sshfingerprint',
name='comment',
field=models.CharField(blank=True, help_text='Commentaire', max_length=255, null=True),
),
migrations.AlterField(
model_name='sshfingerprint',
name='pub_key_entry',
field=models.TextField(help_text='Clef publique ssh', max_length=2048),
),
]
......@@ -201,14 +201,22 @@ class Machine(RevMixin, FieldPermissionModelMixin, models.Model):
return str(self.user) + ' - ' + str(self.id) + ' - ' + str(self.name)
class SshFingerprint(RevMixin, AclMixin, models.Model):
"""Hash de la clef ssh d'une machine"""
"""Stockage de la clef ssh publique d'une machine
et calcul de ses hash"""
PRETTY_NAME = "Fingerprint ssh"
PRETTY_NAME = "Clef publique ssh"
machine = models.ForeignKey('Machine', on_delete=models.CASCADE)
hash_entry = models.TextField(max_length=512)
algo = models.ForeignKey('SshFprAlgo', on_delete=models.PROTECT)
pub_key_entry = models.TextField(
help_text="Clef publique ssh",
max_length=2048
)
algo = models.ForeignKey(
'SshFprAlgo',
on_delete=models.PROTECT
)
comment = models.CharField(
help_text="Commentaire",
max_length=255,
null=True,
blank=True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment