mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-17 07:48:39 -05:00
add new managed credential type for gpg pub key
Signed-off-by: Hao Liu <haoli@redhat.com>
This commit is contained in:
@@ -1171,6 +1171,25 @@ ManagedCredentialType(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ManagedCredentialType(
|
||||||
|
namespace='gpg_public_key',
|
||||||
|
kind='cryptography',
|
||||||
|
name=gettext_noop('GPG Public Key'),
|
||||||
|
inputs={
|
||||||
|
'fields': [
|
||||||
|
{
|
||||||
|
'id': 'gpg_public_key',
|
||||||
|
'label': gettext_noop('GPG Public Key'),
|
||||||
|
'type': 'string',
|
||||||
|
'secret': True,
|
||||||
|
'multiline': True,
|
||||||
|
'help_text': gettext_noop('GPG Public Key used to validate content signatures.'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'required': ['gpg_public_key'],
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CredentialInputSource(PrimordialModel):
|
class CredentialInputSource(PrimordialModel):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|||||||
@@ -74,34 +74,37 @@ GLqbpJyX2r3p/Rmo6mLY71SqpA==
|
|||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_default_cred_types():
|
def test_default_cred_types():
|
||||||
assert sorted(CredentialType.defaults.keys()) == [
|
assert sorted(CredentialType.defaults.keys()) == sorted(
|
||||||
'aim',
|
[
|
||||||
'aws',
|
'aim',
|
||||||
'azure_kv',
|
'aws',
|
||||||
'azure_rm',
|
'azure_kv',
|
||||||
'centrify_vault_kv',
|
'azure_rm',
|
||||||
'conjur',
|
'centrify_vault_kv',
|
||||||
'controller',
|
'conjur',
|
||||||
'galaxy_api_token',
|
'controller',
|
||||||
'gce',
|
'galaxy_api_token',
|
||||||
'github_token',
|
'gce',
|
||||||
'gitlab_token',
|
'github_token',
|
||||||
'hashivault_kv',
|
'gitlab_token',
|
||||||
'hashivault_ssh',
|
'gpg_public_key',
|
||||||
'insights',
|
'hashivault_kv',
|
||||||
'kubernetes_bearer_token',
|
'hashivault_ssh',
|
||||||
'net',
|
'insights',
|
||||||
'openstack',
|
'kubernetes_bearer_token',
|
||||||
'registry',
|
'net',
|
||||||
'rhv',
|
'openstack',
|
||||||
'satellite6',
|
'registry',
|
||||||
'scm',
|
'rhv',
|
||||||
'ssh',
|
'satellite6',
|
||||||
'thycotic_dsv',
|
'scm',
|
||||||
'thycotic_tss',
|
'ssh',
|
||||||
'vault',
|
'thycotic_dsv',
|
||||||
'vmware',
|
'thycotic_tss',
|
||||||
]
|
'vault',
|
||||||
|
'vmware',
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
for type_ in CredentialType.defaults.values():
|
for type_ in CredentialType.defaults.values():
|
||||||
assert type_().managed is True
|
assert type_().managed is True
|
||||||
|
|||||||
Reference in New Issue
Block a user