refactor and fix ssh_private_key and ssh_key_unlock validation

`clean_ssh_key_data` and `clean_ssh_key_unlock` no longer work because
they're not actual fields on `model.Credential` anymore.  This change
refactors/moves their validation to a place that works (and makes more
sense).
This commit is contained in:
Ryan Petrello
2017-05-12 09:21:10 -04:00
parent c04ac86df8
commit 0ac4f71e5b
4 changed files with 102 additions and 47 deletions

View File

@@ -126,7 +126,11 @@ ordered fields for that type:
"help_text": "User-facing short text describing the field.",
"type": ("string" | "number" | "ssh_private_key") # required,
"type": ("string" | "number") # required,
"format": "ssh_private_key" # optional, can be used to enforce data
# format validity for SSH private keys
# data
"secret": true, # if true, the field will be treated
# as sensitive and stored encrypted