зеркало из https://github.com/microsoft/azure-cli.git
[KeyVault] KeyVault Round 3 Commands (#1215)
* Key backup/restore/import. Certificate import. Pending certificate operations. * Fix build errors and help text. * Code review fix.
This commit is contained in:
Родитель
fd5cfec77b
Коммит
81372d0c3f
|
@ -74,33 +74,23 @@
|
|||
<Compile Include="azure-cli\setup.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\credential.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\custom.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\container_registry.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\container_registry_management_client.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\credentials.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\exceptions.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_create_parameters.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_credentials.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_move_request.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_name_check_request.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_name_status.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_properties.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_properties_create_parameters.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_paged.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_update_parameters.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\resource_list_registry.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\storage_account_base_properties.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\resource.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\storage_account_properties.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\subscription_notification.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\subscription_properties.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\operation.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\registries.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\subscriptions.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\registries_operations.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\version.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\repository.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\storage.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\_arm_utils.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\_constants.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\_factory.py" />
|
||||
<Compile Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\_format.py" />
|
||||
|
@ -729,9 +719,7 @@
|
|||
<Folder Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\" />
|
||||
<Folder Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\" />
|
||||
<Folder Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\" />
|
||||
<Folder Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\" />
|
||||
<Folder Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\" />
|
||||
<Folder Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\__pycache__\" />
|
||||
<Folder Include="command_modules\azure-cli-acs\" />
|
||||
<Folder Include="command_modules\azure-cli-acs\azure\" />
|
||||
<Folder Include="command_modules\azure-cli-acs\azure\cli\" />
|
||||
|
@ -911,46 +899,6 @@
|
|||
<Content Include="azure-cli-core\setup.cfg" />
|
||||
<Content Include="azure-cli\az.completion.sh" />
|
||||
<Content Include="azure-cli\setup.cfg" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_create_parameters.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_credentials.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_move_request.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_name_check_request.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_name_status.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_properties.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_properties_create_parameters.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\registry_update_parameters.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\resource_list_registry.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\storage_account_base_properties.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\storage_account_properties.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\subscription_notification.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\subscription_properties.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__init__.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry_create_parameters.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry_credentials.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry_move_request.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry_name_check_request.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry_name_status.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry_properties.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry_properties_create_parameters.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\registry_update_parameters.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\resource_list_registry.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\storage_account_base_properties.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\storage_account_properties.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\subscription_notification.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\subscription_properties.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\models\__pycache__\__init__.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\operation.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\registries.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\subscriptions.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\__init__.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\__pycache__\operation.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\__pycache__\registries.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\__pycache__\subscriptions.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\mgmt_acr\operations\__pycache__\__init__.cpython-35.pyc" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\template.existing.json" />
|
||||
<Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\template.new.json" />
|
||||
<Content Include="command_modules\azure-cli-acr\requirements.txt" />
|
||||
<Content Include="command_modules\azure-cli-acs\requirements.txt" />
|
||||
<Content Include="command_modules\azure-cli-component\requirements.txt" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.24720.0
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "azure-cli", "azure-cli.pyproj", "{938454F7-93BD-41A7-84B2-3C89D64B969D}"
|
||||
EndProject
|
||||
|
|
|
@ -8,6 +8,7 @@ paramiko==2.0.2
|
|||
pip
|
||||
pygments==2.1.3
|
||||
pylint==1.5.4
|
||||
pyOpenSSL==16.1.0
|
||||
pyyaml==3.11
|
||||
requests==2.9.1
|
||||
six==1.10.0
|
||||
|
|
|
@ -17,6 +17,7 @@ def extract_full_summary_from_signature(operation):
|
|||
summary = lines[:match.regs[0][0]]
|
||||
else:
|
||||
summary = lines
|
||||
summary = summary.replace('\n', ' ').replace('\r', '')
|
||||
return summary
|
||||
|
||||
def _option_descriptions(operation):
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import base64
|
||||
|
||||
from msrest.paging import Paged
|
||||
from msrest.exceptions import ValidationError
|
||||
from msrest.exceptions import ValidationError, ClientRequestError
|
||||
from msrestazure.azure_operation import AzureOperationPoller
|
||||
|
||||
from azure.cli.core.commands import command_table, CliCommand, LongRunningOperation
|
||||
|
@ -78,6 +78,11 @@ def _create_key_vault_command(name, operation, transform_result, table_transform
|
|||
raise CLIError(ex.inner_exception.error.message)
|
||||
except AttributeError:
|
||||
raise CLIError(ex)
|
||||
except ClientRequestError as ex:
|
||||
if 'Failed to establish a new connection' in str(ex.inner_exception):
|
||||
raise CLIError('Max retries exceeded attempting to connect to vault. '
|
||||
'Try flushing your DNS cache or try again later.')
|
||||
raise CLIError(ex)
|
||||
|
||||
name = ' '.join(name.split())
|
||||
cmd = CliCommand(name, _execute_command, table_transformer=table_transformer)
|
||||
|
|
|
@ -54,6 +54,11 @@ helps['keyvault certificate'] = """
|
|||
short-summary: Manage certificates.
|
||||
"""
|
||||
|
||||
helps['keyvault certificate pending'] = """
|
||||
type: group
|
||||
short-summary: Manage pending certificate creation operations.
|
||||
"""
|
||||
|
||||
helps['keyvault certificate contact'] = """
|
||||
type: group
|
||||
short-summary: Manage contacts for certificate management.
|
||||
|
|
|
@ -20,11 +20,13 @@ from azure.cli.command_modules.keyvault.keyvaultclient.generated.models.key_vaul
|
|||
from azure.cli.command_modules.keyvault.keyvaultclient.generated.models import \
|
||||
(KeyAttributes, SecretAttributes, CertificateAttributes)
|
||||
from azure.cli.command_modules.keyvault._validators import \
|
||||
(datetime_type,
|
||||
(datetime_type, base64_encoded_certificate_type,
|
||||
get_attribute_validator,
|
||||
vault_base_url_type, validate_key_import_source,
|
||||
validate_key_type, validate_key_ops, validate_policy_permissions,
|
||||
validate_principal, validate_resource_group_name)
|
||||
validate_principal, validate_resource_group_name,
|
||||
validate_x509_certificate_chain,
|
||||
process_certificate_cancel_namespace)
|
||||
|
||||
# CUSTOM CHOICE LISTS
|
||||
|
||||
|
@ -32,6 +34,9 @@ key_permission_values = ', '.join([x.value for x in KeyPermissions])
|
|||
secret_permission_values = ', '.join([x.value for x in SecretPermissions])
|
||||
certificate_permission_values = ', '.join([x.value for x in CertificatePermissions])
|
||||
json_web_key_op_values = ', '.join([x.value for x in JsonWebKeyOperation])
|
||||
secret_file_encoding_values = ['utf8', 'utf16le', 'ucs2', 'ascii']
|
||||
secret_file_decoding_values = ['base64', 'hex']
|
||||
certificate_file_encoding_values = ['base64']
|
||||
|
||||
# KEY ATTRIBUTE PARAMETER REGISTRATION
|
||||
|
||||
|
@ -87,6 +92,10 @@ register_cli_argument('keyvault key import', 'pem_file', help='PEM file containi
|
|||
register_cli_argument('keyvault key import', 'pem_password', help='Password of PEM file.', arg_group='Key Source')
|
||||
register_cli_argument('keyvault key import', 'byok_file', help='BYOK file containing the key to be imported. Must not be password protected.', arg_group='Key Source')
|
||||
|
||||
register_cli_argument('keyvault key backup', 'file_path', options_list=('--file', '-f'), help='Local file path in which to store key backup.')
|
||||
|
||||
register_cli_argument('keyvault key restore', 'file_path', options_list=('--file', '-f'), help='Local key backup from which to restore key.')
|
||||
|
||||
register_attributes_argument('keyvault key set-attributes', 'key', KeyAttributes)
|
||||
|
||||
register_cli_argument('keyvault secret', 'secret_version', options_list=('--version', '-v'), help='The secret version. If omitted, uses the latest version.', default='', required=False)
|
||||
|
@ -96,11 +105,19 @@ register_attributes_argument('keyvault secret set-attributes', 'secret', SecretA
|
|||
|
||||
register_cli_argument('keyvault certificate', 'certificate_version', options_list=('--version', '-v'), help='The certificate version. If omitted, uses the latest version.', default='', required=False)
|
||||
register_attributes_argument('keyvault certificate create', 'certificate', CertificateAttributes, True)
|
||||
register_attributes_argument('keyvault certificate import', 'certificate', CertificateAttributes, True)
|
||||
register_attributes_argument('keyvault certificate set-attributes', 'certificate', CertificateAttributes)
|
||||
for item in ['create', 'set-attributes']:
|
||||
for item in ['create', 'set-attributes', 'import']:
|
||||
register_cli_argument('keyvault certificate {}'.format(item), 'certificate_policy', options_list=('--policy', '-p'), help='JSON encoded policy defintion. Use @{file} to load from a file.', type=get_json_object)
|
||||
|
||||
register_cli_argument('keyvault certificate contact', 'contact_email', options_list=('--email',), help='Contact e-mail address. Must be unique within the vault.')
|
||||
register_cli_argument('keyvault certificate import', 'base64_encoded_certificate', options_list=('--file', '-f'), help='PKCS12 file or PEM file containing the certificate and private key.', type=base64_encoded_certificate_type)
|
||||
|
||||
register_cli_argument('keyvault certificate pending merge', 'x509_certificates', options_list=('--file', '-f'), help='File containing the certificate or certificate chain to merge.', validator=validate_x509_certificate_chain)
|
||||
register_attributes_argument('keyvault certificate pending merge', 'certificate', CertificateAttributes, True)
|
||||
|
||||
register_cli_argument('keyvault certificate pending cancel', 'cancellation_requested', ignore_type, validator=process_certificate_cancel_namespace)
|
||||
|
||||
register_cli_argument('keyvault certificate contact', 'contact_email', options_list=('--email',), help='Contact e-mail address. Must be unique.')
|
||||
register_cli_argument('keyvault certificate contact', 'contact_name', options_list=('--name',), help='Full contact name.')
|
||||
register_cli_argument('keyvault certificate contact', 'contact_phone', options_list=('--phone',), help='Contact phone number.')
|
||||
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
#---------------------------------------------------------------------------------------------
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
import binascii
|
||||
from datetime import datetime
|
||||
import re
|
||||
|
||||
from azure.mgmt.keyvault import KeyVaultManagementClient
|
||||
from azure.mgmt.keyvault.models.key_vault_management_client_enums import \
|
||||
|
@ -22,6 +25,9 @@ def _extract_version(item_id):
|
|||
|
||||
# COMMAND NAMESPACE VALIDATORS
|
||||
|
||||
def process_certificate_cancel_namespace(namespace):
|
||||
namespace.cancellation_requested = True
|
||||
|
||||
# PARAMETER NAMESPACE VALIDATORS
|
||||
|
||||
def get_attribute_validator(name, attribute_class, create=False):
|
||||
|
@ -61,6 +67,8 @@ def validate_key_type(ns):
|
|||
'hsm': 'RSA-HSM'
|
||||
}
|
||||
ns.destination = dest_to_type_map[ns.destination]
|
||||
if ns.destination == 'RSA' and hasattr(ns, 'byok_file') and ns.byok_file:
|
||||
raise CLIError('BYOK keys are hardware protected. Omit --protection')
|
||||
|
||||
def validate_policy_permissions(ns):
|
||||
key_perms = ns.key_permissions
|
||||
|
@ -108,10 +116,33 @@ def validate_resource_group_name(ns):
|
|||
"The Resource 'Microsoft.KeyVault/vaults/{}'".format(vault_name) + \
|
||||
" not found within subscription")
|
||||
|
||||
def validate_x509_certificate_chain(ns):
|
||||
def _load_certificate_as_bytes(file_name):
|
||||
cert_list = []
|
||||
regex = r'-----BEGIN CERTIFICATE-----([^-]+)-----END CERTIFICATE-----'
|
||||
with open(file_name, 'r') as f:
|
||||
cert_data = f.read()
|
||||
for entry in re.findall(regex, cert_data):
|
||||
cert_list.append(base64.b64decode(entry.replace('\n', '')))
|
||||
return cert_list
|
||||
|
||||
ns.x509_certificates = _load_certificate_as_bytes(ns.x509_certificates)
|
||||
|
||||
# ARGUMENT TYPES
|
||||
|
||||
def base64_encoded_certificate_type(string):
|
||||
""" Loads file and outputs contents as base64 encoded string. """
|
||||
with open(string, 'rb') as f:
|
||||
cert_data = f.read()
|
||||
try:
|
||||
# for PEM files (including automatic endline conversion for Windows)
|
||||
cert_data = cert_data.decode('utf-8').replace('\r\n', '\n')
|
||||
except UnicodeDecodeError:
|
||||
cert_data = binascii.b2a_base64(cert_data).decode('utf-8')
|
||||
return cert_data
|
||||
|
||||
def datetime_type(string):
|
||||
''' Validates UTC datettime in format '%Y-%m-%d\'T\'%H:%M\'Z\''. '''
|
||||
""" Validates UTC datettime in format '%Y-%m-%d\'T\'%H:%M\'Z\''. """
|
||||
date_format = '%Y-%m-%dT%H:%MZ'
|
||||
return datetime.strptime(string, date_format)
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@ from azure.cli.command_modules.keyvault.keyvaultclient.generated import KeyVault
|
|||
from azure.cli.command_modules.keyvault.keyvaultclient import KeyVaultClient
|
||||
from azure.cli.command_modules.keyvault._command_type import cli_keyvault_data_plane_command
|
||||
from azure.cli.command_modules.keyvault.custom import \
|
||||
(create_key, create_certificate,
|
||||
(create_key, backup_key, restore_key, import_key,
|
||||
create_certificate,
|
||||
add_certificate_contact, delete_certificate_contact,
|
||||
create_certificate_issuer, update_certificate_issuer,
|
||||
add_certificate_issuer_admin, delete_certificate_issuer_admin, list_certificate_issuer_admins)
|
||||
|
@ -52,10 +53,9 @@ cli_keyvault_data_plane_command('keyvault key create', create_key)
|
|||
cli_keyvault_data_plane_command('keyvault key set-attributes', BaseKeyVaultClient.update_key)
|
||||
cli_keyvault_data_plane_command('keyvault key show', BaseKeyVaultClient.get_key)
|
||||
cli_keyvault_data_plane_command('keyvault key delete', KeyVaultClient.delete_key)
|
||||
# TODO: Round 3
|
||||
#cli_keyvault_data_plane_command('keyvault key import', import_key)
|
||||
#cli_keyvault_data_plane_command('keyvault key backup', KeyVaultClient.backup_key)
|
||||
#cli_keyvault_data_plane_command('keyvault key restore', KeyVaultClient.restore_key)
|
||||
cli_keyvault_data_plane_command('keyvault key backup', backup_key)
|
||||
cli_keyvault_data_plane_command('keyvault key restore', restore_key)
|
||||
cli_keyvault_data_plane_command('keyvault key import', import_key)
|
||||
|
||||
cli_keyvault_data_plane_command('keyvault secret list', KeyVaultClient.get_secrets)
|
||||
cli_keyvault_data_plane_command('keyvault secret list-versions', KeyVaultClient.get_secret_versions)
|
||||
|
@ -63,8 +63,8 @@ cli_keyvault_data_plane_command('keyvault secret set', KeyVaultClient.set_secret
|
|||
cli_keyvault_data_plane_command('keyvault secret set-attributes', BaseKeyVaultClient.update_secret)
|
||||
cli_keyvault_data_plane_command('keyvault secret show', BaseKeyVaultClient.get_secret)
|
||||
cli_keyvault_data_plane_command('keyvault secret delete', KeyVaultClient.delete_secret)
|
||||
# TODO: Round 3
|
||||
#cli_keyvault_data_plane_command('keyvault secret download', dummy)
|
||||
# Round 4
|
||||
# cli_keyvault_data_plane_command('keyvault secret download', download_secret)
|
||||
|
||||
cli_keyvault_data_plane_command('keyvault certificate create', create_certificate)
|
||||
cli_keyvault_data_plane_command('keyvault certificate list', KeyVaultClient.get_certificates)
|
||||
|
@ -72,11 +72,13 @@ cli_keyvault_data_plane_command('keyvault certificate list-versions', KeyVaultCl
|
|||
cli_keyvault_data_plane_command('keyvault certificate show', BaseKeyVaultClient.get_certificate)
|
||||
cli_keyvault_data_plane_command('keyvault certificate delete', KeyVaultClient.delete_certificate)
|
||||
cli_keyvault_data_plane_command('keyvault certificate set-attributes', BaseKeyVaultClient.update_certificate)
|
||||
cli_keyvault_data_plane_command('keyvault certificate import', KeyVaultClient.import_certificate)
|
||||
# Round 4
|
||||
# cli_keyvault_data_plane_command('keyvault certificate download', download_certificate)
|
||||
|
||||
# TODO: Round 3
|
||||
#cli_keyvault_data_plane_command('keyvault certificate import', KeyVaultClient.import_certificate)
|
||||
#cli_keyvault_data_plane_command('keyvault certificate merge', KeyVaultClient.merge_certificate)
|
||||
#cli_keyvault_data_plane_command('keyvault certificate download', dummy)
|
||||
cli_keyvault_data_plane_command('keyvault certificate pending merge', KeyVaultClient.merge_certificate)
|
||||
cli_keyvault_data_plane_command('keyvault certificate pending show', KeyVaultClient.get_certificate_operation)
|
||||
cli_keyvault_data_plane_command('keyvault certificate pending delete', KeyVaultClient.delete_certificate_operation)
|
||||
|
||||
cli_keyvault_data_plane_command('keyvault certificate contact list', KeyVaultClient.get_certificate_contacts)
|
||||
cli_keyvault_data_plane_command('keyvault certificate contact add', add_certificate_contact)
|
||||
|
@ -91,5 +93,3 @@ cli_keyvault_data_plane_command('keyvault certificate issuer delete', KeyVaultCl
|
|||
cli_keyvault_data_plane_command('keyvault certificate issuer admin list', list_certificate_issuer_admins)
|
||||
cli_keyvault_data_plane_command('keyvault certificate issuer admin add', add_certificate_issuer_admin)
|
||||
cli_keyvault_data_plane_command('keyvault certificate issuer admin delete', delete_certificate_issuer_admin)
|
||||
|
||||
#cli_command('keyvault certificate TEMPLATE', certificate_policy_template)
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
#---------------------------------------------------------------------------------------------
|
||||
|
||||
import codecs
|
||||
import re
|
||||
import time
|
||||
|
||||
from OpenSSL import crypto
|
||||
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from azure.mgmt.keyvault.models import (VaultCreateOrUpdateParameters,
|
||||
VaultProperties,
|
||||
|
@ -152,6 +156,7 @@ def _object_id_args_helper(object_id, spn, upn):
|
|||
def set_policy(client, resource_group_name, vault_name, #pylint:disable=too-many-arguments
|
||||
object_id=None, spn=None, upn=None, key_permissions=None, secret_permissions=None,
|
||||
certificate_permissions=None):
|
||||
""" Update security policy settings for a Key Vault. """
|
||||
object_id = _object_id_args_helper(object_id, spn, upn)
|
||||
vault = client.get(resource_group_name=resource_group_name,
|
||||
vault_name=vault_name)
|
||||
|
@ -183,6 +188,7 @@ def set_policy(client, resource_group_name, vault_name, #pylint:disable=too-many
|
|||
properties=vault.properties))
|
||||
|
||||
def delete_policy(client, resource_group_name, vault_name, object_id=None, spn=None, upn=None): #pylint:disable=too-many-arguments
|
||||
""" Delete security policy settings for a Key Vault. """
|
||||
object_id = _object_id_args_helper(object_id, spn, upn)
|
||||
vault = client.get(resource_group_name=resource_group_name,
|
||||
vault_name=vault_name)
|
||||
|
@ -208,53 +214,104 @@ def create_key(client, vault_base_url, key_name, destination, key_size=None, key
|
|||
vault_base_url, key_name, destination, key_size, key_ops, key_attrs, tags)
|
||||
create_key.__doc__ = KeyVaultClient.create_key.__doc__
|
||||
|
||||
# pylint: disable=unused-variable,broad-except
|
||||
def _is_pem_encrypted(data):
|
||||
# TODO: Round 3
|
||||
try:
|
||||
dump_data = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, data)
|
||||
except Exception:
|
||||
pass
|
||||
def backup_key(client, vault_base_url, key_name, file_path):
|
||||
backup = client.backup_key(vault_base_url, key_name).value
|
||||
with open(file_path, 'wb') as output:
|
||||
output.write(backup)
|
||||
backup_key.__doc__ = KeyVaultClient.backup_key.__doc__
|
||||
|
||||
# pylint: disable=unused-variable,unused-argument
|
||||
def _decrypt_rsa_private_key(data, password):
|
||||
# TODO: Round 3
|
||||
pass
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
def _private_key_from_pem(data):
|
||||
# TODO: Round 3
|
||||
pass
|
||||
def restore_key(client, vault_base_url, file_path):
|
||||
with open(file_path, 'rb') as file_in:
|
||||
data = file_in.read()
|
||||
return client.restore_key(vault_base_url, data)
|
||||
restore_key.__doc__ = KeyVaultClient.restore_key.__doc__
|
||||
|
||||
# pylint: disable=too-many-arguments,assignment-from-no-return,unused-variable
|
||||
def import_key(client, vault_base_url, key_name, destination, key_ops=None, disabled=False,
|
||||
def import_key(client, vault_base_url, key_name, destination=None, key_ops=None, disabled=False,
|
||||
expires=None, not_before=None, tags=None, pem_file=None, pem_password=None,
|
||||
byok_file=None):
|
||||
# TODO: Round 3
|
||||
""" Import a private key. Supports importing base64 encoded private keys from PEM files.
|
||||
Supports importing BYOK keys into HSM for premium KeyVaults. """
|
||||
from azure.cli.command_modules.keyvault.keyvaultclient.generated.models import \
|
||||
(KeyAttributes, JsonWebKey)
|
||||
|
||||
def _to_bytes(hex_string):
|
||||
# zero pads and decodes a hex string
|
||||
if len(hex_string) % 2:
|
||||
hex_string = '0{}'.format(hex_string)
|
||||
return codecs.decode(hex_string, 'hex_codec')
|
||||
|
||||
def _set_rsa_parameters(dest, src):
|
||||
# map OpenSSL parameter names to JsonWebKey property names
|
||||
conversion_dict = {
|
||||
'modulus': 'n',
|
||||
'publicExponent': 'e',
|
||||
'privateExponent': 'd',
|
||||
'prime1': 'p',
|
||||
'prime2': 'q',
|
||||
'exponent1': 'dp',
|
||||
'exponent2': 'dq',
|
||||
'coefficient': 'qi'
|
||||
}
|
||||
# regex: looks for matches that fit the following patterns:
|
||||
# integerPattern: 65537 (0x10001)
|
||||
# hexPattern:
|
||||
# 00:a0:91:4d:00:23:4a:c6:83:b2:1b:4c:15:d5:be:
|
||||
# d8:87:bd:c9:59:c2:e5:7a:f5:4a:e7:34:e8:f0:07:
|
||||
# The desired match should always be the first component of the match
|
||||
regex = re.compile(r'([^:\s]*(:[^\:)]+\))|([^:\s]*(:\s*[0-9A-Fa-f]{2})+))')
|
||||
# regex2: extracts the hex string from a format like: 65537 (0x10001)
|
||||
regex2 = re.compile(r'(?<=\(0x{1})([0-9A-Fa-f]*)(?=\))')
|
||||
|
||||
key_params = crypto.dump_privatekey(crypto.FILETYPE_TEXT, src).decode('utf-8')
|
||||
for match in regex.findall(key_params):
|
||||
comps = match[0].split(':', 1)
|
||||
name = conversion_dict.get(comps[0], None)
|
||||
if name:
|
||||
value = comps[1].replace(' ', '').replace('\n', '').replace(':', '')
|
||||
try:
|
||||
value = _to_bytes(value)
|
||||
except Exception as ex: # pylint:disable=broad-except
|
||||
# if decoding fails it is because of an integer pattern. Extract the hex
|
||||
# string and retry
|
||||
value = _to_bytes(regex2.findall(value)[0])
|
||||
setattr(dest, name, value)
|
||||
|
||||
key_attrs = KeyAttributes(not disabled, not_before, expires)
|
||||
key_obj = JsonWebKey(key_ops=key_ops)
|
||||
if pem_file:
|
||||
key_obj.destination = 'RSA'
|
||||
key_obj.kty = 'RSA'
|
||||
logger.info('Reading %s', pem_file)
|
||||
with open(pem_file, 'r') as f:
|
||||
data = f.read()
|
||||
if _is_pem_encrypted(data):
|
||||
# prompt for password if not supplied?
|
||||
key_info = _decrypt_rsa_private_key(data, pem_password)
|
||||
else:
|
||||
key_info = _private_key_from_pem(data)
|
||||
pem_data = f.read()
|
||||
# load private key and prompt for password if encrypted
|
||||
try:
|
||||
pem_password = str(pem_password).encode() if pem_password else None
|
||||
# despite documentation saying password should be a string, it needs to actually
|
||||
# be UTF-8 encoded bytes
|
||||
pkey = crypto.load_privatekey(crypto.FILETYPE_PEM, pem_data, pem_password)
|
||||
except crypto.Error as ex:
|
||||
raise CLIError(
|
||||
'Import failed: Unable to decrypt private key. --pem-password may be incorrect.')
|
||||
except TypeError as ex:
|
||||
raise CLIError('Invalid --pem-password.')
|
||||
logger.info('setting RSA parameters from PEM data')
|
||||
# set rsa parameters
|
||||
# set pem_file to key_file?
|
||||
_set_rsa_parameters(key_obj, pkey)
|
||||
elif byok_file:
|
||||
key_obj.destination = 'RSA-HSM'
|
||||
key_obj.t = None # data from file
|
||||
with open(byok_file, 'rb') as f:
|
||||
byok_data = f.read()
|
||||
key_obj.kty = 'RSA-HSM'
|
||||
key_obj.t = byok_data
|
||||
|
||||
return client.import_key(
|
||||
vault_base_url, key_name, key_obj, destination == 'hsm', key_attrs, tags)
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
def download_secret(client, vault_base_url, secret_name, file_path, file_encoding='utf8',
|
||||
secret_version='', decode_binary=None):
|
||||
secret = client.keyvault.get_secret(vault_base_url, secret_name, secret_version)
|
||||
raise CLIError('TODO: implement')
|
||||
|
||||
def create_certificate(client, vault_base_url, certificate_name, certificate_policy,
|
||||
disabled=False, expires=None, not_before=None, tags=None):
|
||||
from azure.cli.command_modules.keyvault.keyvaultclient.generated.models import \
|
||||
|
@ -264,6 +321,11 @@ def create_certificate(client, vault_base_url, certificate_name, certificate_pol
|
|||
client.create_certificate(
|
||||
vault_base_url, certificate_name, certificate_policy, cert_attrs, tags)
|
||||
|
||||
if certificate_policy['issuer_parameters']['name'].lower() == 'unknown':
|
||||
# return immediately for a pending certificate
|
||||
return client.get_certificate_operation(vault_base_url, certificate_name)
|
||||
|
||||
# otherwise loop until the certificate creation is complete
|
||||
while True:
|
||||
check = client.get_certificate_operation(vault_base_url, certificate_name)
|
||||
if check.status != 'inProgress':
|
||||
|
@ -288,6 +350,13 @@ def create_certificate(client, vault_base_url, certificate_name, certificate_pol
|
|||
|
||||
create_certificate.__doc__ = KeyVaultClient.create_certificate.__doc__
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
def download_certificate(client, vault_base_url, certificate_name, file_path,
|
||||
file_encoding=None, certificate_version=''):
|
||||
cert = client.keyvault.get_certificate(
|
||||
vault_base_url, certificate_name, certificate_version)
|
||||
raise CLIError('TODO: implement')
|
||||
|
||||
def add_certificate_contact(client, vault_base_url, contact_email, contact_name=None,
|
||||
contact_phone=None):
|
||||
""" Add a contact to the specified vault to receive notifications of certificate operations. """
|
||||
|
|
Двоичные данные
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/tests/TestBYOK-EU.byok
Normal file
Двоичные данные
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/tests/TestBYOK-EU.byok
Normal file
Двоичный файл не отображается.
Двоичные данные
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/tests/TestBYOK-NA.byok
Normal file
Двоичные данные
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/tests/TestBYOK-NA.byok
Normal file
Двоичный файл не отображается.
|
@ -0,0 +1,50 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDgTCCAmmgAwIBAgIJANgbVX3Upe0RMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV
|
||||
BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
|
||||
aWRnaXRzIFB0eSBMdGQxEDAOBgNVBAMMB1Rlc3QxMjMwHhcNMTYwOTIxMjAwNjUx
|
||||
WhcNMjIwMzE0MjAwNjUxWjBXMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1T
|
||||
dGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRAwDgYDVQQD
|
||||
DAdUZXN0MTIzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA287d7CB9
|
||||
TM2s1jWiQ8aSNdIXzCrVDRzzaRymJj5TtSWhmGE5mLRaKOiRIxjsxn0BgPtboOwm
|
||||
nBvr8lCLJORYUvN/dEialBiPdINwJjFyN1hK1TRh9JpQaN+GufMhAbZtF8aEDy7w
|
||||
Fx1DvS0IkBjLLNW5x2WHCWfhiR6Ep1viD8yIRvp8pQMPu8+cGgfCkdsvCiFAI420
|
||||
1ss2pxUXf7eaPWesTB35mig/ie1eSZbyy5HvvzgDgU4aAIMcT9et4O4VQpRZr7y6
|
||||
PlwfzZJ32fsZCDjj3xW5DfFmWb0LpHWmW4Cqr+1zX+oT15TekEMqSh+ncAGT4uh5
|
||||
u2qbSYWQxVoSeQIDAQABo1AwTjAdBgNVHQ4EFgQUe9iqdT21Y3MbMy4Y7B34znOi
|
||||
0vMwHwYDVR0jBBgwFoAUe9iqdT21Y3MbMy4Y7B34znOi0vMwDAYDVR0TBAUwAwEB
|
||||
/zANBgkqhkiG9w0BAQsFAAOCAQEARaNsf3kUqdHcuI4X1aH3jz7i6duUsMzzWv25
|
||||
H2mxUaC24A+4BExlP2Dt3Ms9ONOhkj37Rf007VD2J+PbiAheg3Y6hrCD+JOdobRC
|
||||
ZDeiwmMYYYEUFhFNyFrlbTrR8DLHqjeibyO5nytAH5je4EsnqEFg5UU341HRah7p
|
||||
SC5bubr2CwD4R8VTGi+BsmURFi0Vp+CfhScOPPm+MB7BDCPPAO3iyW2bUY0YId7D
|
||||
mFd6pSlsfaYNTu8u402NUt5zEaBj1mV2BR8D6LUpGNZlfu/vLJIBIe51/FqVa11S
|
||||
GssltPCXgZs/ecR0BWTftipALvUTZ4wFIMXlQjPi+RwGt17ANA==
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||
MIIE6jAcBgoqhkiG9w0BDAEDMA4ECKlznX02QG7DAgIIAASCBMi704PgTVP6LSee
|
||||
1UArVjr+/1lApOuKiesNMy+/N+Mf7DNW/J31W83WtTiN+RVbOlf6CX2+XId5FJou
|
||||
+nzK9ECqOmlULtEnXnFpihL60TzpAfNBajheh3KXAfl/V9wPvh4jjOqHDFbPZxsd
|
||||
TENKxSbmlUPG2qDVMeXAQatrUeSTcbH2mamPOrAUknXh7HSgwlXosfqQBEfr06Kb
|
||||
liboaMpQva1ae9PSaLbiewfeSIlDgf5pAt9WamaV8NR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JrPdshWesO+
|
||||
lz08CmbYXRZsjLF+//0A9boZaestMlkMeBqhwp4JTC4wEJG5EHOxDMy+u5cnGwGG
|
||||
pgY4Cf6jSzW+hOZZ4cprysN85wcjMNcbGdKzOVhrsam4szJF+IxXiU2JuU827gW8
|
||||
NKW0VMTYioorqWM4Q6l6A0NVyFssY5/V3IZ/R237CQJJPwsKiSm4caIcfY4SDpxT
|
||||
QHFj/o7rREd50/xDAgMBAAGjUDBOMB0GA1UdDgQWBBQfM9eQbF5DtRZ0CUcX0Ern
|
||||
0aGAizAfBgNVHSMEGDAWgBQfM9eQbF5DtRZ0CUcX0Ern0aGAizAMBgNVHRMEBTAD
|
||||
AQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBslxGQMw72AKhvl4khm2M+gLnWuoaVzzYQ
|
||||
Kq4YMyI5BW5nl5QO/849q5K0aLMzPllqcjt31enj2q82uwVU9CvO4A46xdZ+PJD1
|
||||
Nf7JIqxRQN5m9EzORBel0aFR6zdUqWK32tArjLz0k9W2xI7aQTfSWkWE3q61+i/r
|
||||
8XYIwky9rP/he1NcvSKWsuSdrLEtdkLGqtmSouEQxa+Q+7Ketfg/tjWutEaWnOK1
|
||||
rqKHfgZT2RNoeRnMx4HSejQJLrZHuvpCD//fYrK2UQ9jUaDz8863GPm/bn/807jP
|
||||
wNEtrNdYa26lM0YthIHIEPEdn6rgxIXOYMUBnIQvafpIq88DNKeT
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||
MIIE6jAcBgoqhkiG9w0BDAEDMA4ECJiLClPM6t5JAgIIAASCBMigL+KlEA9fagX0
|
||||
PFhQBeFjDiebJbMuTfa9HcOVZEDyrqmGng2Lfz+TUa3ys/V86okbUp2N9MoGK7gx
|
||||
cPqdq7rnu563LT9wGhtn8mUn8Wul0FfV2K56wsBGehJ+MPmlEjs6OZR0nVdXkwAh
|
||||
dVIzH9eFdz8mhJZOZI61TQNKCKbCqsR7lslkL2VWr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
||||
/P16WFcjB4bb1Nee96xfuGPUcHul3fG5TRmKJnaxWeg5FM4H4cP5jmeXyGNqdbDS
|
||||
rgqpXChenTBwS5JvAVgv8ZvxJxp4h8fLFlUOKuKUR95gB09nBGnwAtEM4zgjKkcC
|
||||
PcvDZ7YpzU40gx6QiCVb2UPtggiEp2WyIrpe8VfzK4C7pQGInLn3Rm4G7mEFacv5
|
||||
HlbGJO+2XIk3ibFJYTQvMFYc/ESeRSOw6TDoy1sg3+Yl5BXYC+90lCGR9JK/sBYs
|
||||
12eVEqxi8kmoNXJ4on0snfDuRDv/6bIIDpfPAKqZzbTq7h6wzIreoz3wx4Oa8A9V
|
||||
rtG8TOkCYaoJRYD5uV1lc6Ok3CpZrI7kTGAfvQNi+H0Obz+sSXGksNtfdwNUzUd6
|
||||
p4CXrZmc/r6o3j4biteWTURnRQqkh67QM5qHJhmXuWD82sjSKU16MM0KqPze/Tl+
|
||||
+Figx8pgk29H6LM+N9Y=
|
||||
-----END ENCRYPTED PRIVATE KEY-----
|
|
@ -0,0 +1,47 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCRUPFgOvovNJ0e
|
||||
XSHlcm2V9w/ECwzMc31BaN2xBmWjegmqixv9GN3GWMgUQ9zC9k9bxd491Awa55Sq
|
||||
ht86TL8Q3Fcn8fXuhWbX/gNAO8h5tfuQVA1zB5bVxEQsCNmmLrpgNhLYO+excyCJ
|
||||
ocqidQostSQfcXU7qJtifpgmRt5oW3WhmpVsnAugS8y8vbCGJXdKqLCZXjL/H0aa
|
||||
+r/Z3BzQ+BglULKYshSBinxbYe+1GJ/028/50y/MPf9iFiiS9xtspOtSzd1e+NA5
|
||||
G+pCMppJHars9D/FavTewI1zJa9jPxtrwr8L3nEmy9gv6v1474XNYaagtQNjdU0b
|
||||
AV3EDfn9AgMBAAECggEADJtGjXAgYzb/yHIQ7jxamG96DSpePmBoheOok+J3r9J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iG9w0BAQsFAAOCAQEAj0vTtSCjSQIZagzOvjTtZvnKH6E0q0zX
|
||||
+MAtJnS8Cb/XVPEW0FqN5TLXvvaktjKCDHSPmYwneTjV3hjNe+jB03R1Z2auxnsc
|
||||
jSfLT4+tthrCiHTLX+WrR+F3SwOX/cVFGiU0z1IcJe5m49qiUJ6kemHaa6umgfGX
|
||||
HbnCqzR76WkhDJWFz9MXFFvFTRGE+267sliQf8PrKr65oOEVZV/E+SInQdm+H1LY
|
||||
WAbig4UxHN8UQ54G9mdW1e/uRumAT73uty+C0O8VQvNvsco2HAiPOtDce4CJleZx
|
||||
iAv6z0Y6PKRYb4xw+xnmqpC8ks1T93JFaniHl53cqRNbXy5t9t9Cag==
|
||||
-----END CERTIFICATE-----
|
Двоичные данные
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/tests/import_pfx.pfx
Normal file
Двоичные данные
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/tests/import_pfx.pfx
Normal file
Двоичный файл не отображается.
|
@ -1,34 +1,51 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICfzCCAegCCQCMO+JWfdniBjANBgkqhkiG9w0BAQUFADCBgzELMAkGA1UEBhMC
|
||||
VVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdSZWRtb25kMQ4wDAYDVQQKEwVBenVy
|
||||
ZTEPMA0GA1UECxMGRGV2RGl2MRUwEwYDVQQDEwxBenVyZSBEZXZEaXYxHTAbBgkq
|
||||
hkiG9w0BCQEWDnRlc3RAYXp1cmUuY29tMB4XDTE2MDkyOTE5MTY1NVoXDTE3MDky
|
||||
OTE5MTY1NVowgYMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJXQTEQMA4GA1UEBxMH
|
||||
UmVkbW9uZDEOMAwGA1UEChMFQXp1cmUxDzANBgNVBAsTBkRldkRpdjEVMBMGA1UE
|
||||
AxMMQXp1cmUgRGV2RGl2MR0wGwYJKoZIhvcNAQkBFg50ZXN0QGF6dXJlLmNvbTCB
|
||||
nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArjouQYshf1jx5aNl0wnHFbmhBFzp
|
||||
3L4Bh5lc0yw25HpeVqrQsWdG2Rne+02Vx6EjXM6SOh6vBCJcYkEei5Z85AsrO8Sp
|
||||
wsxJJDCIe6gf6isMq1aG0HYeBKGKzU2gav8611phQXx5CXELvfwrO9K1xhqAikzz
|
||||
IY0cB19HosJquSkCAwEAATANBgkqhkiG9w0BAQUFAAOBgQB9aNpHHFzJJXlw1ZPB
|
||||
oDJd9LHKaIWG2Jy98cq15T/bPzp/DJcVoU5aLn2dhs/mBl087K49hls6q5r5zkpK
|
||||
fRcpJHNXkeMmy1CNJer6Y9O1WXpSrTXtHmzrzUV8JZQKQfgQ2pekzlbNnDrH2l/R
|
||||
vjRshgjPy9doc1O0H/4mzduOtw==
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,C2E3522D1123364E
|
||||
DEK-Info: DES-EDE3-CBC,0F2D269149D56431
|
||||
|
||||
IzbvBvGnr5tY069kP+F/1VEMp89JBbBrXtjw8xy93eQWW/8po/3DwTjUYsb1EZLj
|
||||
dewOAVtCVNZStD4KLMiC1E7Jy4979FxLugbEjn/Da/dAK++iuzg9Pu3+gaozcn8w
|
||||
mcYYFY50bajCc71LnYNRh994+V70MTaDEno5sqh68tNA1ab1FCfnBO/xH7s6pZ2r
|
||||
QllIjhMxUTIwaDa5xDUr4tyh1sWXWD2jypWqX5WD7orBSWdxAhn5zxUS3DchucGK
|
||||
DgihmJ7itSfydi7+zsDYM13Ho03M13iLIPKXob9O9ywmnKRI2FXdeXFHWPCe3qm5
|
||||
OrTakvfhJmfwLc/0C8O3oTaG9K0rDo0HaSqC/KjfSkuSdNrV3Gz2ZcF88U/FwF90
|
||||
QHGuhOxg6eY+d6519oU2DQ+g4UIMZl1khBhHiNXj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uDL51qpHibJvZiwXVTBc
|
||||
f23h12tdZAMPW8sgiCNdZHKRH/NQ0LGvV61iD2IXlHnRfPT880wDGUJGn9PPcusx
|
||||
mKAfwlZogVX/KdX4zrIlxIBBHwiYnqJHLldTYQFqCO8uQqNHjkgmSfZ6IRbcamcR
|
||||
OqewlEWAK6Jc6ZPSGzkjTrntGKDoiBtH2g9+VrD8hibqC2K+4cyrkt+SGubh3jtW
|
||||
1emPqajxmcw99SYmyZcjZZ25K6x/zaR905ACAzmFwsrnBjSwAHXzsWWZP8Y6nRjs
|
||||
YmDigry7A/JhVfckoS1jw5YFjKkpZyzI97YXRSAaWr5F9jqFO8s=
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"issuer_parameters": {
|
||||
"name": "Self"
|
||||
},
|
||||
"key_properties": {
|
||||
"exportable": true,
|
||||
"key_size": 2048,
|
||||
"key_type": "RSA",
|
||||
"reuse_key": false
|
||||
},
|
||||
"secret_properties": {
|
||||
"content_type": "application/x-pem-file"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"issuer_parameters": {
|
||||
"name": "Self"
|
||||
},
|
||||
"key_properties": {
|
||||
"exportable": true,
|
||||
"key_size": 2048,
|
||||
"key_type": "RSA",
|
||||
"reuse_key": false
|
||||
},
|
||||
"secret_properties": {
|
||||
"content_type": "application/x-pkcs12"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"attributes": {
|
||||
"enabled": true,
|
||||
"expires": null,
|
||||
"not_before": null
|
||||
},
|
||||
"issuer_parameters": {
|
||||
"name": "Unknown"
|
||||
},
|
||||
"key_properties": {
|
||||
"exportable": true,
|
||||
"key_size": 2048,
|
||||
"key_type": "RSA",
|
||||
"reuse_key": false
|
||||
},
|
||||
"secret_properties": {
|
||||
"content_type": "application/x-pkcs12"
|
||||
},
|
||||
"x509_certificate_properties": {
|
||||
"ekus": null,
|
||||
"key_usage": [
|
||||
"digitalSignature",
|
||||
"nonRepudiation",
|
||||
"keyEncipherment",
|
||||
"keyAgreement",
|
||||
"keyCertSign"
|
||||
],
|
||||
"subject": "C=US, ST=WA, L=Redmond, O=TestO, OU=TestOU, CN=www.mytestdomain.com",
|
||||
"subject_alternative_names": null,
|
||||
"validity_in_months": 50
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,318 +1,290 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"attributes": {"enabled": true}, "value": "ABC123"}'
|
||||
body: !!binary |
|
||||
eyJ2YWx1ZSI6ICJBQkMxMjMiLCAiYXR0cmlidXRlcyI6IHsiZW5hYmxlZCI6IHRydWV9fQ==
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ikk2b0J3NFZ6QkhPcWxlR3JWMkFKZEE1RW1YYyIsImtpZCI6Ikk2b0J3NFZ6QkhPcWxlR3JWMkFKZEE1RW1YYyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YS8iLCJpYXQiOjE0NzgxMTI1NTYsIm5iZiI6MTQ3ODExMjU1NiwiZXhwIjoxNDc4MTE2NDU2LCJhY3IiOiIxIiwiYW1yIjpbInB3ZCJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjoxMDgwMCwiZmFtaWx5X25hbWUiOiJBZG1pbjIiLCJnaXZlbl9uYW1lIjoiQWRtaW4yIiwiZ3JvdXBzIjpbImU0YmIwYjU2LTEwMTQtNDBmOC04OGFiLTNkOGE4Y2IwZTA4NiIsIjZiOTc3NjFhLWQ3ZDAtNDhmNi1hZDU2LWYzOGQzMjdjODU1MyJdLCJpcGFkZHIiOiIxNjcuMjIwLjAuMTg2IiwibmFtZSI6IkFkbWluMiIsIm9pZCI6IjU5NjNmNTBjLTdjNDMtNDA1Yy1hZjdlLTUzMjk0ZGU3NmFiZCIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwM0JGRkQ5NTlGODQyMyIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6InB1QWlLRzRBMGE3VUE0ZHhZM1VNWEY4amtxZHRWSDhoMVAzY0tNMDJocWsiLCJ0aWQiOiI1NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEiLCJ1bmlxdWVfbmFtZSI6ImFkbWluMkBBenVyZVNES1RlYW0ub25taWNyb3NvZnQuY29tIiwidXBuIjoiYWRtaW4yQEF6dXJlU0RLVGVhbS5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAifQ.YiXYcbk6VcghbG5fjq5R7XbaRD64YO-b3YQemB-zsIwPmwXJlJSlQZEKX270rXhjrdLpunu1tkvFF2ZnzBjAz43P98_tQ6b1tu9HBU0H-VET3ndPpv0k3pY0f7NsE1VBiteKzWye1SSzC9-fxyheoSr6rpZOTftYg2HncLC3NQgxRQlO_GPtf2odewMrKETK0q6aroV9_VzIbGHf3tVZ8i1JMJVtyDFlA1RHH1kl_zQ7_8WAhacEEYn7esIjqhHVutdnKUOh4A4W7m35zyE8BZRVZZbP_dI-AIvEiJUkYUUZI4N95DntQW5yoxWtoFlEiKAPxd0_w9cGfQIAnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['52']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [1068c782-8fc5-11e6-93d9-f45c89b91e35]
|
||||
x-ms-client-request-id: [f2c4d14a-a133-11e6-8b47-a0b3ccf7272a]
|
||||
method: PUT
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode ''}
|
||||
body: {string: '{"value":"ABC123","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/82d81101b3864937ad2aa146cd0c727a","attributes":{"enabled":true,"created":1478115516,"updated":1478115516}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Tue, 11 Oct 2016 15:12:02 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
www-authenticate: ['Bearer authorization="https://login.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a",
|
||||
resource="https://vault.azure.net"']
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
status: {code: 401, message: Unauthorized}
|
||||
- request:
|
||||
body: '{"attributes": {"enabled": true}, "value": "ABC123"}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFR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oK2cN1JzokWXDVj0M6Fz2jEGMp0zWBL1jCs72OLQGRQPRiPGLbMOKndrt2aMb-VZDWViNUodXFxsCBfo4214shXWjj1Nozz1raAMKW1bewib3jyIZuSLpCLf-bN_pYcYdlV-XPjiUV0TURIzyIufE82S5ipxjy6SdKjtPcuFf6BoST2LL_2mITfsNs1nXmAfyzGMYg8W5g1l-15MZnkiY5gIsoWaPRGbeW6fyKVJMjWiDgsQMiyQEJwmSmat6Cf_P6gXbLdMSrHqRW15SSaKGvo7JWFytobeDjWtUcUEnN3Lvw]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['52']
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['195']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [1068c782-8fc5-11e6-93d9-f45c89b91e35]
|
||||
method: PUT
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"value":"ABC123","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/806ae54cc9304b63841fad52b1209bec","attributes":{"enabled":true,"created":1476198723,"updated":1476198723}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['195']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:03 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:35 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YS8iLCJpYXQiOjE0NzYxOTcxNTQsIm5iZiI6MTQ3NjE5NzE1NCwiZXhwIjoxNDc2MjAxMDU0LCJhY3IiOiIxIiwiYW1yIjpbInB3ZCJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjoxMDgwMCwiZmFtaWx5X25hbWUiOiJBZG1pbjIiLCJnaXZlbl9uYW1lIjoiQWRtaW4yIiwiZ3JvdXBzIjpbImU0YmIwYjU2LTEwMTQtNDBmOC04OGFiLTNkOGE4Y2IwZTA4NiIsIjZiOTc3NjFhLWQ3ZDAtNDhmNi1hZDU2LWYzOGQzMjdjODU1MyJdLCJpcGFkZHIiOiIyNC4xOS4yMDguNjEiLCJuYW1lIjoiQWRtaW4yIiwib2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1RHH1kl_zQ7_8WAhacEEYn7esIjqhHVutdnKUOh4A4W7m35zyE8BZRVZZbP_dI-AIvEiJUkYUUZI4N95DntQW5yoxWtoFlEiKAPxd0_w9cGfQIAnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [1252f3d9-8fc5-11e6-af06-f45c89b91e35]
|
||||
x-ms-client-request-id: [f3187d42-a133-11e6-ab03-a0b3ccf7272a]
|
||||
method: GET
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"value":[{"id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1476198723,"updated":1476198723}}],"nextLink":null}'}
|
||||
body: {string: '{"value":[{"id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1","attributes":{"enabled":true,"created":1478115516,"updated":1478115516}}],"nextLink":null}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['173']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:04 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['173']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:36 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"attributes": {"enabled": true}, "contentType": "test type", "value":
|
||||
"DEF456", "tags": {"test": "foo"}}'
|
||||
body: !!binary |
|
||||
eyJ2YWx1ZSI6ICJERUY0NTYiLCAiYXR0cmlidXRlcyI6IHsiZW5hYmxlZCI6IHRydWV9LCAiY29u
|
||||
dGVudFR5cGUiOiAidGVzdCB0eXBlIiwgInRhZ3MiOiB7InRlc3QiOiAiZm9vIn19
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YS8iLCJpYXQiOjE0NzYxOTcxNTQsIm5iZiI6MTQ3NjE5NzE1NCwiZXhwIjoxNDc2MjAxMDU0LCJhY3IiOiIxIiwiYW1yIjpbInB3ZCJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2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RtaW4yQEF6dXJlU0RLVGVhbS5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAifQ.YiXYcbk6VcghbG5fjq5R7XbaRD64YO-b3YQemB-zsIwPmwXJlJSlQZEKX270rXhjrdLpunu1tkvFF2ZnzBjAz43P98_tQ6b1tu9HBU0H-VET3ndPpv0k3pY0f7NsE1VBiteKzWye1SSzC9-fxyheoSr6rpZOTftYg2HncLC3NQgxRQlO_GPtf2odewMrKETK0q6aroV9_VzIbGHf3tVZ8i1JMJVtyDFlA1RHH1kl_zQ7_8WAhacEEYn7esIjqhHVutdnKUOh4A4W7m35zyE8BZRVZZbP_dI-AIvEiJUkYUUZI4N95DntQW5yoxWtoFlEiKAPxd0_w9cGfQIAnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['105']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [136624b5-8fc5-11e6-8d29-f45c89b91e35]
|
||||
x-ms-client-request-id: [f33d1182-a133-11e6-b0f1-a0b3ccf7272a]
|
||||
method: PUT
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"value":"DEF456","contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/3b84448db87444d2bba6e695e87bf9b7","attributes":{"enabled":true,"created":1476198728,"updated":1476198728},"tags":{"test":"foo"}}'}
|
||||
body: {string: '{"value":"DEF456","contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/d29e9d2fc0bf452ebe8b065f2926ef93","attributes":{"enabled":true,"created":1478115516,"updated":1478115516},"tags":{"test":"foo"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['243']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:07 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['243']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:36 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1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txZHRWSDhoMVAzY0tNMDJocWsiLCJ0aWQiOiI1NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEiLCJ1bmlxdWVfbmFtZSI6ImFkbWluMkBBenVyZVNES1RlYW0ub25taWNyb3NvZnQuY29tIiwidXBuIjoiYWRtaW4yQEF6dXJlU0RLVGVhbS5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAifQ.YiXYcbk6VcghbG5fjq5R7XbaRD64YO-b3YQemB-zsIwPmwXJlJSlQZEKX270rXhjrdLpunu1tkvFF2ZnzBjAz43P98_tQ6b1tu9HBU0H-VET3ndPpv0k3pY0f7NsE1VBiteKzWye1SSzC9-fxyheoSr6rpZOTftYg2HncLC3NQgxRQlO_GPtf2odewMrKETK0q6aroV9_VzIbGHf3tVZ8i1JMJVtyDFlA1RHH1kl_zQ7_8WAhacEEYn7esIjqhHVutdnKUOh4A4W7m35zyE8BZRVZZbP_dI-AIvEiJUkYUUZI4N95DntQW5yoxWtoFlEiKAPxd0_w9cGfQIAnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [13c65673-8fc5-11e6-ba05-f45c89b91e35]
|
||||
x-ms-client-request-id: [f387d822-a133-11e6-9ce7-a0b3ccf7272a]
|
||||
method: GET
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/versions?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"value":[{"contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/3b84448db87444d2bba6e695e87bf9b7","attributes":{"enabled":true,"created":1476198728,"updated":1476198728},"tags":{"test":"foo"}},{"id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/806ae54cc9304b63841fad52b1209bec","attributes":{"enabled":true,"created":1476198723,"updated":1476198723}}],"nextLink":null}'}
|
||||
body: {string: '{"value":[{"id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/82d81101b3864937ad2aa146cd0c727a","attributes":{"enabled":true,"created":1478115516,"updated":1478115516}},{"contentType":"test
|
||||
type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/d29e9d2fc0bf452ebe8b065f2926ef93","attributes":{"enabled":true,"created":1478115516,"updated":1478115516},"tags":{"test":"foo"}}],"nextLink":null}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['433']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:08 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['433']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:37 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
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YjU2LTEwMTQtNDBmOC04OGFiLTNkOGE4Y2IwZTA4NiIsIjZiOTc3NjFhLWQ3ZDAtNDhmNi1hZDU2LWYzOGQzMjdjODU1MyJdLCJpcGFkZHIiOiIxNjcuMjIwLjAuMTg2IiwibmFtZSI6IkFkbWluMiIsIm9pZCI6IjU5NjNmNTBjLTdjNDMtNDA1Yy1hZjdlLTUzMjk0ZGU3NmFiZCIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwM0JGRkQ5NTlGODQyMyIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6InB1QWlLRzRBMGE3VUE0ZHhZM1VNWEY4amtxZHRWSDhoMVAzY0tNMDJocWsiLCJ0aWQiOiI1NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEiLCJ1bmlxdWVfbmFtZSI6ImFkbWluMkBBenVyZVNES1RlYW0ub25taWNyb3NvZnQuY29tIiwidXBuIjoiYWRtaW4yQEF6dXJlU0RLVGVhbS5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAifQ.YiXYcbk6VcghbG5fjq5R7XbaRD64YO-b3YQemB-zsIwPmwXJlJSlQZEKX270rXhjrdLpunu1tkvFF2ZnzBjAz43P98_tQ6b1tu9HBU0H-VET3ndPpv0k3pY0f7NsE1VBiteKzWye1SSzC9-fxyheoSr6rpZOTftYg2HncLC3NQgxRQlO_GPtf2odewMrKETK0q6aroV9_VzIbGHf3tVZ8i1JMJVtyDFlA1RHH1kl_zQ7_8WAhacEEYn7esIjqhHVutdnKUOh4A4W7m35zyE8BZRVZZbP_dI-AIvEiJUkYUUZI4N95DntQW5yoxWtoFlEiKAPxd0_w9cGfQIAnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [13efeab5-8fc5-11e6-a22e-f45c89b91e35]
|
||||
x-ms-client-request-id: [f3aaf586-a133-11e6-b036-a0b3ccf7272a]
|
||||
method: GET
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"value":"DEF456","contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/3b84448db87444d2bba6e695e87bf9b7","attributes":{"enabled":true,"created":1476198728,"updated":1476198728},"tags":{"test":"foo"}}'}
|
||||
body: {string: '{"value":"DEF456","contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/d29e9d2fc0bf452ebe8b065f2926ef93","attributes":{"enabled":true,"created":1478115516,"updated":1478115516},"tags":{"test":"foo"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['243']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:08 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['243']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:37 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YS8iLCJpYXQiOjE0NzYxOTcxNTQsIm5iZiI6MTQ3NjE5NzE1NCwiZXhwIjoxNDc2MjAxMDU0LCJhY3IiOiIxIiwiYW1yIjpbInB3ZCJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjoxMDgwMCwiZmFtaWx5X25hbWUiOiJBZG1pbjIiLCJnaXZlbl9uYW1lIjoiQWRtaW4yIiwiZ3JvdXBzIjpbImU0YmIwYjU2LTEwMTQtNDBmOC04OGFiLTNkOGE4Y2IwZTA4NiIsIjZiOTc3NjFhLWQ3ZDAtNDhmNi1hZDU2LWYzOGQzMjdjODU1MyJdLCJpcGFkZHIiOiIyNC4xOS4yMDguNjEiLCJuYW1lIjoiQWRtaW4yIiwib2lkIjoiNTk2M2Y1MGMtN2M0My00MDVjLWFmN2UtNTMyOTRkZTc2YWJkIiwicHVpZCI6IjEwMDNCRkZEOTU5Rjg0MjMiLCJzY3AiOiJ1c2V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AnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [142f80e8-8fc5-11e6-b63c-f45c89b91e35]
|
||||
x-ms-client-request-id: [f3cf7bf4-a133-11e6-b999-a0b3ccf7272a]
|
||||
method: GET
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/806ae54cc9304b63841fad52b1209bec?api-version=2015-06-01
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/82d81101b3864937ad2aa146cd0c727a?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"value":"ABC123","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/806ae54cc9304b63841fad52b1209bec","attributes":{"enabled":true,"created":1476198723,"updated":1476198723}}'}
|
||||
body: {string: '{"value":"ABC123","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/82d81101b3864937ad2aa146cd0c727a","attributes":{"enabled":true,"created":1478115516,"updated":1478115516}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['195']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:08 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['195']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:37 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: '{"attributes": {"enabled": false}}'
|
||||
body: !!binary |
|
||||
eyJhdHRyaWJ1dGVzIjogeyJlbmFibGVkIjogZmFsc2V9fQ==
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YS8iLCJpYXQiOjE0NzYxOTcxNTQsIm5iZiI6MTQ3NjE5NzE1NCwiZXhwIjoxNDc2MjAxMDU0LCJhY3IiOiIxIiwiYW1yIjpbInB3ZCJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjoxMDgwMCwiZmFtaWx5X25hbWUiOiJBZG1pbjIiLCJnaXZlbl9uYW1lIjoiQWRtaW4yIiwiZ3JvdXB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lJSlQZEKX270rXhjrdLpunu1tkvFF2ZnzBjAz43P98_tQ6b1tu9HBU0H-VET3ndPpv0k3pY0f7NsE1VBiteKzWye1SSzC9-fxyheoSr6rpZOTftYg2HncLC3NQgxRQlO_GPtf2odewMrKETK0q6aroV9_VzIbGHf3tVZ8i1JMJVtyDFlA1RHH1kl_zQ7_8WAhacEEYn7esIjqhHVutdnKUOh4A4W7m35zyE8BZRVZZbP_dI-AIvEiJUkYUUZI4N95DntQW5yoxWtoFlEiKAPxd0_w9cGfQIAnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['34']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [1458f72e-8fc5-11e6-866b-f45c89b91e35]
|
||||
x-ms-client-request-id: [f3efbc48-a133-11e6-8728-a0b3ccf7272a]
|
||||
method: PATCH
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/3b84448db87444d2bba6e695e87bf9b7","attributes":{"enabled":false,"created":1476198728,"updated":1476198728},"tags":{"test":"foo"}}'}
|
||||
body: {string: '{"contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/d29e9d2fc0bf452ebe8b065f2926ef93","attributes":{"enabled":false,"created":1478115516,"updated":1478115518},"tags":{"test":"foo"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['227']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:08 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['227']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:38 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YS8iLCJpYXQiOjE0NzYxOTcxNTQsIm5iZiI6MTQ3NjE5NzE1NCwiZXhwIjoxNDc2MjAxMDU0LCJhY3IiOiIxIiwiYW1yIjpbInB3ZCJdLCJhcHBpZCI6IjA0YjA3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lYW0ub25taWNyb3NvZnQuY29tIiwidXBuIjoiYWRtaW4yQEF6dXJlU0RLVGVhbS5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAifQ.YiXYcbk6VcghbG5fjq5R7XbaRD64YO-b3YQemB-zsIwPmwXJlJSlQZEKX270rXhjrdLpunu1tkvFF2ZnzBjAz43P98_tQ6b1tu9HBU0H-VET3ndPpv0k3pY0f7NsE1VBiteKzWye1SSzC9-fxyheoSr6rpZOTftYg2HncLC3NQgxRQlO_GPtf2odewMrKETK0q6aroV9_VzIbGHf3tVZ8i1JMJVtyDFlA1RHH1kl_zQ7_8WAhacEEYn7esIjqhHVutdnKUOh4A4W7m35zyE8BZRVZZbP_dI-AIvEiJUkYUUZI4N95DntQW5yoxWtoFlEiKAPxd0_w9cGfQIAnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [148c4cd9-8fc5-11e6-aa92-f45c89b91e35]
|
||||
x-ms-client-request-id: [f41d8714-a133-11e6-b4b5-a0b3ccf7272a]
|
||||
method: DELETE
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/3b84448db87444d2bba6e695e87bf9b7","attributes":{"enabled":false,"created":1476198728,"updated":1476198728},"tags":{"test":"foo"}}'}
|
||||
body: {string: '{"contentType":"test type","id":"https://cli-test-keyvault-secret.vault.azure.net/secrets/secret1/d29e9d2fc0bf452ebe8b065f2926ef93","attributes":{"enabled":false,"created":1478115516,"updated":1478115518},"tags":{"test":"foo"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['227']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:09 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['227']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:37 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyIsImtpZCI6IlliUkFRUlljRV9tb3RXVkpLSHJ3TEJiZF85cyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzU0ODI2YjIyLTM4ZDYtNGZiMi1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MGE3VUE0ZHhZM1VNWEY4amtxZHRWSDhoMVAzY0tNMDJocWsiLCJ0aWQiOiI1NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEiLCJ1bmlxdWVfbmFtZSI6ImFkbWluMkBBenVyZVNES1RlYW0ub25taWNyb3NvZnQuY29tIiwidXBuIjoiYWRtaW4yQEF6dXJlU0RLVGVhbS5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAifQ.YiXYcbk6VcghbG5fjq5R7XbaRD64YO-b3YQemB-zsIwPmwXJlJSlQZEKX270rXhjrdLpunu1tkvFF2ZnzBjAz43P98_tQ6b1tu9HBU0H-VET3ndPpv0k3pY0f7NsE1VBiteKzWye1SSzC9-fxyheoSr6rpZOTftYg2HncLC3NQgxRQlO_GPtf2odewMrKETK0q6aroV9_VzIbGHf3tVZ8i1JMJVtyDFlA1RHH1kl_zQ7_8WAhacEEYn7esIjqhHVutdnKUOh4A4W7m35zyE8BZRVZZbP_dI-AIvEiJUkYUUZI4N95DntQW5yoxWtoFlEiKAPxd0_w9cGfQIAnKD_yA]
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/2.7.11 (Darwin-15.6.0-x86_64-i386-64bit) requests/2.9.1
|
||||
msrest/0.4.4 msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4
|
||||
msrest_azure/0.4.3 keyvaultclient/2015-06-01 Azure-SDK-For-Python]
|
||||
accept-language: [en-US]
|
||||
x-ms-client-request-id: [14bbac9e-8fc5-11e6-b570-f45c89b91e35]
|
||||
x-ms-client-request-id: [f45cdba8-a133-11e6-9e19-a0b3ccf7272a]
|
||||
method: GET
|
||||
uri: https://cli-test-keyvault-secret.vault.azure.net/secrets?api-version=2015-06-01
|
||||
response:
|
||||
body: {string: !!python/unicode '{"value":[],"nextLink":null}'}
|
||||
body: {string: '{"value":[],"nextLink":null}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['28']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 11 Oct 2016 15:12:10 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: [Microsoft-IIS/8.5]
|
||||
strict-transport-security: [max-age=31536000;includeSubDomains]
|
||||
x-aspnet-version: [4.0.30319]
|
||||
x-content-type-options: [nosniff]
|
||||
Cache-Control: [no-cache]
|
||||
Content-Length: ['28']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Wed, 02 Nov 2016 19:38:38 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Server: [Microsoft-IIS/8.5]
|
||||
Strict-Transport-Security: [max-age=31536000;includeSubDomains]
|
||||
X-AspNet-Version: [4.0.30319]
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Powered-By: [ASP.NET]
|
||||
x-ms-keyvault-region: [westus]
|
||||
x-ms-keyvault-service-version: [1.0.0.778]
|
||||
x-powered-by: [ASP.NET]
|
||||
x-ms-keyvault-service-version: [1.0.0.781]
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
||||
|
|
|
@ -6,14 +6,60 @@
|
|||
#pylint: disable=method-hidden
|
||||
#pylint: disable=line-too-long
|
||||
#pylint: disable=bad-continuation
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import time
|
||||
|
||||
from azure.cli.core._util import CLIError
|
||||
from azure.cli.core.test_utils.vcr_test_base import (ResourceGroupVCRTestBase, JMESPathCheck,
|
||||
NoneCheck)
|
||||
NoneCheck, VCRTestBase)
|
||||
|
||||
from azure.cli.command_modules.keyvault.keyvaultclient import HttpBearerChallenge
|
||||
from azure.cli.command_modules.keyvault.keyvaultclient.key_vault_authentication import \
|
||||
(KeyVaultAuthBase)
|
||||
|
||||
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
|
||||
|
||||
def _before_record_response(response):
|
||||
for key in VCRTestBase.FILTER_HEADERS:
|
||||
if key in response['headers']:
|
||||
del response['headers'][key]
|
||||
# ignore any 401 responses during playback
|
||||
if response['status']['code'] == 401:
|
||||
response = None
|
||||
return response
|
||||
|
||||
|
||||
def _mock_key_vault_auth_base(self, request):
|
||||
challenge = HttpBearerChallenge(request.url, 'Bearer authorization=fake-url,resource=https://vault.azure.net')
|
||||
self.set_authorization_header(request, challenge)
|
||||
return request
|
||||
|
||||
def _create_keyvault(test, vault_name, resource_group, location, retry_wait=30, max_retries=10): # pylint: disable=too-many-arguments
|
||||
# need premium KeyVault to store keys in HSM
|
||||
test.cmd('keyvault create -g {} -n {} -l {} --sku premium'.format(resource_group, vault_name, location))
|
||||
|
||||
retries = 0
|
||||
while True:
|
||||
try:
|
||||
# if you can connect to the keyvault, proceed with test
|
||||
test.cmd('keyvault key list --vault-name {}'.format(vault_name))
|
||||
return
|
||||
except CLIError as ex:
|
||||
# because it can take time for the DNS registration to propagate, periodically retry
|
||||
# until we can connect to the keyvault. During the wait, you should try to manually
|
||||
# flush the DNS cache in a separate terminal. Since this is OS dependent, we cannot
|
||||
# reliably do this programmatically.
|
||||
if 'Max retries exceeded attempting to connect to vault' in str(ex) and retries < max_retries:
|
||||
retries += 1
|
||||
print('\tWaiting for DNS changes to propagate. Please try manually flushing your')
|
||||
print('\tDNS cache. (ex: \'ipconfig /flushdns\' on Windows)')
|
||||
print('\t\tRetrying ({}/{}) in {} seconds\n'.format(retries, max_retries, retry_wait))
|
||||
time.sleep(retry_wait)
|
||||
else:
|
||||
raise ex
|
||||
|
||||
class KeyVaultMgmtScenarioTest(ResourceGroupVCRTestBase):
|
||||
|
||||
def __init__(self, test_method):
|
||||
|
@ -92,13 +138,16 @@ class KeyVaultKeyScenarioTest(ResourceGroupVCRTestBase):
|
|||
|
||||
def __init__(self, test_method):
|
||||
super(KeyVaultKeyScenarioTest, self).__init__(__file__, test_method)
|
||||
self.my_vcr.before_record_response = _before_record_response
|
||||
if self.playback:
|
||||
KeyVaultAuthBase.__call__ = _mock_key_vault_auth_base
|
||||
self.resource_group = 'cli-test-keyvault-key'
|
||||
self.keyvault_name = 'cli-keyvault-test-key'
|
||||
self.location = 'westus'
|
||||
|
||||
def set_up(self):
|
||||
super(KeyVaultKeyScenarioTest, self).set_up()
|
||||
self.cmd('keyvault create -g {} -n {} -l {}'.format(self.resource_group, self.keyvault_name, self.location))
|
||||
_create_keyvault(self, self.keyvault_name, self.resource_group, self.location)
|
||||
|
||||
def test_keyvault_key(self):
|
||||
self.execute()
|
||||
|
@ -140,28 +189,44 @@ class KeyVaultKeyScenarioTest(ResourceGroupVCRTestBase):
|
|||
JMESPathCheck('attributes.enabled', True)
|
||||
])
|
||||
|
||||
# delete key
|
||||
# backup and then delete key
|
||||
key_file = 'backup.key'
|
||||
self.cmd('keyvault key backup --vault-name {} -n key1 --file {}'.format(kv, key_file))
|
||||
self.cmd('keyvault key delete --vault-name {} -n key1'.format(kv))
|
||||
self.cmd('keyvault key list --vault-name {}'.format(kv),
|
||||
checks=NoneCheck())
|
||||
|
||||
# PHASE 3 COMMANDS
|
||||
# TODO: import PEM key
|
||||
# TODO: import BYOK key
|
||||
# TODO: backup key
|
||||
# TODO: restore key backup
|
||||
# restore key from backup
|
||||
self.cmd('keyvault key restore --vault-name {} --file {}'.format(kv, key_file))
|
||||
self.cmd('keyvault key list-versions --vault-name {} -n key1'.format(kv),
|
||||
checks=JMESPathCheck('length(@)', 2))
|
||||
if os.path.isfile(key_file):
|
||||
os.remove(key_file)
|
||||
|
||||
# import PEM and BYOK keys
|
||||
key_enc_file = os.path.join(TEST_DIR, 'mydomain.test.encrypted.pem')
|
||||
key_enc_password = 'password'
|
||||
key_plain_file = os.path.join(TEST_DIR, 'mydomain.test.pem')
|
||||
self.cmd('keyvault key import --vault-name {} -n import-key-plain --pem-file "{}" -p software'.format(kv, key_plain_file))
|
||||
self.cmd('keyvault key import --vault-name {} -n import-key-encrypted --pem-file "{}" --pem-password {} -p hsm'.format(kv, key_enc_file, key_enc_password))
|
||||
|
||||
byok_key_file = os.path.join(TEST_DIR, 'TestBYOK-NA.byok')
|
||||
self.cmd('keyvault key import --vault-name {} -n import-key-byok --byok-file "{}"'.format(kv, byok_key_file))
|
||||
|
||||
class KeyVaultSecretScenarioTest(ResourceGroupVCRTestBase):
|
||||
|
||||
def __init__(self, test_method):
|
||||
super(KeyVaultSecretScenarioTest, self).__init__(__file__, test_method)
|
||||
self.my_vcr.before_record_response = _before_record_response
|
||||
if self.playback:
|
||||
KeyVaultAuthBase.__call__ = _mock_key_vault_auth_base
|
||||
self.resource_group = 'cli-test-keyvault-secret'
|
||||
self.keyvault_name = 'cli-test-keyvault-secret'
|
||||
self.location = 'westus'
|
||||
|
||||
def set_up(self):
|
||||
super(KeyVaultSecretScenarioTest, self).set_up()
|
||||
self.cmd('keyvault create -g {} -n {} -l {}'.format(self.resource_group, self.keyvault_name, self.location))
|
||||
_create_keyvault(self, self.keyvault_name, self.resource_group, self.location)
|
||||
|
||||
def test_keyvault_secret(self):
|
||||
self.execute()
|
||||
|
@ -209,20 +274,23 @@ class KeyVaultSecretScenarioTest(ResourceGroupVCRTestBase):
|
|||
self.cmd('keyvault secret list --vault-name {}'.format(kv),
|
||||
checks=NoneCheck())
|
||||
|
||||
# PHASE 3 COMMANDS
|
||||
# Round 4 COMMANDS
|
||||
# TODO: download secret
|
||||
|
||||
class KeyVaultCertificateScenarioTest(ResourceGroupVCRTestBase):
|
||||
|
||||
def __init__(self, test_method):
|
||||
super(KeyVaultCertificateScenarioTest, self).__init__(__file__, test_method)
|
||||
self.my_vcr.before_record_response = _before_record_response
|
||||
if self.playback:
|
||||
KeyVaultAuthBase.__call__ = _mock_key_vault_auth_base
|
||||
self.resource_group = 'cli-test-keyvault-cert'
|
||||
self.keyvault_name = 'cli-test-keyvault-cert'
|
||||
self.location = 'westus'
|
||||
|
||||
def set_up(self):
|
||||
super(KeyVaultCertificateScenarioTest, self).set_up()
|
||||
self.cmd('keyvault create -g {} -n {} -l {}'.format(self.resource_group, self.keyvault_name, self.location))
|
||||
_create_keyvault(self, self.keyvault_name, self.resource_group, self.location)
|
||||
|
||||
def test_keyvault_certificate(self):
|
||||
self.execute()
|
||||
|
@ -292,6 +360,28 @@ class KeyVaultCertificateScenarioTest(ResourceGroupVCRTestBase):
|
|||
self.cmd('keyvault certificate issuer delete --vault-name {} --issuer-name issuer1'.format(kv))
|
||||
self.cmd('keyvault certificate issuer list --vault-name {}'.format(kv), checks=NoneCheck())
|
||||
|
||||
def _test_keyvault_pending_certificate(self):
|
||||
kv = self.keyvault_name
|
||||
policy_path = os.path.join(TEST_DIR, 'policy_pending.json')
|
||||
fake_cert_path = os.path.join(TEST_DIR, 'import_pem_plain.pem')
|
||||
self.cmd('keyvault certificate create --vault-name {} -n pending-cert -p @"{}"'.format(kv, policy_path), checks=[
|
||||
JMESPathCheck('statusDetails', 'Pending certificate created. Please Perform Merge to complete the request.'),
|
||||
JMESPathCheck('cancellationRequested', False),
|
||||
JMESPathCheck('status', 'inProgress')
|
||||
])
|
||||
self.cmd('keyvault certificate pending show --vault-name {} -n pending-cert'.format(kv), checks=[
|
||||
JMESPathCheck('statusDetails', 'Pending certificate created. Please Perform Merge to complete the request.'),
|
||||
JMESPathCheck('cancellationRequested', False),
|
||||
JMESPathCheck('status', 'inProgress')
|
||||
])
|
||||
# we do not have a way of actually getting a certificate that would pass this test so
|
||||
# we simply ensure that the payload successfully serializes and is received by the server
|
||||
self.cmd('keyvault certificate pending merge --vault-name {} -n pending-cert --file "{}"'.format(kv, fake_cert_path),
|
||||
allowed_exceptions="Public key from x509 certificate and key of this instance doesn't match")
|
||||
self.cmd('keyvault certificate pending delete --vault-name {} -n pending-cert'.format(kv))
|
||||
self.cmd('keyvault certificate pending show --vault-name {} -n pending-cert'.format(kv),
|
||||
allowed_exceptions='Pending certificate not found')
|
||||
|
||||
def body(self):
|
||||
kv = self.keyvault_name
|
||||
|
||||
|
@ -338,13 +428,24 @@ class KeyVaultCertificateScenarioTest(ResourceGroupVCRTestBase):
|
|||
|
||||
self._test_keyvault_certificate_contacts()
|
||||
self._test_keyvault_certificate_issuers()
|
||||
|
||||
# PHASE 3 COMMANDS
|
||||
# TODO: download certificiate
|
||||
# TODO: import certificate
|
||||
# TODO: merge certificate
|
||||
self._test_keyvault_pending_certificate()
|
||||
|
||||
# delete certificate
|
||||
self.cmd('keyvault certificate delete --vault-name {} -n cert1'.format(kv))
|
||||
self.cmd('keyvault certificate list --vault-name {}'.format(kv),
|
||||
checks=NoneCheck())
|
||||
|
||||
# test certificate import
|
||||
pem_encrypted_file = os.path.join(TEST_DIR, 'import_pem_encrypted_pwd_1234.pem')
|
||||
pem_encrypted_password = '1234'
|
||||
pem_plain_file = os.path.join(TEST_DIR, 'import_pem_plain.pem')
|
||||
pem_policy_path = os.path.join(TEST_DIR, 'policy_import_pem.json')
|
||||
self.cmd('keyvault certificate import --vault-name {} -n pem-cert1 --file "{}" -p @"{}"'.format(kv, pem_plain_file, pem_policy_path))
|
||||
self.cmd('keyvault certificate import --vault-name {} -n pem-cert2 --file "{}" --password {} -p @"{}"'.format(kv, pem_encrypted_file, pem_encrypted_password, pem_policy_path))
|
||||
|
||||
pfx_plain_file = os.path.join(TEST_DIR, 'import_pfx.pfx')
|
||||
pfx_policy_path = os.path.join(TEST_DIR, 'policy_import_pfx.json')
|
||||
self.cmd('keyvault certificate import --vault-name {} -n pfx-cert --file "{}" -p @"{}"'.format(kv, pfx_plain_file, pfx_policy_path))
|
||||
|
||||
# Round 4 COMMANDS
|
||||
# TODO: download certificiate
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
azure-mgmt-keyvault==0.30.0
|
||||
pyOpenSSL
|
||||
|
|
|
@ -29,6 +29,7 @@ CLASSIFIERS = [
|
|||
DEPENDENCIES = [
|
||||
'azure-mgmt-keyvault==0.30.0',
|
||||
'azure-cli-core',
|
||||
'pyOpenSSL'
|
||||
]
|
||||
|
||||
with open('README.rst', 'r', encoding='utf-8') as f:
|
||||
|
|
Загрузка…
Ссылка в новой задаче