diff --git a/src/attestation/HISTORY.rst b/src/attestation/HISTORY.rst index 41cfef75c0d..fb941a29295 100644 --- a/src/attestation/HISTORY.rst +++ b/src/attestation/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.0.0 +++++++ +* `az attestation `: Remove sdk +* `az attestation signer/ploicy`: Bump up api-version and remove sdk + 0.2.1 ++++++ * `az attestation policy show`: Fix encoding and decoding issues due to JWT upgrades diff --git a/src/attestation/azext_attestation/__init__.py b/src/attestation/azext_attestation/__init__.py index 1d65b57ae5a..5f42ce3febb 100644 --- a/src/attestation/azext_attestation/__init__.py +++ b/src/attestation/azext_attestation/__init__.py @@ -10,7 +10,7 @@ from azure.cli.core import AzCommandsLoader try: - from azext_attestation.manual._help import helps # pylint: disable=reimported + from azext_attestation._help import helps # pylint: disable=reimported except ImportError: pass @@ -19,31 +19,30 @@ class AttestationManagementClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_attestation.generated._client_factory import cf_attestation_cl attestation_custom = CliCommandType( - operations_tmpl='azext_attestation.custom#{}', - client_factory=cf_attestation_cl) + operations_tmpl='azext_attestation.custom#{}') parent = super(AttestationManagementClientCommandsLoader, self) parent.__init__(cli_ctx=cli_ctx, custom_command_type=attestation_custom) def load_command_table(self, args): - from azext_attestation.generated.commands import load_command_table - load_command_table(self, args) + from azext_attestation.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table try: - from azext_attestation.manual.commands import load_command_table as load_command_table_manual - load_command_table_manual(self, args) + from . import aaz except ImportError: - pass + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) return self.command_table def load_arguments(self, command): - from azext_attestation.generated._params import load_arguments + from azext_attestation._params import load_arguments load_arguments(self, command) - try: - from azext_attestation.manual._params import load_arguments as load_arguments_manual - load_arguments_manual(self, command) - except ImportError: - pass COMMAND_LOADER_CLS = AttestationManagementClientCommandsLoader diff --git a/src/attestation/azext_attestation/generated/_validators.py b/src/attestation/azext_attestation/_help.py similarity index 100% rename from src/attestation/azext_attestation/generated/_validators.py rename to src/attestation/azext_attestation/_help.py diff --git a/src/attestation/azext_attestation/generated/_help.py b/src/attestation/azext_attestation/_params.py similarity index 86% rename from src/attestation/azext_attestation/generated/_help.py rename to src/attestation/azext_attestation/_params.py index ad090433df3..a02eda0ef71 100644 --- a/src/attestation/azext_attestation/generated/_help.py +++ b/src/attestation/azext_attestation/_params.py @@ -8,3 +8,8 @@ # regenerated. # -------------------------------------------------------------------------- # pylint: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): + pass diff --git a/src/attestation/azext_attestation/aaz/__init__.py b/src/attestation/azext_attestation/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/version.py b/src/attestation/azext_attestation/aaz/latest/__init__.py similarity index 51% rename from src/attestation/azext_attestation/vendored_sdks/azure_attestation/version.py rename to src/attestation/azext_attestation/aaz/latest/__init__.py index e0ec669828c..6439dd20eb7 100644 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/version.py +++ b/src/attestation/azext_attestation/aaz/latest/__init__.py @@ -1,13 +1,11 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. +# Licensed under the MIT License. See License.txt in the project root for license information. # -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- -VERSION = "0.1.0" +# pylint: skip-file +# flake8: noqa +from ._clients import * diff --git a/src/attestation/azext_attestation/aaz/latest/_clients.py b/src/attestation/azext_attestation/aaz/latest/_clients.py new file mode 100644 index 00000000000..b5f3a768de9 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/_clients.py @@ -0,0 +1,248 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_client("AAZMicrosoftAttestationDataPlaneClient_attestation") +class AAZMicrosoftAttestationDataPlaneClient(AAZBaseClient): + + _AAD_CREDENTIAL_SCOPES = [ + "https://attest.azure.net/.default", + ] + + @classmethod + def _build_base_url(cls, ctx, **kwargs): + cls._fetch_endpoint(ctx, **kwargs) + host = ctx.selectors.endpoint.required().to_serialized_data() + if not isinstance(host, str): + raise ValueError(f"Invalid host value: '{host}'") + return host + + @classmethod + def _build_configuration(cls, ctx, credential, **kwargs): + return AAZClientConfiguration( + credential=credential, + credential_scopes=cls._AAD_CREDENTIAL_SCOPES, + **kwargs + ) + + @classmethod + def _fetch_endpoint(cls, ctx, **kwargs): + cls.EndpointSelector(ctx=ctx, name="endpoint") + cls.AttestationProvidersGet(ctx=ctx)() + + class EndpointSelector(AAZJsonSelector): + + def _get(self): + result = self.ctx.vars.endpoint_instance + return result.properties.attestUri + + def _set(self, value): + result = self.ctx.vars.endpoint_instance + result.properties.attestUri = value + return + + class AttestationProvidersGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "providerName", self.ctx.args.provider_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-06-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "endpoint_instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.attest_uri = AAZStrType( + serialized_name="attestUri", + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.public_network_access = AAZStrType( + serialized_name="publicNetworkAccess", + ) + properties.status = AAZStrType() + properties.tpm_attestation_authentication = AAZStrType( + serialized_name="tpmAttestationAuthentication", + ) + properties.trust_model = AAZStrType( + serialized_name="trustModel", + ) + + private_endpoint_connections = cls._schema_on_200.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.private_endpoint_connections.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties.private_endpoint_connections.Element.properties + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_endpoint = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_endpoint + private_endpoint.id = AAZStrType( + flags={"read_only": True}, + ) + + private_link_service_connection_state = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state + private_link_service_connection_state.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state.description = AAZStrType() + private_link_service_connection_state.status = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _AAZMicrosoftAttestationDataPlaneClientHelper: + """Helper class for AAZMicrosoftAttestationDataPlaneClient""" + + +__all__ = [ + "AAZMicrosoftAttestationDataPlaneClient", +] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/__cmd_group.py b/src/attestation/azext_attestation/aaz/latest/attestation/__cmd_group.py new file mode 100644 index 00000000000..53d4a7f9bd9 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "attestation", +) +class __CMDGroup(AAZCommandGroup): + """Manage Microsoft Azure Attestation (MAA). + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/__init__.py b/src/attestation/azext_attestation/aaz/latest/attestation/__init__.py new file mode 100644 index 00000000000..3a615f8e0b2 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/__init__.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._get_default_by_location import * +from ._list import * +from ._list_default import * +from ._show import * +from ._update import * diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/_create.py b/src/attestation/azext_attestation/aaz/latest/attestation/_create.py new file mode 100644 index 00000000000..633028571a6 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/_create.py @@ -0,0 +1,412 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation create", +) +class Create(AAZCommand): + """Creates a new Attestation Provider instance. + + :example: AttestationProviders_Create + az attestation create --name "myattestationprovider" --resource-group "MyResourceGroup" -l westus + """ + + _aaz_info = { + "version": "2020-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.attestation/attestationproviders/{}", "2020-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + help="Name of the attestation provider.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.location = AAZResourceLocationArg( + help="The supported Azure location where the attestation provider should be created.", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.certs = AAZListArg( + options=["--certs"], + help="The value of the \"keys\" parameter is an array of JWK values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.", + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="The tags that will be assigned to the attestation provider.", + ) + + certs = cls._args_schema.certs + certs.Element = AAZObjectArg() + + _element = cls._args_schema.certs.Element + _element.alg = AAZStrArg( + options=["alg"], + help="The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.", + ) + _element.crv = AAZStrArg( + options=["crv"], + help="The \"crv\" (curve) parameter identifies the curve type", + ) + _element.d = AAZStrArg( + options=["d"], + help="RSA private exponent or ECC private key", + ) + _element.dp = AAZStrArg( + options=["dp"], + help="RSA Private Key Parameter", + ) + _element.dq = AAZStrArg( + options=["dq"], + help="RSA Private Key Parameter", + ) + _element.e = AAZStrArg( + options=["e"], + help="RSA public exponent, in Base64", + ) + _element.k = AAZStrArg( + options=["k"], + help="Symmetric key", + ) + _element.kid = AAZStrArg( + options=["kid"], + help="The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string.", + ) + _element.kty = AAZStrArg( + options=["kty"], + help="The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string.", + required=True, + ) + _element.n = AAZStrArg( + options=["n"], + help="RSA modulus, in Base64", + ) + _element.p = AAZStrArg( + options=["p"], + help="RSA secret prime", + ) + _element.q = AAZStrArg( + options=["q"], + help="RSA secret prime, with p < q", + ) + _element.qi = AAZStrArg( + options=["qi"], + help="RSA Private Key Parameter", + ) + _element.use = AAZStrArg( + options=["use"], + help="Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).", + ) + _element.x = AAZStrArg( + options=["x"], + help="X coordinate for the Elliptic Curve point", + ) + _element.x5c = AAZListArg( + options=["x5c"], + help="The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.", + ) + _element.y = AAZStrArg( + options=["y"], + help="Y coordinate for the Elliptic Curve point", + ) + + x5c = cls._args_schema.certs.Element.x5c + x5c.Element = AAZStrArg() + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AttestationProvidersCreate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AttestationProvidersCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "providerName", self.ctx.args.provider_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("policySigningCertificates", AAZObjectType) + + policy_signing_certificates = _builder.get(".properties.policySigningCertificates") + if policy_signing_certificates is not None: + policy_signing_certificates.set_prop("keys", AAZListType, ".certs") + + keys = _builder.get(".properties.policySigningCertificates.keys") + if keys is not None: + keys.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.policySigningCertificates.keys[]") + if _elements is not None: + _elements.set_prop("alg", AAZStrType, ".alg") + _elements.set_prop("crv", AAZStrType, ".crv") + _elements.set_prop("d", AAZStrType, ".d") + _elements.set_prop("dp", AAZStrType, ".dp") + _elements.set_prop("dq", AAZStrType, ".dq") + _elements.set_prop("e", AAZStrType, ".e") + _elements.set_prop("k", AAZStrType, ".k") + _elements.set_prop("kid", AAZStrType, ".kid") + _elements.set_prop("kty", AAZStrType, ".kty", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("n", AAZStrType, ".n") + _elements.set_prop("p", AAZStrType, ".p") + _elements.set_prop("q", AAZStrType, ".q") + _elements.set_prop("qi", AAZStrType, ".qi") + _elements.set_prop("use", AAZStrType, ".use") + _elements.set_prop("x", AAZStrType, ".x") + _elements.set_prop("x5c", AAZListType, ".x5c") + _elements.set_prop("y", AAZStrType, ".y") + + x5c = _builder.get(".properties.policySigningCertificates.keys[].x5c") + if x5c is not None: + x5c.set_elements(AAZStrType, ".") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.attest_uri = AAZStrType( + serialized_name="attestUri", + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.trust_model = AAZStrType( + serialized_name="trustModel", + ) + + private_endpoint_connections = cls._schema_on_200_201.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.private_endpoint_connections.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties.private_endpoint_connections.Element.properties + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_endpoint = cls._schema_on_200_201.properties.private_endpoint_connections.Element.properties.private_endpoint + private_endpoint.id = AAZStrType( + flags={"read_only": True}, + ) + + private_link_service_connection_state = cls._schema_on_200_201.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state + private_link_service_connection_state.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state.description = AAZStrType() + private_link_service_connection_state.status = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/_delete.py b/src/attestation/azext_attestation/aaz/latest/attestation/_delete.py new file mode 100644 index 00000000000..81df4ef4358 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/_delete.py @@ -0,0 +1,144 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete Attestation Service. + + :example: AttestationProviders_Delete + az attestation delete --name "myattestationprovider" --resource-group "sample-resource-group" + """ + + _aaz_info = { + "version": "2020-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.attestation/attestationproviders/{}", "2020-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + help="Name of the attestation service", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AttestationProvidersDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class AttestationProvidersDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [202]: + return self.on_202(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "providerName", self.ctx.args.provider_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-10-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_202(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/_get_default_by_location.py b/src/attestation/azext_attestation/aaz/latest/attestation/_get_default_by_location.py new file mode 100644 index 00000000000..abf398145c3 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/_get_default_by_location.py @@ -0,0 +1,253 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation get-default-by-location", +) +class GetDefaultByLocation(AAZCommand): + """Get the default provider by location. + + :example: AttestationProviders_GetDefaultWithLocation + az attestation get-default-by-location --location "Central US" + """ + + _aaz_info = { + "version": "2020-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.attestation/locations/{}/defaultprovider", "2020-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AttestationProvidersGetDefaultByLocation(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AttestationProvidersGetDefaultByLocation(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/locations/{location}/defaultProvider", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "location", self.ctx.args.location, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.attest_uri = AAZStrType( + serialized_name="attestUri", + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.trust_model = AAZStrType( + serialized_name="trustModel", + ) + + private_endpoint_connections = cls._schema_on_200.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.private_endpoint_connections.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties.private_endpoint_connections.Element.properties + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_endpoint = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_endpoint + private_endpoint.id = AAZStrType( + flags={"read_only": True}, + ) + + private_link_service_connection_state = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state + private_link_service_connection_state.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state.description = AAZStrType() + private_link_service_connection_state.status = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _GetDefaultByLocationHelper: + """Helper class for GetDefaultByLocation""" + + +__all__ = ["GetDefaultByLocation"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/_list.py b/src/attestation/azext_attestation/aaz/latest/attestation/_list.py new file mode 100644 index 00000000000..ad972a8fcc4 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/_list.py @@ -0,0 +1,461 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation list", +) +class List(AAZCommand): + """Returns a list of attestation providers in a subscription. + + :example: AttestationProviders_ListByResourceGroup + az attestation list --resource-group "testrg1" + + :example: AttestationProviders_List + az attestation list + """ + + _aaz_info = { + "version": "2020-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.attestation/attestationproviders", "2020-10-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.attestation/attestationproviders", "2020-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.AttestationProvidersListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.AttestationProvidersList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AttestationProvidersListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ListHelper._build_schema_system_data_read(_schema_on_200.system_data) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ListHelper._build_schema_system_data_read(_element.system_data) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.attest_uri = AAZStrType( + serialized_name="attestUri", + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.trust_model = AAZStrType( + serialized_name="trustModel", + ) + + private_endpoint_connections = cls._schema_on_200.value.Element.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_endpoint = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties.private_endpoint + private_endpoint.id = AAZStrType( + flags={"read_only": True}, + ) + + private_link_service_connection_state = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state + private_link_service_connection_state.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state.description = AAZStrType() + private_link_service_connection_state.status = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class AttestationProvidersList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/attestationProviders", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ListHelper._build_schema_system_data_read(_schema_on_200.system_data) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ListHelper._build_schema_system_data_read(_element.system_data) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.attest_uri = AAZStrType( + serialized_name="attestUri", + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.trust_model = AAZStrType( + serialized_name="trustModel", + ) + + private_endpoint_connections = cls._schema_on_200.value.Element.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_endpoint = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties.private_endpoint + private_endpoint.id = AAZStrType( + flags={"read_only": True}, + ) + + private_link_service_connection_state = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state + private_link_service_connection_state.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state.description = AAZStrType() + private_link_service_connection_state.status = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_system_data_read = None + + @classmethod + def _build_schema_system_data_read(cls, _schema): + if cls._schema_system_data_read is not None: + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + return + + cls._schema_system_data_read = _schema_system_data_read = AAZObjectType( + flags={"read_only": True} + ) + + system_data_read = _schema_system_data_read + system_data_read.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data_read.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data_read.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data_read.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data_read.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data_read.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + + +__all__ = ["List"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/_list_default.py b/src/attestation/azext_attestation/aaz/latest/attestation/_list_default.py new file mode 100644 index 00000000000..9ddffaef990 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/_list_default.py @@ -0,0 +1,279 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation list-default", +) +class ListDefault(AAZCommand): + """Get the default provider. + + :example: AttestationProviders_GetDefault + az attestation list-default + """ + + _aaz_info = { + "version": "2020-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.attestation/defaultproviders", "2020-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AttestationProvidersListDefault(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AttestationProvidersListDefault(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/defaultProviders", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ListDefaultHelper._build_schema_system_data_read(_schema_on_200.system_data) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _ListDefaultHelper._build_schema_system_data_read(_element.system_data) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.attest_uri = AAZStrType( + serialized_name="attestUri", + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.trust_model = AAZStrType( + serialized_name="trustModel", + ) + + private_endpoint_connections = cls._schema_on_200.value.Element.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_endpoint = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties.private_endpoint + private_endpoint.id = AAZStrType( + flags={"read_only": True}, + ) + + private_link_service_connection_state = cls._schema_on_200.value.Element.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state + private_link_service_connection_state.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state.description = AAZStrType() + private_link_service_connection_state.status = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListDefaultHelper: + """Helper class for ListDefault""" + + _schema_system_data_read = None + + @classmethod + def _build_schema_system_data_read(cls, _schema): + if cls._schema_system_data_read is not None: + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + return + + cls._schema_system_data_read = _schema_system_data_read = AAZObjectType( + flags={"read_only": True} + ) + + system_data_read = _schema_system_data_read + system_data_read.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data_read.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data_read.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data_read.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data_read.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data_read.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.created_at = cls._schema_system_data_read.created_at + _schema.created_by = cls._schema_system_data_read.created_by + _schema.created_by_type = cls._schema_system_data_read.created_by_type + _schema.last_modified_at = cls._schema_system_data_read.last_modified_at + _schema.last_modified_by = cls._schema_system_data_read.last_modified_by + _schema.last_modified_by_type = cls._schema_system_data_read.last_modified_by_type + + +__all__ = ["ListDefault"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/_show.py b/src/attestation/azext_attestation/aaz/latest/attestation/_show.py new file mode 100644 index 00000000000..cc97e625315 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/_show.py @@ -0,0 +1,262 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation show", +) +class Show(AAZCommand): + """Get the status of Attestation Provider. + + :example: AttestationProviders_Get + az attestation show --name "myattestationprovider" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2020-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.attestation/attestationproviders/{}", "2020-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + help="Name of the attestation provider.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AttestationProvidersGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AttestationProvidersGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "providerName", self.ctx.args.provider_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.attest_uri = AAZStrType( + serialized_name="attestUri", + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.trust_model = AAZStrType( + serialized_name="trustModel", + ) + + private_endpoint_connections = cls._schema_on_200.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.private_endpoint_connections.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties.private_endpoint_connections.Element.properties + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_endpoint = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_endpoint + private_endpoint.id = AAZStrType( + flags={"read_only": True}, + ) + + private_link_service_connection_state = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state + private_link_service_connection_state.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state.description = AAZStrType() + private_link_service_connection_state.status = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/_update.py b/src/attestation/azext_attestation/aaz/latest/attestation/_update.py new file mode 100644 index 00000000000..1f5307052c6 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/_update.py @@ -0,0 +1,287 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation update", +) +class Update(AAZCommand): + """Updates the Attestation Provider. + + :example: AttestationProviders_Update + az attestation update --name "myattestationprovider" --resource-group "MyResourceGroup" --tags Property1="Value1" Property2="Value2" Property3="Value3" + """ + + _aaz_info = { + "version": "2020-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.attestation/attestationproviders/{}", "2020-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of the attestation provider.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="The tags that will be assigned to the attestation provider.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AttestationProvidersUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AttestationProvidersUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}", + **self.url_parameters + ) + + @property + def method(self): + return "PATCH" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "providerName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2020-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("tags", AAZDictType, ".tags") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.attest_uri = AAZStrType( + serialized_name="attestUri", + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.status = AAZStrType() + properties.trust_model = AAZStrType( + serialized_name="trustModel", + ) + + private_endpoint_connections = cls._schema_on_200.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.private_endpoint_connections.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties.private_endpoint_connections.Element.properties + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_endpoint = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_endpoint + private_endpoint.id = AAZStrType( + flags={"read_only": True}, + ) + + private_link_service_connection_state = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state + private_link_service_connection_state.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state.description = AAZStrType() + private_link_service_connection_state.status = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/policy/__cmd_group.py b/src/attestation/azext_attestation/aaz/latest/attestation/policy/__cmd_group.py new file mode 100644 index 00000000000..6c72365d655 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/policy/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "attestation policy", +) +class __CMDGroup(AAZCommandGroup): + """Manage policies. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/policy/__init__.py b/src/attestation/azext_attestation/aaz/latest/attestation/policy/__init__.py new file mode 100644 index 00000000000..7dc456082b7 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/policy/__init__.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._reset import * +from ._set import * +from ._show import * diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/policy/_reset.py b/src/attestation/azext_attestation/aaz/latest/attestation/policy/_reset.py new file mode 100644 index 00000000000..fbbbc4c5ec7 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/policy/_reset.py @@ -0,0 +1,191 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation policy reset", +) +class Reset(AAZCommand): + """Resets the attestation policy for the specified tenant and reverts to the default policy. + + :example: Resets the attestation policy for the specified tenant and reverts to the default policy. + az attestation policy reset -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK --policy-jws "eyJhbGciOiJub25lIn0.." + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["data-plane:microsoft.attestation", "/policies/{}:reset", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + arg_group="Client", + help="Name of the attestation provider.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + arg_group="Client", + help="Name of resource group. You can configure the default group using `az configure --defaults group=`", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.attestation_type = AAZStrArg( + options=["--attestation-type"], + help="Type of the attestation.", + required=True, + enum={"OpenEnclave": "OpenEnclave", "SevSnpVm": "SevSnpVm", "SgxEnclave": "SgxEnclave", "Tpm": "Tpm"}, + ) + _args_schema.policy_jws = AAZStrArg( + options=["--policy-jws"], + help="JSON Web Signature with an empty policy document.", + required=True, + default="eyJhbGciOiJub25lIn0..", + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PolicyReset(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PolicyReset(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftAttestationDataPlaneClient_attestation" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/policies/{attestationType}:reset", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "attestationType", self.ctx.args.attestation_type, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args.policy_jws, + typ=AAZStrType, + typ_kwargs={"flags": {"required": True}} + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.token = AAZStrType() + + return cls._schema_on_200 + + +class _ResetHelper: + """Helper class for Reset""" + + +__all__ = ["Reset"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/policy/_set.py b/src/attestation/azext_attestation/aaz/latest/attestation/policy/_set.py new file mode 100644 index 00000000000..34c0ead7a31 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/policy/_set.py @@ -0,0 +1,196 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation policy set", +) +class Set(AAZCommand): + """Sets the policy for a given kind of attestation type. + + :example: Sets the policy for a given kind of attestation type using JWT content. + az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy "{JWT}" --policy-format JWT + + :example: Sets the policy for a given kind of attestation type using Text content. + az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy "{json_text}" + + :example: Sets the policy for a given kind of attestation type using file name. + az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy-file "{file_name}" --policy- format JWT + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["data-plane:microsoft.attestation", "/policies/{}", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + arg_group="Client", + help="Name of the attestation provider.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + arg_group="Client", + help="Name of resource group. You can configure the default group using `az configure --defaults group=`", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.attestation_type = AAZStrArg( + options=["--attestation-type"], + help="Type of the attestation.", + required=True, + enum={"OpenEnclave": "OpenEnclave", "SevSnpVm": "SevSnpVm", "SgxEnclave": "SgxEnclave", "Tpm": "Tpm"}, + ) + _args_schema.new_attestation_policy = AAZStrArg( + options=["--new-attestation-policy"], + help="Content of the new attestation policy (Text or JWT).", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PolicySet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PolicySet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftAttestationDataPlaneClient_attestation" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/policies/{attestationType}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "attestationType", self.ctx.args.attestation_type, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args.new_attestation_policy, + typ=AAZStrType, + typ_kwargs={"flags": {"required": True}} + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.token = AAZStrType() + + return cls._schema_on_200 + + +class _SetHelper: + """Helper class for Set""" + + +__all__ = ["Set"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/policy/_show.py b/src/attestation/azext_attestation/aaz/latest/attestation/policy/_show.py new file mode 100644 index 00000000000..936e12a575f --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/policy/_show.py @@ -0,0 +1,169 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation policy show", +) +class Show(AAZCommand): + """Retrieves the current policy for a given kind of attestation type. + + :example: Retrieves the current policy for a given kind of attestation type. + az attestation policy show -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["data-plane:microsoft.attestation", "/policies/{}", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + arg_group="Client", + help="Name of the attestation provider.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + arg_group="Client", + help="Name of resource group. You can configure the default group using `az configure --defaults group=`", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.attestation_type = AAZStrArg( + options=["--attestation-type"], + help="Type of the attestation.", + required=True, + enum={"OpenEnclave": "OpenEnclave", "SevSnpVm": "SevSnpVm", "SgxEnclave": "SgxEnclave", "Tpm": "Tpm"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PolicyGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PolicyGet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftAttestationDataPlaneClient_attestation" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/policies/{attestationType}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "attestationType", self.ctx.args.attestation_type, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.token = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/signer/__cmd_group.py b/src/attestation/azext_attestation/aaz/latest/attestation/signer/__cmd_group.py new file mode 100644 index 00000000000..7fa6d37cb87 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/signer/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "attestation signer", +) +class __CMDGroup(AAZCommandGroup): + """Manage signers. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/signer/__init__.py b/src/attestation/azext_attestation/aaz/latest/attestation/signer/__init__.py new file mode 100644 index 00000000000..6d65f71f52e --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/signer/__init__.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._add import * +from ._list import * +from ._remove import * diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/signer/_add.py b/src/attestation/azext_attestation/aaz/latest/attestation/signer/_add.py new file mode 100644 index 00000000000..b4a45b03501 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/signer/_add.py @@ -0,0 +1,174 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation signer add", +) +class Add(AAZCommand): + """Adds a new attestation policy certificate to the set of policy management certificates. + + :example: Adds a new attestation policy certificate to the set of policy management certificates. + az attestation signer add -n "myattestationprovider" -g "MyResourceGroup" --signer "eyAiYWxnIjoiUlMyNTYiLCAie..." + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["data-plane:microsoft.attestation", "/certificates:add", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + arg_group="Client", + help="Name of the attestation provider.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + arg_group="Client", + help="Name of resource group. You can configure the default group using `az configure --defaults group=`", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.signer = AAZStrArg( + options=["--signer"], + help="The policy certificate to add. An RFC7519 JSON Web Token containing a claim named \"maa-policyCertificate\" whose value is an RFC7517 JSON Web Key which specifies a new key to update. The RFC7519 JWT must be signed with one of the existing signing certificates.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PolicyCertificatesAdd(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PolicyCertificatesAdd(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftAttestationDataPlaneClient_attestation" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/certificates:add", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args.signer, + typ=AAZStrType, + typ_kwargs={"flags": {"required": True}} + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.token = AAZStrType() + + return cls._schema_on_200 + + +class _AddHelper: + """Helper class for Add""" + + +__all__ = ["Add"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/signer/_list.py b/src/attestation/azext_attestation/aaz/latest/attestation/signer/_list.py new file mode 100644 index 00000000000..eb073461eec --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/signer/_list.py @@ -0,0 +1,149 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation signer list", +) +class List(AAZCommand): + """Retrieves the set of certificates used to express policy for the current tenant. + + :example: Retrieves the set of certificates used to express policy for the current tenant. + az attestation signer list -n "myattestationprovider" -g "MyResourceGroup" + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["data-plane:microsoft.attestation", "/certificates", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + arg_group="Client", + help="Name of the attestation provider.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + arg_group="Client", + help="Name of resource group. You can configure the default group using `az configure --defaults group=`", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PolicyCertificatesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PolicyCertificatesGet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftAttestationDataPlaneClient_attestation" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/certificates", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.token = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/attestation/azext_attestation/aaz/latest/attestation/signer/_remove.py b/src/attestation/azext_attestation/aaz/latest/attestation/signer/_remove.py new file mode 100644 index 00000000000..d061e6fc7e2 --- /dev/null +++ b/src/attestation/azext_attestation/aaz/latest/attestation/signer/_remove.py @@ -0,0 +1,174 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "attestation signer remove", +) +class Remove(AAZCommand): + """Removes the specified policy management certificate. + + :example: Removes the specified policy management certificate. + az attestation signer remove -n "myattestationprovider" -g "MyResourceGroup" --signer "eyAiYWxnIjoiUlMyNTYiLCAie..." + """ + + _aaz_info = { + "version": "2022-08-01", + "resources": [ + ["data-plane:microsoft.attestation", "/certificates:remove", "2022-08-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "Client" + + _args_schema = cls._args_schema + _args_schema.provider_name = AAZStrArg( + options=["--provider-name"], + arg_group="Client", + help="Name of the attestation provider.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + arg_group="Client", + help="Name of resource group. You can configure the default group using `az configure --defaults group=`", + required=True, + ) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.signer = AAZStrArg( + options=["--signer"], + help="The policy certificate to remove. An RFC7519 JSON Web Token containing a claim named \"maa-policyCertificate\" whose value is an RFC7517 JSON Web Key which specifies a new key to update. The RFC7519 JWT must be signed with one of the existing signing certificates.", + required=True, + fmt=AAZStrArgFormat( + pattern="[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PolicyCertificatesRemove(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PolicyCertificatesRemove(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftAttestationDataPlaneClient_attestation" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/certificates:remove", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args.signer, + typ=AAZStrType, + typ_kwargs={"flags": {"required": True}} + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.token = AAZStrType() + + return cls._schema_on_200 + + +class _RemoveHelper: + """Helper class for Remove""" + + +__all__ = ["Remove"] diff --git a/src/attestation/azext_attestation/azext_metadata.json b/src/attestation/azext_attestation/azext_metadata.json index d061f35c0c3..9f7b09a19e1 100644 --- a/src/attestation/azext_attestation/azext_metadata.json +++ b/src/attestation/azext_attestation/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.11.0" + "azext.minCliCoreVersion": "2.55.0" } \ No newline at end of file diff --git a/src/attestation/azext_attestation/commands.py b/src/attestation/azext_attestation/commands.py new file mode 100644 index 00000000000..296e8cfba81 --- /dev/null +++ b/src/attestation/azext_attestation/commands.py @@ -0,0 +1,36 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-statements +# pylint: disable=too-many-locals + +from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): + + with self.command_group('attestation', is_experimental=True): + from azext_attestation.custom import AttestationCreate, AttestationShow, \ + AttestationDelete, AttestationGetDefaultByLocation + self.command_table["attestation create"] = AttestationCreate(loader=self) + self.command_table["attestation show"] = AttestationShow(loader=self) + self.command_table["attestation delete"] = AttestationDelete(loader=self) + self.command_table["attestation get-default-by-location"] = AttestationGetDefaultByLocation(loader=self) + + with self.command_group('attestation signer', is_experimental=True): + from azext_attestation.custom import AddSigner, RemoveSigner, ListSigners + self.command_table["attestation signer add"] = AddSigner(loader=self) + self.command_table["attestation signer remove"] = RemoveSigner(loader=self) + self.command_table["attestation signer list"] = ListSigners(loader=self) + + with self.command_group('attestation policy'): + from azext_attestation.custom import ResetPolicy, SetPolicy, GetPolicy + self.command_table["attestation policy reset"] = ResetPolicy(loader=self) + self.command_table["attestation policy set"] = SetPolicy(loader=self) + self.command_table["attestation policy show"] = GetPolicy(loader=self) diff --git a/src/attestation/azext_attestation/custom.py b/src/attestation/azext_attestation/custom.py index dbe9d5f9742..2a3fd931552 100644 --- a/src/attestation/azext_attestation/custom.py +++ b/src/attestation/azext_attestation/custom.py @@ -7,11 +7,496 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -# pylint: disable=wildcard-import -# pylint: disable=unused-wildcard-import - -from .generated.custom import * # noqa: F403 -try: - from .manual.custom import * # noqa: F403 -except ImportError: - pass +# pylint: disable=too-many-lines + +import base64 +import jwt +import os + +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives.asymmetric import rsa +from cryptography.hazmat.primitives.serialization import Encoding +from cryptography.x509 import load_pem_x509_certificate + +from azext_attestation.aaz.latest.attestation import Create as _AttestationCreate, Delete as _AttestationDelete,\ + Show as _AttestationShow, GetDefaultByLocation as _AttestationGetDefaultByLocation +from azext_attestation.aaz.latest.attestation.policy import Reset as _ResetPolicy, Set as _SetPolicy, Show as _GetPolicy +from azext_attestation.aaz.latest.attestation.signer import Add as _AddSigner, Remove as _RemoveSigner,\ + List as _ListSigners +from azure.cli.core.aaz import has_value +from azure.cli.core.azclierror import ArgumentUsageError + + +class AttestationShow(_AttestationShow): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation service instance.", + ) + + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + validate_provider_resource_id(self) + + +def _b64url_to_b64(s): + return s.replace('-', '+').replace('_', '/') + ('=' * (4 - len(s) % 4) if len(s) % 4 else '') + + +def _b64_to_b64url(s): + return s.rstrip('=').replace('+', '-').replace('/', '_') + + +def _b64_padding(s): + return s + ('=' * (4 - len(s) % 4) if len(s) % 4 else '') + + +class AttestationCreate(_AttestationCreate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg, AAZListArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation provider.", + ) + args_schema.certs_input_path = AAZListArg( + options=["--certs-input-path"], + help="Space-separated file paths to PEM/DER files containing certificates.", + ) + args_schema.certs_input_path.Element = AAZStrArg() + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.certs._registered = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + validate_provider_resource_id(self) + certs = [] + if not has_value(args.certs_input_path): + certs_input_path = [] + else: + certs_input_path = args.certs_input_path.to_serialized_data() + + for p in certs_input_path: + expand_path = os.path.expanduser(p) + if not os.path.exists(expand_path): + raise ArgumentUsageError('Path "{}" does not exist.'.format(expand_path)) + if not os.path.isfile(expand_path): + raise ArgumentUsageError('"{}" is not a valid file path.'.format(expand_path)) + + with open(expand_path, 'rb') as f: + pem_data = f.read() + + cert = load_pem_x509_certificate(pem_data, backend=default_backend()) + key = cert.public_key() + if isinstance(key, rsa.RSAPublicKey): + kty = 'RSA' + alg = 'RS256' + else: + raise ArgumentUsageError('Unsupported key type: {}'.format(type(key))) + + jwk = {'kty': kty, 'alg': alg, 'use': 'sig', + 'x5c': [base64.b64encode(cert.public_bytes(Encoding.DER)).decode('ascii')]} + certs.append(jwk) + args.certs = certs + + +class AttestationDelete(_AttestationDelete): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation service instance.", + ) + + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + validate_provider_resource_id(self) + + +class AddSigner(_AddSigner): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.signer_file = AAZStrArg( + options=["--signer-file", "-f"], + help="File name of the signer. (--signer and --signer-file/-f are mutually exclusive.).", + ) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation provider.", + ) + + args_schema.signer._required = False + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + validate_provider_resource_id(self) + if not has_value(args.signer) and not has_value(args.signer_file): + raise ArgumentUsageError('Please specify one of parameters: --signer or --signer-file/-f') + if has_value(args.signer) and has_value(args.signer_file): + raise ArgumentUsageError('--signer and --signer-file/-f are mutually exclusive.') + signer = None + if has_value(args.signer_file): + signer_file = os.path.expanduser(args.signer_file.to_serialized_data()) + if not os.path.exists(signer_file): + raise ArgumentUsageError('Signer file "{}" does not exist.'.format(signer_file)) + if not os.path.isfile(signer_file): + raise ArgumentUsageError('Signer file "{}" is not a valid file name.'.format(signer_file)) + with open(signer_file) as f: + signer = f.read() + + if signer: + if type(signer) == bytes: + args.signer = str(signer, encoding="utf-8") + else: + args.signer = signer + + def _output(self, *args, **kwargs): + token = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)['token'] + result = {'Jwt': token} + if has_value(token): + header = jwt.get_unverified_header(token) + result.update({ + 'Algorithm': header.get('alg', ''), + 'JKU': header.get('jku', '') + }) + body = jwt.decode(token, algorithms=['RS256'], options={"verify_signature": False}) + result['Certificates'] = body.get('aas-policyCertificates', {}).get('keys', []) + result['CertificateCount'] = len(result['Certificates']) + return result + + +class RemoveSigner(_RemoveSigner): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.signer_file = AAZStrArg( + options=["--signer-file", "-f"], + help="File name of the signer. (--signer and --signer-file/-f are mutually exclusive.).", + ) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation provider.", + ) + + args_schema.signer._required = False + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + validate_provider_resource_id(self) + if not has_value(args.signer) and not has_value(args.signer_file): + raise ArgumentUsageError('Please specify one of parameters: --signer or --signer-file/-f') + if has_value(args.signer) and has_value(args.signer_file): + raise ArgumentUsageError('--signer and --signer-file/-f are mutually exclusive.') + signer = None + if has_value(args.signer_file): + signer_file = os.path.expanduser(args.signer_file.to_serialized_data()) + if not os.path.exists(signer_file): + raise ArgumentUsageError('Signer file "{}" does not exist.'.format(signer_file)) + if not os.path.isfile(signer_file): + raise ArgumentUsageError('Signer file "{}" is not a valid file name.'.format(signer_file)) + with open(signer_file) as f: + signer = f.read() + + if signer: + if type(signer) == bytes: + args.signer = str(signer, encoding="utf-8") + else: + args.signer = signer + + def _output(self, *args, **kwargs): + args = self.ctx.args + list_args = {"resource_group": args.resource_group, "provider_name": args.provider_name} + from azext_attestation.aaz.latest.attestation.signer import List + token = List(cli_ctx=self.cli_ctx)(command_args=list_args)['token'] + result = {'Jwt': token} + if has_value(token): + header = jwt.get_unverified_header(token) + result.update({ + 'Algorithm': header.get('alg', ''), + 'JKU': header.get('jku', '') + }) + body = jwt.decode(token, algorithms=['RS256'], options={"verify_signature": False}) + result['Certificates'] = body.get('x-ms-policy-certificates', {}).get('keys', []) + result['CertificateCount'] = len(result['Certificates']) + + return result + + +class ListSigners(_ListSigners): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation provider.", + ) + + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + validate_provider_resource_id(self) + + def _output(self, *args, **kwargs): + token = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)['token'] + result = {'Jwt': token} + + if has_value(token): + header = jwt.get_unverified_header(token) + result.update({ + 'Algorithm': header.get('alg', ''), + 'JKU': header.get('jku', '') + }) + body = jwt.decode(token, algorithms=['RS256'], options={"verify_signature": False}) + result['Certificates'] = body.get('x-ms-policy-certificates', {}).get('keys', []) + result['CertificateCount'] = len(result['Certificates']) + + return result + + +class GetPolicy(_GetPolicy): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation provider.", + ) + + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + validate_provider_resource_id(self) + + def _output(self, *args, **kwargs): + token = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)['token'] + return handle_policy_output(token) + + +def handle_policy_output(token): + result = {} + + if has_value(token): + policy = jwt.decode(token, algorithms=['RS256'], options={"verify_signature": False}).get('x-ms-policy', '') + result['Jwt'] = policy + result['JwtLength'] = len(policy) + result['Algorithm'] = None + + if has_value(policy): + try: + decoded_policy = jwt.decode(policy, algorithms=['RS256'], options={"verify_signature": False}) + decoded_policy = decoded_policy.get('AttestationPolicy', '') + try: + new_decoded_policy = base64.b64decode(_b64url_to_b64(decoded_policy)).decode('ascii') + decoded_policy = new_decoded_policy + except: # pylint: disable=bare-except + pass + finally: + result['Text'] = decoded_policy + result['TextLength'] = len(decoded_policy) + result['Algorithm'] = jwt.get_unverified_header(policy).get('alg', None) + except: # pylint: disable=bare-except + result['Text'] = '' + result['TextLength'] = 0 + return result + + +class SetPolicy(_SetPolicy): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.new_attestation_policy_file = AAZStrArg( + options=["--new-attestation-policy-file", "-f"], + help="File name of the new attestation policy.", + ) + args_schema.policy_format = AAZStrArg( + options=["--policy-format"], + default="Text", + help="Specifies the format for the policy, either Text or JWT (JSON Web Token). Allowed values: JWT, Text.", + ) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation provider.", + ) + + args_schema.new_attestation_policy._required = False + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + validate_provider_resource_id(self) + + if has_value(args.new_attestation_policy_file) and has_value(args.new_attestation_policy): + raise ArgumentUsageError('Please specify just one of --new-attestation-policy and --new-attestation-policy-file/-f') + + if not has_value(args.new_attestation_policy_file) and not has_value(args.new_attestation_policy): + raise ArgumentUsageError('Please specify --new-attestation-policy or --new-attestation-policy-file/-f') + + new_attestation_policy = None + if has_value(args.new_attestation_policy_file): + file_path = os.path.expanduser(args.new_attestation_policy_file.to_serialized_data()) + if not os.path.exists(file_path): + raise ArgumentUsageError('Policy file "{}" does not exist.'.format(file_path)) + + if not os.path.isfile(file_path): + raise ArgumentUsageError('"{}" is not a valid file name.'.format(file_path)) + + with open(file_path) as f: + new_attestation_policy = f.read() + + show_args = {"resource_group": args.resource_group, "provider_name": args.provider_name} + from azext_attestation.aaz.latest.attestation import Show + provider = Show(cli_ctx=self.cli_ctx)(command_args=show_args) + + if args.policy_format == 'Text': + if provider['trustModel'] != 'AAD': + raise ArgumentUsageError('Only supports Text policy under AAD model. Current model: {}. ' + 'If you are using signed JWT policy, please specify --policy-format JWT'. + format(provider.trust_model)) + + try: + new_attestation_policy = \ + base64.urlsafe_b64encode(new_attestation_policy.encode('ascii')).decode('ascii').strip('=') + new_attestation_policy = {'AttestationPolicy': new_attestation_policy} + new_attestation_policy = jwt.encode( + new_attestation_policy, key='', algorithm='none' + ) + except TypeError as e: + print(e) + raise ArgumentUsageError('Failed to encode text content, are you using JWT? If yes, please use --policy-format JWT') + + if new_attestation_policy: + if type(new_attestation_policy) == bytes: + args.new_attestation_policy = str(new_attestation_policy, encoding="utf-8") + else: + args.new_attestation_policy = new_attestation_policy + + def _output(self, *args, **kwargs): + args = self.ctx.args + show_args = {"resource_group": args.resource_group, "name": args.name, "attestation_type": args.attestation_type} + return GetPolicy(cli_ctx=self.cli_ctx)(command_args=show_args) + + +def validate_provider_resource_id(self): + args = self.ctx.args + if has_value(args.id): + if has_value(args.resource_group) or has_value(args.name): + raise ArgumentUsageError('Please omit --resource-group/-g or --name/-n if you have already specified --id.') + resource_id = args.id.to_serialized_data() + from azure.mgmt.core.tools import parse_resource_id + parts = parse_resource_id(resource_id) + args.resource_group = parts['resource_group'] + args.provider_name = parts['resource_name'] + elif not all([has_value(args.resource_group), has_value(args.name)]): + raise ArgumentUsageError('Please specify both --resource-group/-g and --name/-n.') + + if has_value(args.name): + args.provider_name = args.name + + +class ResetPolicy(_ResetPolicy): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.id = AAZStrArg( + options=["--id"], + help="Resource ID of the provider. Please omit --resource-group/-g or --name/-n if you have already specified --id.", + ) + args_schema.name = AAZStrArg( + options=["--name", "-n"], + help="Name of the attestation provider.", + ) + + args_schema.provider_name._required = False + args_schema.resource_group._required = False + args_schema.policy_jws._required = False + args_schema.provider_name._registered = False + return args_schema + + def pre_operations(self): + validate_provider_resource_id(self) + + def _output(self, *args, **kwargs): + args = self.ctx.args + show_args = {"resource_group": args.resource_group, "name": args.name, "attestation_type": args.attestation_type} + return GetPolicy(cli_ctx=self.cli_ctx)(command_args=show_args) + + +class AttestationGetDefaultByLocation(_AttestationGetDefaultByLocation): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.location._fmt = None + return args_schema diff --git a/src/attestation/azext_attestation/generated/__init__.py b/src/attestation/azext_attestation/generated/__init__.py deleted file mode 100644 index c9cfdc73e77..00000000000 --- a/src/attestation/azext_attestation/generated/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/attestation/azext_attestation/generated/_client_factory.py b/src/attestation/azext_attestation/generated/_client_factory.py deleted file mode 100644 index b72ddde9d94..00000000000 --- a/src/attestation/azext_attestation/generated/_client_factory.py +++ /dev/null @@ -1,20 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - - -def cf_attestation_cl(cli_ctx, *_): - from azure.cli.core.commands.client_factory import get_mgmt_service_client - from ..vendored_sdks.azure_mgmt_attestation import AttestationManagementClient - return get_mgmt_service_client(cli_ctx, - AttestationManagementClient) - - -def cf_attestation_provider(cli_ctx, *_): - return cf_attestation_cl(cli_ctx).attestation_provider diff --git a/src/attestation/azext_attestation/generated/_params.py b/src/attestation/azext_attestation/generated/_params.py deleted file mode 100644 index 16b9aa4ee88..00000000000 --- a/src/attestation/azext_attestation/generated/_params.py +++ /dev/null @@ -1,52 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=too-many-lines -# pylint: disable=too-many-statements - -from azure.cli.core.commands.parameters import ( - tags_type, - resource_group_name_type, - get_location_type -) -from azure.cli.core.commands.validators import get_default_location_from_resource_group -from azext_attestation.action import AddPolicySigningCertificatesKeys - - -def load_arguments(self, _): - - with self.argument_context('attestation attestation-provider list') as c: - c.argument('resource_group_name', resource_group_name_type) - - with self.argument_context('attestation attestation-provider show') as c: - c.argument('resource_group_name', resource_group_name_type) - c.argument('provider_name', type=str, help='Name of the attestation service instance', id_part='name') - - with self.argument_context('attestation attestation-provider create') as c: - c.argument('resource_group_name', resource_group_name_type) - c.argument('provider_name', type=str, help='Name of the attestation service instance.') - c.argument('location', arg_type=get_location_type(self.cli_ctx), - validator=get_default_location_from_resource_group) - c.argument('tags', tags_type) - c.argument('policy_signing_certificates_keys', action=AddPolicySigningCertificatesKeys, nargs='*', help='The ' - 'value of the "keys" parameter is an array of JWK values. By default, the order of the JWK values ' - 'within the array does not imply an order of preference among them, although applications of JWK ' - 'Sets can choose to assign a meaning to the order for their purposes, if desired.') - - with self.argument_context('attestation attestation-provider update') as c: - c.argument('resource_group_name', resource_group_name_type) - c.argument('provider_name', type=str, help='Name of the attestation service instance.', id_part='name') - c.argument('tags', tags_type) - - with self.argument_context('attestation attestation-provider delete') as c: - c.argument('resource_group_name', resource_group_name_type) - c.argument('provider_name', type=str, help='Name of the attestation service', id_part='name') - - with self.argument_context('attestation attestation-provider get-default-by-location') as c: - c.argument('location', arg_type=get_location_type(self.cli_ctx), id_part='name') diff --git a/src/attestation/azext_attestation/generated/action.py b/src/attestation/azext_attestation/generated/action.py deleted file mode 100644 index 1350e2df833..00000000000 --- a/src/attestation/azext_attestation/generated/action.py +++ /dev/null @@ -1,68 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=protected-access - -import argparse -from collections import defaultdict -from knack.util import CLIError - - -class AddPolicySigningCertificatesKeys(argparse._AppendAction): - def __call__(self, parser, namespace, values, option_string=None): - action = self.get_action(values, option_string) - super(AddPolicySigningCertificatesKeys, self).__call__(parser, namespace, action, option_string) - - def get_action(self, values, option_string): # pylint: disable=no-self-use - try: - properties = defaultdict(list) - for (k, v) in (x.split('=', 1) for x in values): - properties[k].append(v) - properties = dict(properties) - except ValueError: - raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) - d = {} - for k in properties: - kl = k.lower() - v = properties[k] - if kl == 'alg': - d['alg'] = v[0] - elif kl == 'crv': - d['crv'] = v[0] - elif kl == 'd': - d['d'] = v[0] - elif kl == 'dp': - d['dp'] = v[0] - elif kl == 'dq': - d['dq'] = v[0] - elif kl == 'e': - d['e'] = v[0] - elif kl == 'k': - d['k'] = v[0] - elif kl == 'kid': - d['kid'] = v[0] - elif kl == 'kty': - d['kty'] = v[0] - elif kl == 'n': - d['n'] = v[0] - elif kl == 'p': - d['p'] = v[0] - elif kl == 'q': - d['q'] = v[0] - elif kl == 'qi': - d['qi'] = v[0] - elif kl == 'use': - d['use'] = v[0] - elif kl == 'x': - d['x'] = v[0] - elif kl == 'x5-c': - d['x5_c'] = v - elif kl == 'y': - d['y'] = v[0] - return d diff --git a/src/attestation/azext_attestation/generated/commands.py b/src/attestation/azext_attestation/generated/commands.py deleted file mode 100644 index 861ff23ba66..00000000000 --- a/src/attestation/azext_attestation/generated/commands.py +++ /dev/null @@ -1,31 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=too-many-statements -# pylint: disable=too-many-locals - -from azure.cli.core.commands import CliCommandType - - -def load_command_table(self, _): - - from azext_attestation.generated._client_factory import cf_attestation_provider - attestation_attestation_provider = CliCommandType( - operations_tmpl='azext_attestation.vendored_sdks.attestation.operations._attestation_provider_operations#Attest' - 'ationProviderOperations.{}', - client_factory=cf_attestation_provider) - with self.command_group('attestation', attestation_attestation_provider, - client_factory=cf_attestation_provider, is_experimental=True) as g: - g.custom_command('list', 'attestation_attestation_provider_list') - g.custom_show_command('show', 'attestation_attestation_provider_show') - g.custom_command('create', 'attestation_attestation_provider_create') - g.custom_command('update', 'attestation_attestation_provider_update') - g.custom_command('delete', 'attestation_attestation_provider_delete', confirmation=True) - g.custom_command('get-default-by-location', 'attestation_attestation_provider_get_default_by_location') - g.custom_command('list-default', 'attestation_attestation_provider_list_default') diff --git a/src/attestation/azext_attestation/generated/custom.py b/src/attestation/azext_attestation/generated/custom.py deleted file mode 100644 index dce881ce1de..00000000000 --- a/src/attestation/azext_attestation/generated/custom.py +++ /dev/null @@ -1,62 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=too-many-lines - - -def attestation_attestation_provider_list(client, - resource_group_name=None): - if resource_group_name: - return client.list_by_resource_group(resource_group_name=resource_group_name) - return client.list() - - -def attestation_attestation_provider_show(client, - resource_group_name, - provider_name): - return client.get(resource_group_name=resource_group_name, - provider_name=provider_name) - - -def attestation_attestation_provider_create(client, - resource_group_name, - provider_name, - location, - tags=None, - policy_signing_certificates_keys=None): - return client.create(resource_group_name=resource_group_name, - provider_name=provider_name, - location=location, - tags=tags, - keys=policy_signing_certificates_keys) - - -def attestation_attestation_provider_update(client, - resource_group_name, - provider_name, - tags=None): - return client.update(resource_group_name=resource_group_name, - provider_name=provider_name, - tags=tags) - - -def attestation_attestation_provider_delete(client, - resource_group_name, - provider_name): - return client.delete(resource_group_name=resource_group_name, - provider_name=provider_name) - - -def attestation_attestation_provider_get_default_by_location(client, - location): - return client.get_default_by_location(location=location) - - -def attestation_attestation_provider_list_default(client): - return client.list_default() diff --git a/src/attestation/azext_attestation/manual/__init__.py b/src/attestation/azext_attestation/manual/__init__.py deleted file mode 100644 index c9cfdc73e77..00000000000 --- a/src/attestation/azext_attestation/manual/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/attestation/azext_attestation/manual/_client_factory.py b/src/attestation/azext_attestation/manual/_client_factory.py deleted file mode 100644 index 62e0f98cb9d..00000000000 --- a/src/attestation/azext_attestation/manual/_client_factory.py +++ /dev/null @@ -1,31 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - - -def cf_attestation_data(cli_ctx, *_): - from ..vendored_sdks.azure_attestation import AttestationClient - from azure.cli.core._profile import Profile - - profile = Profile(cli_ctx=cli_ctx) - cred, _, _ = profile.get_login_credentials( - resource="https://attest.azure.net") - return AttestationClient(credentials=cred) - - -def cf_policy_certificates(cli_ctx, *_): - return cf_attestation_data(cli_ctx).policy_certificates - - -def cf_policy(cli_ctx, *_): - return cf_attestation_data(cli_ctx).policy - - -def cf_attest(cli_ctx, *_): - return cf_attestation_data(cli_ctx).attest diff --git a/src/attestation/azext_attestation/manual/_help.py b/src/attestation/azext_attestation/manual/_help.py deleted file mode 100644 index ff64d822a08..00000000000 --- a/src/attestation/azext_attestation/manual/_help.py +++ /dev/null @@ -1,150 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=too-many-lines - -from knack.help_files import helps - - -helps['attestation'] = """ - type: group - short-summary: Manage Microsoft Azure Attestation (MAA). -""" - -helps['attestation list'] = """ - type: command - examples: - - name: AttestationProviders_ListByResourceGroup - text: |- - az attestation list --resource-group "testrg1" - - name: AttestationProviders_List - text: |- - az attestation list -""" - -helps['attestation show'] = """ - type: command - short-summary: "Get the status of Attestation Provider." - examples: - - name: AttestationProviders_Get - text: |- - az attestation show --name "myattestationprovider" --resource-group "MyResourceGroup" -""" - -helps['attestation create'] = """ - type: command - examples: - - name: AttestationProviders_Create - text: |- - az attestation create --name "myattestationprovider" --resource-group "MyResourceGroup" -l westus -""" - -helps['attestation update'] = """ - type: command - examples: - - name: AttestationProviders_Update - text: |- - az attestation update --name "myattestationprovider" --resource-group "MyResourceGroup" \\ - --tags Property1="Value1" Property2="Value2" Property3="Value3" -""" - -helps['attestation delete'] = """ - type: command - examples: - - name: AttestationProviders_Delete - text: |- - az attestation delete --name "myattestationprovider" --resource-group "sample-resource-group" -""" - -helps['attestation get-default-by-location'] = """ - type: command - examples: - - name: AttestationProviders_GetDefaultWithLocation - text: |- - az attestation get-default-by-location --location "Central US" -""" - -helps['attestation list-default'] = """ - type: command - examples: - - name: AttestationProviders_GetDefault - text: |- - az attestation list-default -""" - -helps['attestation signer'] = """ - type: group - short-summary: Manage signers. -""" - -helps['attestation policy'] = """ - type: group - short-summary: Manage policies. -""" - -helps['attestation signer add'] = """ - type: command - examples: - - name: Adds a new attestation policy certificate to the set of policy management certificates. - text: |- - az attestation signer add -n "myattestationprovider" -g "MyResourceGroup" \\ - --signer "eyAiYWxnIjoiUlMyNTYiLCAie..." -""" - -helps['attestation signer remove'] = """ - type: command - examples: - - name: Removes the specified policy management certificate. - text: |- - az attestation signer remove -n "myattestationprovider" -g "MyResourceGroup" \\ - --signer "eyAiYWxnIjoiUlMyNTYiLCAie..." -""" - -helps['attestation signer list'] = """ - type: command - examples: - - name: Retrieves the set of certificates used to express policy for the current tenant. - text: |- - az attestation signer list -n "myattestationprovider" -g "MyResourceGroup" -""" - -helps['attestation policy show'] = """ - type: command - examples: - - name: Retrieves the current policy for a given kind of attestation type. - text: |- - az attestation policy show -n "myattestationprovider" -g "MyResourceGroup" \\ - --attestation-type SGX-OpenEnclaveSDK -""" - -helps['attestation policy set'] = """ - type: command - examples: - - name: Sets the policy for a given kind of attestation type using JWT content. - text: |- - az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" \\ - --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy "{JWT}" --policy-format JWT - - name: Sets the policy for a given kind of attestation type using Text content. - text: |- - az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" \\ - --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy "{json_text}" - - name: Sets the policy for a given kind of attestation type using file name. - text: |- - az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" \\ - --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy-file "{file_name}" --policy-format JWT -""" - -helps['attestation policy reset'] = """ - type: command - examples: - - name: Resets the attestation policy for the specified tenant and reverts to the default policy. - text: |- - az attestation policy reset -n "myattestationprovider" -g "MyResourceGroup" \\ - --attestation-type SGX-OpenEnclaveSDK --policy-jws "eyJhbGciOiJub25lIn0.." -""" diff --git a/src/attestation/azext_attestation/manual/_params.py b/src/attestation/azext_attestation/manual/_params.py deleted file mode 100644 index d3db297ded5..00000000000 --- a/src/attestation/azext_attestation/manual/_params.py +++ /dev/null @@ -1,78 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=too-many-lines -# pylint: disable=too-many-statements - -from knack.arguments import CLIArgumentType - -from azure.cli.core.commands.parameters import \ - tags_type, resource_group_name_type, get_resource_name_completion_list, get_enum_type - - -def load_arguments(self, _): - from azext_attestation.vendored_sdks.azure_attestation.models._attestation_client_enums import TeeKind - - provider_name_type = CLIArgumentType( - help='Name of the attestation provider.', options_list=['--name', '-n'], metavar='NAME', id_part=None, - completer=get_resource_name_completion_list('Microsoft.Attestation/attestationProviders')) - - for item in ['create', 'show', 'update', 'delete']: - with self.argument_context('attestation {}'.format(item)) as c: - c.argument('provider_name', provider_name_type, - help='Name of the attestation service instance.') - - for item in ['show', 'delete']: - with self.argument_context('attestation {}'.format(item)) as c: - c.extra('identifier', options_list=['--id'], - help='Resource ID of the provider. Please omit --resource-group/-g or --name/-n ' - 'if you have already specified --id.') - - for item in ['create', 'update']: - with self.argument_context('attestation {}'.format(item)) as c: - c.argument('tags', tags_type, nargs='+') - - with self.argument_context('attestation create') as c: - c.argument('certs_input_path', nargs='+', - help='Space-separated file paths to PEM/DER files containing certificates.') - - with self.argument_context('attestation get-default-by-location') as c: - c.argument('loc', options_list=['--location', '-l'], help='Location. (eg: "West US")') - - for item in ['list', 'add', 'remove']: - with self.argument_context('attestation signer {}'.format(item)) as c: - c.extra('resource_group_name', resource_group_name_type, required=False) - c.extra('provider_name', provider_name_type, required=False) - c.extra('identifier', options_list=['--id'], - help='Resource ID of the provider. Please omit --resource-group/-g or --name/-n ' - 'if you have already specified --id.') - if item in ['add', 'remove']: - c.ignore('tenant_base_url') - c.argument('signer', - help='The policy certificate to {}. An RFC7519 JSON Web Token containing a claim named ' - '"maa-policyCertificate" whose value is an RFC7517 JSON Web Key which specifies a ' - 'new key to update. The RFC7519 JWT must be signed with one of the existing signing ' - 'certificates'.format(item)) - c.argument('signer_file', options_list=['--signer-file', '-f'], - help='File name of the signer. (--signer and --signer-file/-f are mutually exclusive.)') - - for item in ['show', 'set', 'reset']: - with self.argument_context('attestation policy {}'.format(item)) as c: - c.argument('attestation_type', arg_type=get_enum_type(TeeKind), help='Type of the attestation.') - c.argument('provider_name', provider_name_type, required=False) - c.extra('identifier', options_list=['--id'], - help='Resource ID of the provider. Please omit --resource-group/-g or --name/-n ' - 'if you have already specified --id.') - - if item in ['set']: - c.argument('policy_format', arg_type=get_enum_type(['Text', 'JWT']), default='Text', - help='Specifies the format for the policy, either Text or JWT (JSON Web Token).') - c.argument('new_attestation_policy', help='Content of the new attestation policy (Text or JWT).') - c.argument('new_attestation_policy_file', options_list=['--new-attestation-policy-file', '-f'], - help='File name of the new attestation policy.') diff --git a/src/attestation/azext_attestation/manual/_validators.py b/src/attestation/azext_attestation/manual/_validators.py deleted file mode 100644 index 3105da7c3bc..00000000000 --- a/src/attestation/azext_attestation/manual/_validators.py +++ /dev/null @@ -1,26 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from knack.cli import CLIError - - -def validate_provider_resource_id(ns): - resource_id = getattr(ns, 'identifier', None) - if resource_id: - if ns.resource_group_name or ns.provider_name: - raise CLIError('Please omit --resource-group/-g or --name/-n if you have already specified --id.') - - ns.resource_group_name = resource_id.split('/')[4] - ns.provider_name = resource_id.split('/')[8] - - if not all([ns.resource_group_name, ns.provider_name]): - raise CLIError('Please specify both --resource-group/-g and --name/-n.') - - del ns.identifier diff --git a/src/attestation/azext_attestation/manual/commands.py b/src/attestation/azext_attestation/manual/commands.py deleted file mode 100644 index c85f2ff7dce..00000000000 --- a/src/attestation/azext_attestation/manual/commands.py +++ /dev/null @@ -1,77 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=too-many-statements -# pylint: disable=too-many-locals - -from azext_attestation.manual._validators import validate_provider_resource_id - -from azure.cli.core.commands import CliCommandType - - -def load_command_table(self, _): - - from azext_attestation.generated._client_factory import cf_attestation_provider - from azext_attestation.manual._client_factory import cf_policy_certificates, cf_policy - - attestation_attestation_provider = CliCommandType( - operations_tmpl='azext_attestation.vendored_sdks.attestation.operations._attestation_provider_operations#Attest' - 'ationProviderOperations.{}', - client_factory=cf_attestation_provider) - - attestation_provider_doc_template = 'azext_attestation.vendored_sdks.azure_mgmt_attestation.operations.' \ - '_attestation_provider_operations#AttestationProviderOperations.{}' - - policy_certificates_data_tmpl = 'azext_attestation.vendored_sdks.azure_attestation.operations.' \ - '_policy_certificates_operations#PolicyCertificatesOperations.{}' - policy_certificates_data_sdk = CliCommandType( - operations_tmpl=policy_certificates_data_tmpl, - client_factory=cf_policy_certificates) - - policy_data_tmpl = 'azext_attestation.vendored_sdks.azure_attestation.operations.' \ - '_policy_operations#PolicyOperations.{}' - policy_data_sdk = CliCommandType( - operations_tmpl=policy_data_tmpl, - client_factory=cf_policy) - - with self.command_group('attestation', attestation_attestation_provider, - client_factory=cf_attestation_provider, is_experimental=True) as g: - g.custom_command('list', 'attestation_attestation_provider_list', - doc_string_source=attestation_provider_doc_template.format('list')) - g.custom_show_command('show', 'attestation_attestation_provider_show', validator=validate_provider_resource_id, - doc_string_source=attestation_provider_doc_template.format('get')) - g.custom_command('create', 'attestation_attestation_provider_create', - doc_string_source=attestation_provider_doc_template.format('create')) - g.custom_command('update', 'attestation_attestation_provider_update', - doc_string_source=attestation_provider_doc_template.format('update')) - g.custom_command('delete', 'attestation_attestation_provider_delete', confirmation=True, - validator=validate_provider_resource_id, - doc_string_source=attestation_provider_doc_template.format('delete')) - g.custom_command('get-default-by-location', 'attestation_attestation_provider_get_default_by_location', - doc_string_source=attestation_provider_doc_template.format('get_default_by_location')) - g.custom_command('list-default', 'attestation_attestation_provider_list_default', - doc_string_source=attestation_provider_doc_template.format('list_default')) - - with self.command_group('attestation signer', policy_certificates_data_sdk, client_factory=cf_policy_certificates, - is_experimental=True) as g: - g.custom_command('add', 'add_signer', validator=validate_provider_resource_id, - doc_string_source=policy_certificates_data_tmpl.format('add')) - g.custom_command('remove', 'remove_signer', validator=validate_provider_resource_id, - doc_string_source=policy_certificates_data_tmpl.format('remove')) - g.custom_command('list', 'list_signers', validator=validate_provider_resource_id, - doc_string_source=policy_certificates_data_tmpl.format('get')) - - with self.command_group('attestation policy', policy_data_sdk, client_factory=cf_policy, - is_experimental=True) as g: - g.custom_command('set', 'set_policy', validator=validate_provider_resource_id, - doc_string_source=policy_data_tmpl.format('set')) - g.custom_command('reset', 'reset_policy', validator=validate_provider_resource_id, - doc_string_source=policy_data_tmpl.format('reset')) - g.custom_show_command('show', 'get_policy', validator=validate_provider_resource_id, - doc_string_source=policy_data_tmpl.format('get')) diff --git a/src/attestation/azext_attestation/manual/custom.py b/src/attestation/azext_attestation/manual/custom.py deleted file mode 100644 index 048215213ab..00000000000 --- a/src/attestation/azext_attestation/manual/custom.py +++ /dev/null @@ -1,307 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=too-many-lines - -import base64 -import json -import jwt -import os - -from cryptography.hazmat.backends import default_backend -from cryptography.hazmat.primitives.asymmetric import ec -from cryptography.hazmat.primitives.asymmetric import rsa -from cryptography.hazmat.primitives.serialization import Encoding -from cryptography.x509 import load_pem_x509_certificate -from knack.cli import CLIError - -from azext_attestation.generated._client_factory import cf_attestation_provider -from azext_attestation.vendored_sdks.azure_attestation.models._attestation_client_enums import TeeKind -from azext_attestation.vendored_sdks.azure_attestation.models._models_py3 import \ - AttestOpenEnclaveRequest, RuntimeData, InitTimeData -from azext_attestation.vendored_sdks.azure_mgmt_attestation.models import JsonWebKey - - -tee_mapping = { - TeeKind.tpm: 'TPM', - TeeKind.sgx_intel_sdk: 'SgxEnclave', - TeeKind.sgx_open_enclave_sdk: 'OpenEnclave' -} - - -def attestation_attestation_provider_show(client, - resource_group_name=None, - provider_name=None): - """ Show the status of Attestation Provider. """ - return client.get(resource_group_name=resource_group_name, - provider_name=provider_name) - - -def _b64url_to_b64(s): - return s.replace('-', '+').replace('_', '/') + ('=' * (4 - len(s) % 4) if len(s) % 4 else '') - - -def _b64_to_b64url(s): - return s.rstrip('=').replace('+', '-').replace('/', '_') - - -def _b64_padding(s): - return s + ('=' * (4 - len(s) % 4) if len(s) % 4 else '') - - -def attestation_attestation_provider_create(client, - resource_group_name, - provider_name, - location, - tags=None, - certs_input_path=None): - - certs = [] - if not certs_input_path: - certs_input_path = [] - - for p in certs_input_path: - expand_path = os.path.expanduser(p) - if not os.path.exists(expand_path): - raise CLIError('Path "{}" does not exist.'.format(expand_path)) - if not os.path.isfile(expand_path): - raise CLIError('"{}" is not a valid file path.'.format(expand_path)) - - with open(expand_path, 'rb') as f: - pem_data = f.read() - - cert = load_pem_x509_certificate(pem_data, backend=default_backend()) - key = cert.public_key() - if isinstance(key, rsa.RSAPublicKey): - kty = 'RSA' - alg = 'RS256' - else: - raise CLIError('Unsupported key type: {}'.format(type(key))) - - jwk = JsonWebKey(kty=kty, alg=alg, use='sig') - jwk.x5c = [base64.b64encode(cert.public_bytes(Encoding.DER)).decode('ascii')] - certs.append(jwk) - - return client.create(resource_group_name=resource_group_name, - provider_name=provider_name, - location=location, - tags=tags, - certs=certs) - - -def attestation_attestation_provider_delete(client, - resource_group_name=None, - provider_name=None): - return client.delete(resource_group_name=resource_group_name, - provider_name=provider_name) - - -def add_signer(cmd, client, signer=None, signer_file=None, resource_group_name=None, provider_name=None): - if not signer and not signer_file: - raise CLIError('Please specify one of parameters: --signer or --signer-file/-f') - - if signer and signer_file: - raise CLIError('--signer and --signer-file/-f are mutually exclusive.') - - if signer_file: - signer_file = os.path.expanduser(signer_file) - if not os.path.exists(signer_file): - raise CLIError('Signer file "{}" does not exist.'.format(signer_file)) - if not os.path.isfile(signer_file): - raise CLIError('Signer file "{}" is not a valid file name.'.format(signer_file)) - with open(signer_file) as f: - signer = f.read() - - provider_client = cf_attestation_provider(cmd.cli_ctx) - provider = provider_client.get(resource_group_name=resource_group_name, provider_name=provider_name) - token = client.add(tenant_base_url=provider.attest_uri, policy_certificate_to_add=signer) - result = {'Jwt': token} - - if token: - header = jwt.get_unverified_header(token) - result.update({ - 'Algorithm': header.get('alg', ''), - 'JKU': header.get('jku', '') - }) - body = jwt.decode(token, algorithms=['RS256'], options={"verify_signature": False}) - result['Certificates'] = body.get('aas-policyCertificates', {}).get('keys', []) - result['CertificateCount'] = len(result['Certificates']) - - return result - - -def remove_signer(cmd, client, signer=None, signer_file=None, resource_group_name=None, provider_name=None): - if not signer and not signer_file: - raise CLIError('Please specify one of parameters: --signer or --signer-file/-f') - - if signer and signer_file: - raise CLIError('--signer and --signer-file/-f are mutually exclusive.') - - if signer_file: - signer_file = os.path.expanduser(signer_file) - if not os.path.exists(signer_file): - raise CLIError('Signer file "{}" does not exist.'.format(signer_file)) - if not os.path.isfile(signer_file): - raise CLIError('Signer file "{}" is not a valid file name.'.format(signer_file)) - with open(signer_file) as f: - signer = f.read() - - provider_client = cf_attestation_provider(cmd.cli_ctx) - provider = provider_client.get(resource_group_name=resource_group_name, provider_name=provider_name) - client.remove(tenant_base_url=provider.attest_uri, policy_certificate_to_remove=signer) - return list_signers(cmd, client, resource_group_name, provider_name) - - -def list_signers(cmd, client, resource_group_name=None, provider_name=None): - provider_client = cf_attestation_provider(cmd.cli_ctx) - provider = provider_client.get(resource_group_name=resource_group_name, provider_name=provider_name) - signers = client.get(tenant_base_url=provider.attest_uri) - token = json.loads(signers.replace('\'', '"')).get('token') - result = {'Jwt': token} - - if token: - header = jwt.get_unverified_header(token) - result.update({ - 'Algorithm': header.get('alg', ''), - 'JKU': header.get('jku', '') - }) - body = jwt.decode(token, algorithms=['RS256'], options={"verify_signature": False}) - result['Certificates'] = body.get('x-ms-policy-certificates', {}).get('keys', []) - result['CertificateCount'] = len(result['Certificates']) - - return result - - -def get_policy(cmd, client, attestation_type, resource_group_name=None, provider_name=None): - """ Retrieves the current policy for a given kind of attestation type. """ - - provider_client = cf_attestation_provider(cmd.cli_ctx) - provider = provider_client.get(resource_group_name=resource_group_name, provider_name=provider_name) - token = client.get(tenant_base_url=provider.attest_uri, tee=tee_mapping[attestation_type]).token - result = {} - - if token: - import jwt - policy = jwt.decode(token, algorithms=['RS256'], options={"verify_signature": False}).get('x-ms-policy', '') - result['Jwt'] = policy - result['JwtLength'] = len(policy) - result['Algorithm'] = None - - if policy: - try: - decoded_policy = jwt.decode(policy, algorithms=['RS256'], options={"verify_signature": False}) - decoded_policy = decoded_policy.get('AttestationPolicy', '') - try: - new_decoded_policy = base64.b64decode(_b64url_to_b64(decoded_policy)).decode('ascii') - decoded_policy = new_decoded_policy - except: # pylint: disable=bare-except - pass - finally: - result['Text'] = decoded_policy - result['TextLength'] = len(decoded_policy) - result['Algorithm'] = jwt.get_unverified_header(policy).get('alg', None) - except: # pylint: disable=bare-except - result['Text'] = '' - result['TextLength'] = 0 - - return result - - -def set_policy(cmd, client, attestation_type, new_attestation_policy=None, new_attestation_policy_file=None, - policy_format='Text', resource_group_name=None, - provider_name=None): - - if new_attestation_policy_file and new_attestation_policy: - raise CLIError('Please specify just one of --new-attestation-policy and --new-attestation-policy-file/-f') - - if not new_attestation_policy_file and not new_attestation_policy: - raise CLIError('Please specify --new-attestation-policy or --new-attestation-policy-file/-f') - - if new_attestation_policy_file: - file_path = os.path.expanduser(new_attestation_policy_file) - if not os.path.exists(file_path): - raise CLIError('Policy file "{}" does not exist.'.format(file_path)) - - if not os.path.isfile(file_path): - raise CLIError('"{}" is not a valid file name.'.format(file_path)) - - with open(file_path) as f: - new_attestation_policy = f.read() - - provider_client = cf_attestation_provider(cmd.cli_ctx) - provider = provider_client.get(resource_group_name=resource_group_name, provider_name=provider_name) - - if policy_format == 'Text': - if provider.trust_model != 'AAD': - raise CLIError('Only supports Text policy under AAD model. Current model: {}. ' - 'If you are using signed JWT policy, please specify --policy-format JWT'. - format(provider.trust_model)) - - import jwt - try: - new_attestation_policy = \ - base64.urlsafe_b64encode(new_attestation_policy.encode('ascii')).decode('ascii').strip('=') - new_attestation_policy = {'AttestationPolicy': new_attestation_policy} - new_attestation_policy = jwt.encode( - new_attestation_policy, key='', algorithm='none' - ) - except TypeError as e: - print(e) - raise CLIError('Failed to encode text content, are you using JWT? If yes, please use --policy-format JWT') - - client.set( - tenant_base_url=provider.attest_uri, - tee=tee_mapping[attestation_type], - new_attestation_policy=new_attestation_policy - ) - return get_policy(cmd, client, attestation_type, - resource_group_name=resource_group_name, provider_name=provider_name) - - -def reset_policy(cmd, client, attestation_type, policy_jws='eyJhbGciOiJub25lIn0..', resource_group_name=None, - provider_name=None): - - provider_client = cf_attestation_provider(cmd.cli_ctx) - provider = provider_client.get(resource_group_name=resource_group_name, provider_name=provider_name) - client.reset( - tenant_base_url=provider.attest_uri, - tee=tee_mapping[attestation_type], - policy_jws=policy_jws - ) - return get_policy(cmd, client, attestation_type, - resource_group_name=resource_group_name, provider_name=provider_name) - - -def attest_open_enclave(cmd, client, report=None, runtime_data=None, runtime_data_type=None, init_time_data=None, - init_time_data_type=None, resource_group_name=None, provider_name=None): - - provider_client = cf_attestation_provider(cmd.cli_ctx) - provider = provider_client.get(resource_group_name=resource_group_name, provider_name=provider_name) - - request = AttestOpenEnclaveRequest( - report=report, - runtime_data=RuntimeData( - data=runtime_data, - data_type=runtime_data_type - ), - init_time_data=InitTimeData( - data=init_time_data, - data_type=init_time_data_type - ) - ) - - return client.attest_open_enclave( - tenant_base_url=provider.attest_uri, - request=request - ) - - -def attestation_attestation_provider_get_default_by_location(client, - loc): - return client.get_default_by_location(location=loc) diff --git a/src/attestation/azext_attestation/tests/latest/cert_group_1/init_cert.pem b/src/attestation/azext_attestation/tests/latest/cert_group_1/init_cert.pem index f24b91ca652..45bee234ea8 100644 --- a/src/attestation/azext_attestation/tests/latest/cert_group_1/init_cert.pem +++ b/src/attestation/azext_attestation/tests/latest/cert_group_1/init_cert.pem @@ -1,3 +1,3 @@ -----BEGIN CERTIFICATE----- -MIIDLDCCAhSgAwIBAgIIZSansCWcKTMwDQYJKoZIhvcNAQELBQAwFzEVMBMGA1UEAwwMTWFhVGVzdENlcnQxMCAXDTIwMDQyNTAwMDAwMFoYDzIwNzAwNDI1MDAwMDAwWjAXMRUwEwYDVQQDDAxNYWFUZXN0Q2VydDEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCclUDpbgT373/FeFBKIpe1h/y4u36gOMI2NpVUKzUgi+uZySN6u199YDHKpaUTdMb77zLwBFrfulxHz7iY2LAVNj9GMdezHlgkd82i2t7dfwxdlo1e9klaaBe+LFV/WHL2k7RRxnfDU6bKk+ydYf8DKREGrdG6o2jEmBAPqDD3i+34CUV9rNy6mnULb5f1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69VSZfG9qoKz4TPOQvhKLC4WmEWUygStHfxT6dHZqGd74bsSY5H+VJlQYkzY/8lSWbkV0eMru23GUj1fECEU/+SUERphRdT/3CaIxXkT3NrSxn81LqdjtQwUaUeUX3IVzLuHNWzBjxI/kKaaeQBFWlK5QjZdV+AFIy+aINz6+nU27Tl+nx0l9Rku+/iJb+qa4Tn+ndjQIDAQABo4GDMIGAME4GA1UdIwRHMEWAFBY7+c0gwUUFE8aSiRGnoproh1j4oSOkITAfMR0wGwYDVQQDDBRNYWFPcmlnaW5hbFRlc3RDZXJ0MYIIQDwUUGwcWKswHQYDVR0OBBYEFBY7+c0gwUUFE8aSiRGnoproh1j4MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACxDiFT6b3+Vf7xdVcFZTORe5hUIa2zI+nj35bQH5B8OMNZdTuq3QRPxv1omEqREHqDqiMLBlNdKZkkyGaHzOVki1XR8GMxW16pkHtJTKDIWc/pgO+FUNNZ92y/uL7a1cHLOElxksedGPF1JefY48NdhQUubPIP2BuBwOUiGCYZytmS3JG8yrVrHUpxCwhoali7mB1eHYGyARDQi2T4UO1LLEqLt5yLCRxlYugfPsgpGYEnEmfrLS6eEydIyXkxioGjO77gDABblyeOq6gYnfTgqm96mpo0LL48aPx9rfew5dgYIU6WgKpOqg/uYMw0kvwBMSI8XpgydJIYxM5v5wtQ= -----END CERTIFICATE----- \ No newline at end of file diff --git a/src/attestation/azext_attestation/tests/latest/cert_group_1/new_signer_jwt.txt b/src/attestation/azext_attestation/tests/latest/cert_group_1/new_signer_jwt.txt index 983ed7b3d03..43b74e48332 100644 --- a/src/attestation/azext_attestation/tests/latest/cert_group_1/new_signer_jwt.txt +++ b/src/attestation/azext_attestation/tests/latest/cert_group_1/new_signer_jwt.txt @@ -1 +1 @@ -eyAiYWxnIjoiUlMyNTYiLCAieDVjIjogWyJNSUlETERDQ0FoU2dBd0lCQWdJSVpTYW5zQ1djS1RNd0RRWUpLb1pJaHZjTkFRR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.UiHsv_Dsn8HCHaDn3qNk1plQOZjFc3a8TUK9ZW6lJGwSZy3R69ls-RG1JZco6A3AA3Ale9NE5YIW9AkujpV8o3dGjhSLQLpYpO5pl-uriKMAs1d9nVWQ2p3t87d8diivy1A-tlS-Pn_BcuBWn5hh-dUhFnGM0jWUqeSXHUvIaQDGLZSLpdIpoZVtTtNTFZMkMb6XUwbzUzWBUXhFGO5bjA375kV0P_fWKJ0mvjn-t9VLhwHlCXEw86jqkfLGgvLA5eO4PYWleKNqonMhI7zu0-s53n3DO9S4c78pYwHOAsMNMImJHlRKRJcN46IXVxKfbgySuxov937BuTdWcTKIxg \ No newline at end of file diff --git a/src/attestation/azext_attestation/tests/latest/cert_group_2/init_cert.pem b/src/attestation/azext_attestation/tests/latest/cert_group_2/init_cert.pem index 11473f8870b..c80a13d072a 100644 --- a/src/attestation/azext_attestation/tests/latest/cert_group_2/init_cert.pem +++ b/src/attestation/azext_attestation/tests/latest/cert_group_2/init_cert.pem @@ -1,3 +1,3 @@ -----BEGIN CERTIFICATE----- -MIIC1jCCAb6gAwIBAgIISQGD9EFjB+YwDQYJKoZIhvcNAQELBQAwIjEgMB4GA1UEAxMXQXR0ZXN0YXRpb25DZXJ0aWZpY2F0ZTAwHhcNMjAxMTIzMTgyMDUzWhcNMjExMTIzMTgyMDUzWjAiMSAwHgYDVQQDExdBdHRlc3RhdGlvbkNlcnRpZmljYXRlMDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJrEeMJZ7PM5UBEm8hiCKDhzaP6clXvHfwDHQry/ut/yG1An0bw1U6nSoPEmcar0G5Zf1MDxjVNtAyB6IY8J/8ZAGxxQgUVlwWGVkEzZFXBUA7i7Pt5DVA4V6+BgjxSe0BYZFbhNqNstxkiCrn60U60AE5X+A53Rof1TRCrMsKl4PT4Pyp3QKMUYCioFSwzNAPiO/O/+HqbH1zkSKZQxznnVPeraAr1sMZJmDyrQO/PYLLpr1qqIF6Jbln6Dzr3pnn1y4Z/NO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lFjpkdDB5nEgUMuK25bzbSpLVoSOkITAfMR0wGwYDVQQDDBRNYWFPcmlnaW5hbFRlc3RDZXJ0MYIIJcdZv4O76ywwHQYDVR0OBBYEFFFlFjpkdDB5nEgUMuK25bzbSpLVMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABCUBWBQIg5jc5d3F/EJeP8pq2LwvcFDD753TbGKx7TsaHHgphACnKOCSpREiftsiR5Oic487MYwfFUWB0pgCFc6iWzUV5sRtSHDo4NuA5psgnDcYBnh6TuVfpGArXvHON0K4QbO56fN4xfmfDC4dohuH5OaCwiKK5K1Qb+s5gqo1bwvOMn4cA5A0KtPsdyG2skhVV4o6sF9ChytlVhtC5zDO5Fy0YKBwYtPXzcAL9FauAxLNTFq4Cuye44h2FwfQRON7qkYzxPOMaCU8GMUB8Jf+9AkucwmvF50L40yZCFx9hqAoTcSMo5e2rc7yOyo+TetRpyAqkQ9bFCAdVEf2aU= -----END CERTIFICATE----- \ No newline at end of file diff --git a/src/attestation/azext_attestation/tests/latest/policies/signed_jwt_sgx_policy_2.txt b/src/attestation/azext_attestation/tests/latest/policies/signed_jwt_sgx_policy_2.txt index 79c69bb80a3..5799a4a4828 100644 --- a/src/attestation/azext_attestation/tests/latest/policies/signed_jwt_sgx_policy_2.txt +++ b/src/attestation/azext_attestation/tests/latest/policies/signed_jwt_sgx_policy_2.txt @@ -1 +1 @@ -eyJhbGciOiJSU0EyNTYiLCJ4NWMiOlsiTUlJQzFqQ0NBYjZnQXdJQkFnSUlTUUdEOUVGakJcdTAwMkJZd0RRWUpLb1pJaHZjTkFRRUxCUUF3SWpFZ01CNEdBMVVFQXhNWFFYUjBaWE4wWVhScGIyNURaWEowYVdacFkyRjBaVEF3SGhjTk1qQXhNVEl6TVRneU1EVXpXaGNOTWpFeE1USXpNVGd5TURVeldqQWlNU0F3SGdZRFZRUURFeGRCZEhSbGMzUmhkR2x2YmtObGNuUnBabWxqWVhSbE1EQ0NBU0l3RFFZ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e3fEOs9-D_zonHgcKqvyRRp2qw5R8hKaFxeTg311yi_L7xIWehGeOZofBckmweUPNs7LC6mo55e9lnyOhw \ No newline at end of file diff --git a/src/attestation/azext_attestation/tests/latest/recordings/test_attestation.yaml b/src/attestation/azext_attestation/tests/latest/recordings/test_attestation.yaml index b1461ac9618..a7e017843b8 100644 --- a/src/attestation/azext_attestation/tests/latest/recordings/test_attestation.yaml +++ b/src/attestation/azext_attestation/tests/latest/recordings/test_attestation.yaml @@ -18,26 +18,25 @@ interactions: ParameterSetName: - -l -n --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider?api-version=2020-10-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att0000002?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider","name":"testattestationprovider","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://testattestationprovider.wus.attest.azure.net"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att0000002","name":"att0000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att0000002.wus.attest.azure.net"}}' headers: cache-control: - no-cache content-length: - - '389' + - '350' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jul 2022 03:14:40 GMT + - Fri, 08 Dec 2023 07:32:11 GMT expires: - '-1' location: - - https://testattestationprovider.wus.attest.azure.net/ + - https://att0000002.wus.attest.azure.net/ pragma: - no-cache server: @@ -47,7 +46,7 @@ interactions: x-content-type-options: - nosniff x-ms-maa-service-version: - - 1.11.01987.157 + - 1.11.02509.1778 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -67,22 +66,21 @@ interactions: ParameterSetName: - -n --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider?api-version=2020-10-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att0000002?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider","name":"testattestationprovider","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://testattestationprovider.wus.attest.azure.net"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att0000002","name":"att0000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att0000002.wus.attest.azure.net"}}' headers: cache-control: - no-cache content-length: - - '389' + - '350' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jul 2022 03:14:41 GMT + - Fri, 08 Dec 2023 07:32:12 GMT expires: - '-1' pragma: @@ -91,10 +89,14 @@ interactions: - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-maa-service-version: - - 1.11.01987.157 + - 1.11.02509.1778 status: code: 200 message: OK @@ -112,22 +114,21 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders?api-version=2020-10-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider","name":"testattestationprovider","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://testattestationprovider.wus.attest.azure.net"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att0000002","name":"att0000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att0000002.wus.attest.azure.net"}}]}' headers: cache-control: - no-cache content-length: - - '401' + - '362' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jul 2022 03:14:42 GMT + - Fri, 08 Dec 2023 07:32:15 GMT expires: - '-1' pragma: @@ -143,7 +144,7 @@ interactions: x-content-type-options: - nosniff x-ms-maa-service-version: - - 1.11.01987.157 + - 1.11.02509.1778 status: code: 200 message: OK @@ -159,22 +160,21 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Attestation/attestationProviders?api-version=2020-10-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ethan-rg/providers/Microsoft.Attestation/attestationProviders/ethanat","name":"ethanat","type":"Microsoft.Attestation/attestationProviders","location":"eastus2","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://ethanat.eus2.attest.azure.net"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider","name":"testattestationprovider","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://testattestationprovider.wus.attest.azure.net"}}]}' + string: '{"value":[]}' headers: cache-control: - no-cache content-length: - - '740' + - '12' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jul 2022 03:14:44 GMT + - Fri, 08 Dec 2023 07:32:15 GMT expires: - '-1' pragma: @@ -185,9 +185,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-original-request-ids: - - 00-7e6df6d5ec1eb84c8562014580ebdda9-19ae9c2a4a4b0442-01 - - 00-7e6df6d5ec1eb84c8562014580ebdda9-ab4c7d9f9c562b49-01 status: code: 200 message: OK @@ -209,22 +206,21 @@ interactions: ParameterSetName: - -n --resource-group --tags User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider?api-version=2020-10-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att0000002?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider","name":"testattestationprovider","type":"Microsoft.Attestation/attestationProviders","location":"westus","tags":{"Property1":"Value1","Property2":"Value2","Property3":"Value3"},"properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://testattestationprovider.wus.attest.azure.net"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att0000002","name":"att0000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","tags":{"Property1":"Value1","Property2":"Value2","Property3":"Value3"},"properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att0000002.wus.attest.azure.net"}}' headers: cache-control: - no-cache content-length: - - '461' + - '422' content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jul 2022 03:14:50 GMT + - Fri, 08 Dec 2023 07:32:19 GMT expires: - '-1' pragma: @@ -240,59 +236,12 @@ interactions: x-content-type-options: - nosniff x-ms-maa-service-version: - - 1.11.01987.157 + - 1.11.02509.1778 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y -n --resource-group - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/testattestationprovider?api-version=2020-10-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 07 Jul 2022 03:15:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK - request: body: null headers: @@ -307,8 +256,7 @@ interactions: ParameterSetName: - -l User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Attestation/locations/West%20US/defaultProvider?api-version=2020-10-01 response: @@ -323,192 +271,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 07 Jul 2022 03:15:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: '{"location": "westus", "properties": {"policySigningCertificates": {"keys": - [{"alg": "RS256", "kty": "RSA", "use": "sig", "x5c": ["MIIDLDCCAhSgAwIBAgIIZSansCWcKTMwDQYJKoZIhvcNAQELBQAwFzEVMBMGA1UEAwwMTWFhVGVzdENlcnQxMCAXDTIwMDQyNTAwMDAwMFoYDzIwNzAwNDI1MDAwMDAwWjAXMRUwEwYDVQQDDAxNYWFUZXN0Q2VydDEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCclUDpbgT373/FeFBKIpe1h/y4u36gOMI2NpVUKzUgi+uZySN6u199YDHKpaUTdMb77zLwBFrfulxHz7iY2LAVNj9GMdezHlgkd82i2t7dfwxdlo1e9klaaBe+LFV/WHL2k7RRxnfDU6bKk+ydYf8DKREGrdG6o2jEmBAPqDD3i+34CUV9rNy6mnULb5f1Cfr4xDYLGTL3rKECiMvHP2VYgm0gxJfuyCGYZbDfIemq07BiLbkxvn18mjGGs4yBCFKffk0oXkQG1OnDzrYWNlem5mfPNCcTj9ETc0jlB7ogLqVV5Lq9oioC5Kq+GxKil1JNuRt+fLDe1meiWZ+eu897AgMBAAGjejB4MEYGA1UdIwQ/MD2AFEhDF0Zt1jrSjCFCVvZpnXY7ovN1oRukGTAXMRUwEwYDVQQDDAxNYWFUZXN0Q2VydDGCCGUmp7AlnCkzMB0GA1UdDgQWBBRIQxdGbdY60owhQlb2aZ12O6LzdTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA90rXJV8ZjGqdlqeYxEwE0hxCatpZcN2rGcRC/URtRnJBQbWpB+79dzZHXO+UIF7zhVUww3eQyQuah0aC6s6tBUKjgFjkK9ZL6Sc/4qpyb6RE1HgjRCcegmU+80CdcqxgoqXTUyFWyqmAlsHXzW3xijrN1H9zdt7ptsbCXO4pb0Njqz54zsKMQL84ZTM9fXjkt7aZpKnhl5NP311SCMUO4kzmqim331RpWvuxZnt1f1kl4QeLh/YAF7+OEKNaFgyxOXF2DNvMFDYEWEw5F9vDk0VesUErOga3vFlIY9yfE8hF79qntsMYQncJAFIA5RZffLTn9HlYmZtJeOZlCGyzi"]}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation create - Connection: - - keep-alive - Content-Length: - - '1226' - Content-Type: - - application/json - ParameterSetName: - - -l -n -g --certs-input-path - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '355' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:07 GMT - expires: - - '-1' - location: - - https://att1000002.wus.attest.azure.net/ - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation signer list - Connection: - - keep-alive - ParameterSetName: - - -n -g - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '355' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: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97GV-KV9l9Y1X2ncRUp2eG6dvgRTPaeKvzkQ7fCSccTmLCFZZ6BCBqvjs4UhW3QJCHo4QtSIjOjExLvHtPsAuVRzQu9s_0JZugrZo-ZPHAXUey232qFLQOmarN6vJuG2ga06MMShjcOszslpVuk0cqqy4IRwWMJ8pWw"}' - headers: - content-length: - - '2254' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:13 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy show - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '355' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:13 GMT + - Fri, 08 Dec 2023 07:32:20 GMT expires: - '-1' pragma: @@ -524,40 +287,7 @@ interactions: x-content-type-options: - nosniff x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://att1000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MXFoNzRvcm5oamx4NC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczMTYsImlhdCI6MTY1NzE2MzcxNiwiaXNzIjoiaHR0cHM6Ly9hdHQxcWg3NG9ybmhqbHg0Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzE2LCJ4LW1zLXBvbGljeSI6ImV5SmhiR2NpT2lKdWIyNWxJbjAuZXlKQmRIUmxjM1JoZEdsdmJsQnZiR2xqZVNJNkltUnRWbmxqTW14Mlltb3daMDFUTkhkUE1rWXhaRWRvZG1OdGJEWlpXRkp3WWpJMWVXUlhlR3hqTTNNNVVHbENkMXBZU25SaFdGRnZTMVIwT1U4eWJIcGpNMVpvWW0xT2JHTnVWbk5hV0U0M1dYcHdZbVJJYkhkYVZEQTVTVzVuZEdKWVRYUmpNbVEwVEZkc2VreFhVbXhaYmxadVdqSkdhV0pIVldsWVUwRTVVR2xDY0dNelRqRmFVMmd3WlZoQ2JGQlRTbkJqZVRGcldsZEtNVm95WkdoWmJYaHNTV2wzWjJSdFJuTmtWMVU1V1hrMU1sbFhlREZhVTJzM1dYcHdZbVJJYkhkYVZEQTVTVzVuZEdKWVRYUmpNbVEwVEZjeGVXTXliRzVpYlZaNVNXd3daMUJVTkdkaFdFNTZaRmRWYjJSSWJIZGFWREJwWXpKa05FeFhNWGxqTW14dVltMVdlVWxwZDJka2JVWnpaRmRWT1ZsNU5USlpWM2d4V2xOck4xbDZjR0prU0d4M1dsUXdPVWx1WjNSaVdFMTBZekprTkV4WE1YbGFWelZxWWtkR01scFRTbVJKUkRBdFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVRtNWxRekYwWTIxV2RWa3llR2hrYlZWcFRFTkNNbGxYZURGYVZERnFURzVhYUdKSVZteExWSFJxVDJ4ME1HVllRbXhRVkRCcFpVTXhkR041TVhwYU0yZDBZMGhLZGxwSVZtcGtRekZ3V2tOS1pFbEVNQzFKUjJ4Nll6TldiRXRJVWpWalIxVTVTVzVDZVdJeVVqRlpNMUYwWVZkUmFVeERRakpaVjNneFdsUXhha3h1V21oaVNGWnNTMVIwYWs5c2REQmxXRUpzVUZRd2FXVkRNWFJqZVRGNldqTm5kR016V25WSmJEQm5VRlEwWjJGWVRucGtWMVZ2WkVoc2QxcFVNR2xqTTFwMVNXbDNaMlJ0Um5Oa1YxVTVXWGsxTWxsWGVERmFVMnMzV1hwd1ltUkliSGRhVkRBNVNXNW5kR0pZVFhSWldGSXdXbGhPTUZsWVVuQmlNalIwWkVoc2QxcFRTbVJKUkRBdFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVVteGFVMGx6U1VoYWFHSklWbXhRVjAxMVpHMUdjMlJYVlhCUE16QTNJbjAuIn0.Otyu5prwjLuiWF72klMDmvGyV3u1D8CGXKo0w9kRFYOM3-6BOxpxEMdUsxNNxPzcXYUBBP-I7EHenhgIHnksNaRpFddn7LbDAxOvernGpILnBt95CrUxToAqdXkl0_agzs65YtrEoi0wIp3LtafHnrmsr6_EHB8wSLmi4l4d2SyhNiH9MtNdnpjcgQBpILghOSdP2-BTxpO9vGcPj1R4MdN7KH5dZHWxOO-_DjaqdzVzo0COuwYOTHIL449FVyOBcqCNjGd4LLncF0SShhwnzB1F0-md-OKVVZBDEwM5nYumWSeU_8pO9N0h5N6QxuRHHpXniM47eSlsmDw0Rjrgjg"}' - headers: - content-length: - - '1966' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:15 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 + - 1.11.02509.1778 status: code: 200 message: OK @@ -565,1440 +295,21 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - attestation policy set + - attestation delete Connection: - keep-alive + Content-Length: + - '0' ParameterSetName: - - -n -g --attestation-type -f --policy-format - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '355' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: '"eyAiYWxnIjoiUlMyNTYiLCAieDVjIjogWyJNSUlETERDQ0FoU2dBd0lCQWdJSVpTYW5zQ1djS1RNd0RRWUpLb1pJaHZjTkFRRUxCUUF3RnpFVk1CTUdBMVVFQXd3TVRXRmhWR1Z6ZEVObGNuUXhNQ0FYRFRJd01EUXlOVEF3TURBd01Gb1lEekl3TnpBd05ESTFNREF3TURBd1dqQVhNUlV3RXdZRFZRUUREQXhOWVdGVVpYTjBRMlZ5ZERFd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUNjbFVEcGJnVDM3My9GZUZCS0lwZTFoL3k0dTM2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FZlc1VFck9nYTN2RmxJWTl5ZkU4aEY3OXFudHNNWVFuY0pBRklBNVJaZmZMVG45SGxZbVp0SmVPWmxDR3l6aSJdfQ.eyJBdHRlc3RhdGlvblBvbGljeSI6InsgXCIkdmVyc2lvblwiOiAxLCAgICAgICAgICAgICAgICAgICAgIFwiJGNsYWltc1wiOiBbICAgICAgICAgICAgICAgICAgICAgICAgIFwiaXMtZGVidWdnYWJsZVwiLCAgICAgICAgICAgICAgICAgICAgICAgICBcInNneC1tcnNpZ25lclwiLCAgICAgICAgICAgICAgICAgICAgICAgICBcInNneC1tcmVuY2xhdmVcIiwgICAgICAgICAgICAgICAgICAgICAgICAgXCJwcm9kdWN0LWlkXCIsICAgICAgICAgICAgICAgICAgICAgICAgIFwic3ZuXCIsICAgICAgICAgICAgICAgICAgICAgICAgIFwidGVlXCIsICAgICAgICAgICAgICAgICAgICAgICAgIFwiTWluaW1hbFN2blwiLCAgICAgICAgICAgICAgICAgICAgICAgICBcIlByb2RJZENoZWNrXCIsICAgICAgICAgICAgICAgICAgICAgICAgIFwiSW50ZWxFbmNsYXZlXCIsICAgICAgICAgICAgICAgICAgICAgICAgIFwiTm90RGVidWdnYWJsZVwiLCAgICAgICAgICAgICAgICAgICAgICAgICBcIlNxbFNlcnZlclNpZ25lclwiICAgICAgICAgICAgICAgICAgICAgXSwgICAgICAgICAgICAgICAgICAgICBcIk1pbmltYWxTdm5cIiA6IHtcInllc1wiOntcIiRtaW4tc3ZuXCI6IDAsIFwiJG1hbmRhdG9yeVwiOnRydWUsIFwiJHZpc2libGVcIjpmYWxzZX19LCAgICAgICAgICAgICAgICAgICAgIFwiUHJvZElkQ2hlY2tcIiA6IHtcInllc1wiOntcIiRwcm9kdWN0LWlkXCI6IDQ2MzksIFwiJG1hbmRhdG9yeVwiOnRydWUsIFwiJHZpc2libGVcIjpmYWxzZX19LCAgICAgICAgICAgICAgICAgICAgIFwiSW50ZWxFbmNsYXZlXCI6IHtcInllc1wiOiB7XCIkdGVl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Ayt22WIyi1vwOqDYkNNMUHT_uykZX7c7JEJJrRrv-rPgdOJK051R87BZMIv--GYKpiluP-utaa790X6A77zAsgifLRbwBR84VvVlSYTpCjctDH87U_N01t7CS0Ccf1Fz9ifN5b4Cl-TlS6xqknGt-R7PRjeuQnh97jehsNHZQx7npJV3ArkuYRjuRLIzbXZ7JbUKrPh_0CQH0g"' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '3899' - Content-Type: - - text/plain - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://att1000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"error":{"code":"PolicyParsingError","message":"Attestation Enclave - operation failed with 65526: Policy document must be Base64Url encoded. { - \"$version\": 1, \"$claims\": [ \"is-debuggable\", \"sgx-mrsigner\", \"sgx-mrenclave\", \"product-id\", \"svn\", \"tee\", \"MinimalSvn\", \"ProdIdCheck\", \"IntelEnclave\", \"NotDebuggable\", \"SqlServerSigner\" ], \"MinimalSvn\" - : {\"yes\":{\"$min-svn\": 0, \"$mandatory\":true, \"$visible\":false}}, \"ProdIdCheck\" - : {\"yes\":{\"$product-id\": 4639, \"$mandatory\":true, \"$visible\":false}}, \"IntelEnclave\": - {\"yes\": {\"$tee\":\"sgx\", \"$mandatory\":true, \"$visible\":false}}, \"NotDebuggable\": - {\"yes\":{\"$is-debuggable\":false, \"$mandatory\":true, \"$visible\":false}}, \"SqlServerSigner\":{\"yes\":{\"$sgx-mrsigner\": - \"856823123027010ED0CE1F7D515B6BE1D7505E5828FBA19785676030D8FFFC28\", \"$mandatory\":true, - \"$visible\":false}}, \"$allow-debuggable\": true, \"is-debuggable\": - \"$is-debuggable\", \"sgx-mrsigner\": \"$sgx-mrsigner\", \"sgx-mrenclave\": - \"$sgx-mrenclave\", \"product-id\": \"$product-id\", \"svn\": - \"$svn\", \"tee\": \"$tee\" } does not - appear to be base64url encoded: 0xfff6: ''Invalid policy was specified;\r\nRETURN_IF_ERROR(''ParseAttestationPolicyJws(clientApiVersion, - attestationPolicy, parsedPolicy, policySigner)'') failed with 0xfff6: ''Invalid - policy was specified''\r\nRETURN_IF_ERROR(''this->SetAttestationPolicyInternalNoLock( - (clientApiVersion ? clientApiVersion : std::string()), teeKind, PolicyKind::Effective, - *newPolicyJwt)'') failed with 0xfff6: ''Invalid policy was specified''\r\nRETURN_IF_ERROR(''pEnclave->SetCurrentPolicy(clientApiVersion, - teeKind, *suppliedClaims, &jwtBuffer, returnedBuffer)'') failed with 0xfff6: - ''Invalid policy was specified''\r\n","innererror":{"code":"PolicyParsingError","message":"Attestation - Enclave operation failed with 65526: Policy document must be Base64Url encoded. - { \"$version\": 1, \"$claims\": [ \"is-debuggable\", \"sgx-mrsigner\", \"sgx-mrenclave\", \"product-id\", \"svn\", \"tee\", \"MinimalSvn\", \"ProdIdCheck\", \"IntelEnclave\", \"NotDebuggable\", \"SqlServerSigner\" ], \"MinimalSvn\" - : {\"yes\":{\"$min-svn\": 0, \"$mandatory\":true, \"$visible\":false}}, \"ProdIdCheck\" - : {\"yes\":{\"$product-id\": 4639, \"$mandatory\":true, \"$visible\":false}}, \"IntelEnclave\": - {\"yes\": {\"$tee\":\"sgx\", \"$mandatory\":true, \"$visible\":false}}, \"NotDebuggable\": - {\"yes\":{\"$is-debuggable\":false, \"$mandatory\":true, \"$visible\":false}}, \"SqlServerSigner\":{\"yes\":{\"$sgx-mrsigner\": - \"856823123027010ED0CE1F7D515B6BE1D7505E5828FBA19785676030D8FFFC28\", \"$mandatory\":true, - \"$visible\":false}}, \"$allow-debuggable\": true, \"is-debuggable\": - \"$is-debuggable\", \"sgx-mrsigner\": \"$sgx-mrsigner\", \"sgx-mrenclave\": - \"$sgx-mrenclave\", \"product-id\": \"$product-id\", \"svn\": - \"$svn\", \"tee\": \"$tee\" } does not - appear to be base64url encoded: 0xfff6: ''Invalid policy was specified;\r\nRETURN_IF_ERROR(''ParseAttestationPolicyJws(clientApiVersion, - attestationPolicy, parsedPolicy, policySigner)'') failed with 0xfff6: ''Invalid - policy was specified''\r\nRETURN_IF_ERROR(''this->SetAttestationPolicyInternalNoLock( - (clientApiVersion ? clientApiVersion : std::string()), teeKind, PolicyKind::Effective, - *newPolicyJwt)'') failed with 0xfff6: ''Invalid policy was specified''\r\nRETURN_IF_ERROR(''pEnclave->SetCurrentPolicy(clientApiVersion, - teeKind, *suppliedClaims, &jwtBuffer, returnedBuffer)'') failed with 0xfff6: - ''Invalid policy was specified''\r\n"}}}' - headers: - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:19 GMT - server: - - Kestrel - transfer-encoding: - - chunked - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 400 - message: Bad Request -- request: - body: '{"location": "westus", "properties": {"policySigningCertificates": {"keys": - [{"alg": "RS256", "kty": "RSA", "use": "sig", "x5c": ["MIIC1jCCAb6gAwIBAgIISQGD9EFjB+YwDQYJKoZIhvcNAQELBQAwIjEgMB4GA1UEAxMXQXR0ZXN0YXRpb25DZXJ0aWZpY2F0ZTAwHhcNMjAxMTIzMTgyMDUzWhcNMjExMTIzMTgyMDUzWjAiMSAwHgYDVQQDExdBdHRlc3RhdGlvbkNlcnRpZmljYXRlMDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJrEeMJZ7PM5UBEm8hiCKDhzaP6clXvHfwDHQry/ut/yG1An0bw1U6nSoPEmcar0G5Zf1MDxjVNtAyB6IY8J/8ZAGxxQgUVlwWGVkEzZFXBUA7i7Pt5DVA4V6+BgjxSe0BYZFbhNqNstxkiCrn60U60AE5X+A53Rof1TRCrMsKl4PT4Pyp3QKMUYCioFSwzNAPiO/O/+HqbH1zkSKZQxznnVPeraAr1sMZJmDyrQO/PYLLpr1qqIF6Jbln6Dzr3pnn1y4Z/NO2itPq2NMj+q67QCnSW8/qbZnWvS5xvKQzATyUqZ8mOJsmI8TSNk/0L2Piy/MByix7f161CkcFmKSy0CAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAgVJUdBitnwvMt7or/T2Z8tKBQFlz1UqURFTTM0Ar66alvcixUbYGx1TySJNinoWIBQ9OPjgLkWP2EQEKoRxq7Sbtlj5a5ED6V4r8tlz4HJ647s23etnREkj9tOFovMf8NtSUx3FNpaEGZl2LRVGww+lU8PwH3/b3ReBdtaA7kfaV5+ixedcdSyKQuVATmvMI713P8VPl6MWmsMJtkV3XV/YMEsQ+GYqMr7kKXl13yeuEfU2VVEQsZ/1tgoobeVKiQ+Tqb0u2Nds+KjdHvaMbx2R8zL3Yu7iGJQfwuiMmuLRBRpIAqMlQFKK6dX9qz6ObOMsR9is6zP6CvlFpEzo5FQ=="]}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation create - Connection: - - keep-alive - Content-Length: - - '1114' - Content-Type: - - application/json - ParameterSetName: - - -l -n -g --certs-input-path - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000003?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000003","name":"att2000003","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att2000003.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '355' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:28 GMT - expires: - - '-1' - location: - - https://att2000003.wus.attest.azure.net/ - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy show - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000003?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000003","name":"att2000003","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att2000003.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '355' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://att2000003.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MjV4cXE2NDRwZGkzYi53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RCcFpVTXhkR041TVhwYU0yZDBZMGhLZGxwSVZtcGtRekZ3V2tOS1pFbEVNQzFKUjJ4Nll6TldiRXRJVWpWalIxVTVTVzVDZVdJeVVqRlpNMUYwWVZkUmFVeERRakpaVjNneFdsUXhha3h1V21oaVNGWnNTMVIwYWs5c2REQmxXRUpzVUZRd2FXVkRNWFJqZVRGNldqTm5kR016V25WSmJEQm5VRlEwWjJGWVRucGtWMVZ2WkVoc2QxcFVNR2xqTTFwMVNXbDNaMlJ0Um5Oa1YxVTVXWGsxTWxsWGVERmFVMnMzV1hwd1ltUkliSGRhVkRBNVNXNW5kR0pZVFhSWldGSXdXbGhPTUZsWVVuQmlNalIwWkVoc2QxcFRTbVJKUkRBdFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVVteGFVMGx6U1VoYWFHSklWbXhRVjAxMVpHMUdjMlJYVlhCUE16QTNJbjAuIn0.pYkxdmfKt4ywhexKaxYGRNd0rKZTBeFqomFyl6PjvVcXDvbO253hzCg_iNDXX-jL0joZ9_GxdKbphPNJ7b50grageiNiosUGqmOShUbfVBNs-Z1Sv10yPxGW6-YI4XscpU0IG6iq-JiCykw57tr8RYojiBJNc7HtZwL2tHs1nYl2dnkJ_uDNvgcM68HCwH19KbP9tcAIjV-jOLWuAlKNfubwAF8Z724Y0Ce9mW_pPGUJRyxv-cVbBrx897prbfnKSKmzEwSSn12srZNFStxcbXf9kzionbj60oTSJPprtDMOj0fZLE45HT3tqQCU3Y1KYkPwydrGbR_0GluRbJBJDQ"}' - headers: - content-length: - - '1966' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:31 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type -f --policy-format - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000003?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000003","name":"att2000003","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att2000003.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '355' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: '"eyJhbGciOiJSU0EyNTYiLCJ4NWMiOlsiTUlJQzFqQ0NBYjZnQXdJQkFnSUlTUUdEOUVGakJcdTAwMkJZd0RRWUpLb1pJaHZjTkFRRUxCUUF3SWpFZ01CNEdBMVVFQXhNWFFYUjBaWE4wWVhScGIyNURaWEowYVdacFkyRjBaVEF3SGhjTk1qQXhNVEl6TVRneU1EVXpXaGNOTWpFeE1USXpNVGd5TURVeldqQWlNU0F3SGdZRFZRUURFeGRCZEhSbGMzUmhkR2x2YmtObGNuUnBabWxqWVhSbE1EQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0NnZ0VCQUpyRWVNSlo3UE01VUJFbThoaUNLRGh6YVA2Y2xYdkhmd0RIUXJ5L3V0L3lHMUFuMGJ3MVU2blNvUEVtY2FyMEc1WmYxTUR4alZOdEF5QjZJWThKLzhaQUd4eFFnVVZsd1dHVmtFelpGWEJVQTdpN1B0NURWQTRWNlx1MDAyQkJnanhTZTBCW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n96HnIOqnxXxRh7rKbu65ECUOMWPXbyKQMZ0I3Wjhgt_XyyhfEiQGfJfGzA95-wm6yWqrmW7dMI7JkczG9ideztnr0bsw5NRsIWBXOjVy7Bg66qooTnODS_OqeQ4iaNsN-xjMElHABUxXhpBt2htbhemDU1X41o8clQgG84aEHCgkE07pR-7IL_Fn2gWuPVC66yxAp00W1ib2L-96q78D9J52HPdeDCSFio2RL7r5lOtz8YkQnjacb6xA"' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2864' - Content-Type: - - text/plain - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://att2000003.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"error":{"code":"InvalidOperation","message":"Attestation Enclave - operation failed with 104: Unhandled cryptographic error Error verifying certificate - chain: certificate has expired Additional Information: ()\r\n","innererror":{"code":"InvalidOperation","message":"Attestation - Enclave operation failed with 104: Unhandled cryptographic error Error verifying - certificate chain: certificate has expired Additional Information: ()\r\n"}}}' - headers: - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:34 GMT - server: - - Kestrel - transfer-encoding: - - chunked - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 400 - message: Bad Request -- request: - body: '{"location": "westus", "properties": {"policySigningCertificates": {"keys": - []}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation create - Connection: - - keep-alive - Content-Length: - - '81' - Content-Type: - - application/json - ParameterSetName: - - -l -n -g - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:47 GMT - expires: - - '-1' - location: - - https://att3000004.wus.attest.azure.net/ - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy show - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczNTEsImlhdCI6MTY1NzE2Mzc1MSwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzUxLCJ4LW1zLXBvbGljeSI6ImV5SmhiR2NpT2lKdWIyNWxJbjAuZXlKQmRIUmxjM1JoZEdsdmJsQnZiR2xqZVNJNkltUnRWbmxqTW14Mlltb3daMDFUTkhkUE1rWXhaRWRvZG1OdGJEWlpXRkp3WWpJMWVXUlhlR3hqTTNNNVVHbENkMXBZU25SaFdGRnZTMVIwT1U4eWJIcGpNMVpvWW0xT2JHTnVWbk5hV0U0M1dYcHdZbVJJYkhkYVZEQTVTVzVuZEdKWVRYUmpNbVEwVEZkc2VreFhVbXhaYmxadVdqSkdhV0pIVldsWVUwRTVVR2xDY0dNelRqRmFVMmd3WlZoQ2JGQlRTbkJqZVRGcldsZEtNVm95WkdoWmJYaHNTV2wzWjJSdFJuTmtWMVU1V1hrMU1sbFhlREZhVTJzM1dYcHdZbVJJYkhkYVZEQTVTVzVuZEdKWVRYUmpNbVEwVEZjeG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APSIe5sWqBVC8PkOFEFAwuhP8N2mD1FvjESE9E5S6LmdNnhV4bV5ilbBqmlpGkRvm-QGoz6SuFQ0BQw"}' - headers: - content-length: - - '1966' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:50 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type -f - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: '"eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ImRtVnljMmx2YmowZ01TNHdPd3BoZFhSb2IzSnBlbUYwYVc5dWNuVnNaWE1nZXdwYklIUjVjR1U5UFNJa2FYTXRaR1ZpZFdkbllXSnNaU0lzSUhaaGJIVmxQVDFtWVd4elpTQmRDaVltSUZzZ2RIbHdaVDA5SWlSd2NtOWtkV04wTFdsa0lpd2dkbUZzZFdVOVBUUTJNemtnWFFvbUppQmJJSFI1Y0dVOVBTSWtiV2x1TFhOMmJpSXNJSFpoYkhWbFBqMGdNQ0JkQ2lZbUlGc2dkSGx3WlQwOUlpUnpaM2d0YlhKemFXZHVaWElpTENCMllXeDFaVDA5SWtVek1VTTVSVFV3TlVZek4wRTFPRVJGTURrek16VXdOelZHUXpnMU9URXlOVFF6TVRORlFqSXdRa0l4UVRJM1JUVTBORE5EUXpRMU1FSTJSVE16UlRVaVhRbzlQaUJ3WlhKdGFYUW9LVHNLZlRzS0lHbHpjM1ZoYm1ObGNuVnNaWE1nZXdwak9sc2dkSGx3WlQwOUlpUnpaM2d0YlhKemFXZHVaWElpSUYwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXljMmxuYm1WeUlpd0tkbUZzZFdVOVl5NTJZV3gxWlNrN0NpQmpNVHBiZEhsd1pUMDlJbTFoWVMxbGFHUWlYU0E5UGlCcGMzTjFaU2gwZVhCbFBTSmhZWE10Wldoa0lpd2dkbUZzZFdVOVl6RXVkbUZzZFdVcE93b2dmVHNLQ2cifQ."' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '837' - Content-Type: - - text/plain - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczNTQsImlhdCI6MTY1NzE2Mzc1NCwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzU0LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJVcGRhdGVkIiwieC1tcy1wb2xpY3ktdG9rZW4taGFzaCI6IjRPd2tSa1JXUEZiX2tEME9MejRjUnZWQU5DMlp4Q21hS2VDRWgzbDV1aFEifQ.inSE6rUvfBFuBs1bROsjTNv5CIVf6LR5u6a9gEzohaX2nNI3MI65GrywyczQz7BBsVJIRZCn4boX2IkgJwvRa9kele5NTHbZGkW0rPPOSQSK6cAlElOA_WVsFf_iE3l1AeGE4Gx4Zoeed0OfnmQqBR2Ud4XodW1gsrTjyNIlsc_A5X2lauhDQ9yWsSgPazoLDKQM7U54dYaHPCKN-kkj9b_Xnnbs3qw53hJhyTdAcrS9WaIHv4C0t-y4q44GG78OHuh-KSJRcGMYjuJXF_n2ZxhGjBqU-EpHpp6yYjgSiuD97eRRgIYij9IC7q1Ma6SkmStOhiF-LGHu7zCEHQ_K9Q"}' - headers: - content-length: - - '821' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:53 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type -f - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczNTYsImlhdCI6MTY1NzE2Mzc1NiwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzU2LCJ4LW1zLXBvbGljeSI6ImV5SjBlWEFpT2lKS1YxUWlMQ0poYkdjaU9pSnViMjVsSW4wLmV5SkJkSFJsYzNSaGRHbHZibEJ2YkdsamVTSTZJbVJ0Vm5sak1teDJZbW93WjAxVE5IZFBkM0JvWkZoU2IySXpTbkJsYl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83rPplBFERpAjeimmxuxbDlTk36iIu2xulPsPaFd9oCxGPhyj7TOiM2ExS7Jf_mIhPBTvALay6anOpa3tpWzvBdkDL4NQVQ-S-kOvEVWywOyzxnHlGF0a9hUbS_Hl3lA50Xn9bQehAMV_mvn2mO8aDUFKtYX7-mf3GPpw6YgP_MN31GGHHNED6TtUA31L0xUd16UNqBy-LaBeel5DAaK9DoS_4RzueSNfS5O2H4FeecKO9kIlLjUzNpFW6mpkkmu5HDRcPVmr8d5jKEVW3pxiF6XhIKg"}' - headers: - content-length: - - '1821' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:55 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type -f --policy-format - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:15:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: '"eyJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ICJkbVZ5YzJsdmJqMGdNUzR3TzJGMWRHaHZjbWw2WVhScGIyNXlkV3hsYzN0ak9sdDBlWEJsUFQwaUpHbHpMV1JsWW5WbloyRmliR1VpWFNBOVBpQndaWEp0YVhRb0tUdDlPMmx6YzNWaGJtTmxjblZzWlhON1l6cGJkSGx3WlQwOUlpUnBjeTFrWldKMVoyZGhZbXhsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYVhNdFpHVmlkV2RuWVdKc1pTSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtjMmQ0TFcxeWMybG5ibVZ5SWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXljMmxuYm1WeUlpd2dkbUZzZFdVOVl5NTJZV3gxWlNrN1l6cGJkSGx3WlQwOUlpUnpaM2d0YlhKbGJtTnNZWFpsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXlaVzVqYkdGMlpTSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtjSEp2WkhWamRDMXBaQ0pkSUQwLUlHbHpjM1ZsS0hSNWNHVTlJbkJ5YjJSMVkzUXRhV1FpTENCMllXeDFaVDFqTG5aaGJIVmxLVHRqT2x0MGVYQmxQVDBpSkhOMmJpSmRJRDAtSUdsemMzVmxLSFI1Y0dVOUluTjJiaUlzSUhaaGJIVmxQV011ZG1Gc2RXVXBPMk02VzNSNWNHVTlQU0lrZEdWbElsMGdQVDRnYVhOemRXVW9kSGx3WlQwaWRHVmxJaXdnZG1Gc2RXVTlZeTUyWVd4MVpTazdmVHMifQ."' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '909' - Content-Type: - - text/plain - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczNzUsImlhdCI6MTY1NzE2Mzc3NSwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzc1LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJVcGRhdGVkIiwieC1tcy1wb2xpY3ktdG9rZW4taGFzaCI6IlQ5cDdub19xaVNnQ1U1bUNRby02M1VXeUxaX1NHLXNLWHU4Y0NtM1ozTG8ifQ.INdgwmPrt7g27tOjmEOAyHSu_Eby8dCr-rhk7FQJteWTQGwUTJApMvdqUqr-pQuXoG16aV6XUlK5wQbwrtvzLezi69TOkhzdEern0fToogzkKYTZnm5Ch0W89mqvRMcb9ojehPeZXuvkKRZG0GJUS9g6vwKWM62J-b6j1Uup5J89UJD6TvDput7SYB0uZbtPlbIgGIpzA9ogaTo1F5SEPgZM5EqtWDs9E3qfnmnrw9wWK613cp3StxnBpFeveySiNtzGzfBM9Cip4rQ_m6Qex6FeWd-uyHLsbVyeyWWzbScY-XWOGc7SSZ5pZae-iyw7p4PF4uB7HZvcSfBJc-_u3w"}' - headers: - content-length: - - '821' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:14 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type -f --policy-format - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxN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EVOQ01sbFhlREZhVkRGcVRHNWFhR0pJVm14TFZIUnFUMngwTUdWWVFteFFWREJwU2toT01tSnBTbVJKUkRBdFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVRqSmlhVWx6U1VoYWFHSklWbXhRVjAxMVpHMUdjMlJYVlhCUE1rMDJWek5TTldOSFZUbFFVMGxyWkVkV2JFbHNNR2RRVkRSbllWaE9lbVJYVlc5a1NHeDNXbFF3YVdSSFZteEphWGRuWkcxR2MyUlhWVGxaZVRVeVdWZDRNVnBUYXpkbVZITWlmUS4ifQ.cxby8k0q-_nze3h9CC5eiaqV8vIeYD_pfR5FR_N4RDcFoGJuD58my4CMBoQHYWbFFwya_M-jTpKNi-E09_kQo3N_n13MKYkT-AdXOxHeIvw8psnFGHfkGrIw-k9Tp_GZayW0m-WP-NOkPoIBSgjQbClZTpxCbnQaiNZB6_gT_ANCg38mNh8hk3xwKaIcUo1VPTe9T6peOrviGsgfGIkWfTZNJr7hUtHqp9GAeB1S-y0nFC5XZTadOsZKmh14RU6vbF4-26Ciu_YNYdtRJ1rFHU0AoM0VN0UQ7ZlFRIkcYssSXcFdwYfqwJwnVt7mfgNzQKvaxNUsAKXGYMjRNCHaqA"}' - headers: - content-length: - - '1917' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:16 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type -f - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: '"eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ImRtVnljMmx2YmowZ01TNHdPd3BoZFhSb2IzSnBlbUYwYVc5dWNuVnNaWE1nZXdwYklIUjVjR1U5UFNJa2FYTXRaR1ZpZFdkbllXSnNaU0lzSUhaaGJIVmxQVDFtWVd4elpTQmRDaVltSUZzZ2RIbHdaVDA5SWlSd2NtOWtkV04wTFdsa0lpd2dkbUZzZFdVOVBUUTJNemtnWFFvbUppQmJJSFI1Y0dVOVBTSWtiV2x1TFhOMmJpSXNJSFpoYkhWbFBqMGdNQ0JkQ2lZbUlGc2dkSGx3WlQwOUlpUnpaM2d0YlhKemFXZHVaWElpTENCMllXeDFaVDA5SWtVek1VTTVSVFV3TlVZek4wRTFPRVJGTURrek16VXdOelZHUXpnMU9URXlOVFF6TVRORlFqSXdRa0l4UVRJM1JUVTBORE5EUXpRMU1FSTJSVE16UlRVaVhRbzlQaUJ3WlhKdGFYUW9LVHNLZlRzS0lHbHpjM1ZoYm1ObGNuVnNaWE1nZXdwak9sc2dkSGx3WlQwOUlpUnpaM2d0YlhKemFXZHVaWElpSUYwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXljMmxuYm1WeUlpd0tkbUZzZFdVOVl5NTJZV3gxWlNrN0NpQmpNVHBiZEhsd1pUMDlJbTFoWVMxbGFHUWlYU0E5UGlCcGMzTjFaU2gwZVhCbFBTSmhZWE10Wldoa0lpd2dkbUZzZFdVOVl6RXVkbUZzZFdVcE93b2dmVHNLQ2cifQ."' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '837' - Content-Type: - - text/plain - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczNzksImlhdCI6MTY1NzE2Mzc3OSwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzc5LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJVcGRhdGVkIiwieC1tcy1wb2xpY3ktdG9rZW4taGFzaCI6IjRPd2tSa1JXUEZiX2tEME9MejRjUnZWQU5DMlp4Q21hS2VDRWgzbDV1aFEifQ.PRaW1Ufpbo8r3kYQZp3kR4oIsA-2qQIlF6hyD4NkUVV7qvYbr2Q8bnU-F4smmx5dmBwDviLcED4iwC3E3SAzNJDWemhT4tYSf-uqrW5-OVQSrTSxc_EeGSKRxiARr9zZWDamFQKEqRpQ6ICyW3W-wPeyCL5xyaLSKXVbOBkdJd_bw7zoMMVM_JbQU_9R_3_wSUwQluzBBXhYpHtcYZHzTkrEb6CvJBsPo89TnV4CZKQWA4vMr8jJfCJCopCwD2--K7Qyr4Vr27kvchHMT66ZOSrm30dEd-Y1cWW4E_-OKj7k8CMTA-6Nxrq6973QmIploD2ltEJWUWrE22MKfuUZeg"}' - headers: - content-length: - - '821' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:18 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type -f - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczODIsImlhdCI6MTY1NzE2Mzc4MiwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzgyLCJ4LW1zLXBvbGljeSI6ImV5SjBlWEFpT2lKS1YxUWlMQ0poYkdjaU9pSnViMjVsSW4wLmV5SkJkSFJsYzNSaGRHbHZibEJ2YkdsamVTSTZJbVJ0Vm5sak1teDJZbW93WjAxVE5IZFBkM0JvWkZoU2IySXpTbkJsYlVZd1lWYzVkV051Vm5OYVdFMW5aWGR3WWtsSVVqVmpSMVU1VUZOSmEyRllUWFJhUjFacFpGZGtibGxYU25OYVUwbHpTVWhhYUdKSVZteFFWREZ0V1ZkNGVscFRRbVJEYVZsdFNVWnpaMlJJYkhkYVZEQTVTV2xTZDJOdE9XdGtWMDR3VEZkc2EwbHBkMmRrYlVaelpGZFZPVkJVVVRKTmVtdG5XRkZ2YlVwcFFtSkpTRkkxWTBkVk9WQlRTV3RpVjJ4MVRGaE9NbUpwU1hOSlNGcG9Za2hXYkZCcU1HZE5RMEprUTJsWmJVbEdjMmRrU0d4M1dsUXdPVWxwVW5wYU0yZDBZbGhLZW1GWFpIVmFXRWxwVEVOQ01sbFhlREZhVkRBNVNXdFZlazFWVFRWU1ZGVjNUbFZaZWs0d1JURlBSVkpHVFVScmVrMTZWWGRPZWxaSFVYcG5NVTlVUlhsT1ZGRjZUVlJPUmxGcVNYZFJhMGw0VVZSSk0xSlVWVEJPUkU1RVVYcFJNVTFGU1RKU1ZFMTZVbFJWYVZoUmJ6bFFhVUozV2xoS2RHRllVVzlMVkhOTFpsUnpTMGxIYkhwak0xWm9ZbTFPYkdOdVZuTmFXRTFuWlhkd2FrOXNjMmRrU0d4M1dsUXdPVWxwVW5wYU0yZDBZbGhLZW1GWFpIVmFXRWxwU1VZd1oxQlVOR2RoV0U1NlpGZFZiMlJJYkhkYVZEQnBZekprTkV4WE1YbGpNbXh1WW0xV2VVbHBkMHRrYlVaelpGZFZPVmw1TlRKWlYzZ3hXbE5yTjBOcFFtcE5WSEJpWkVoc2QxcFVNRGxKYlRGb1dWTXhiR0ZIVVdsWVUwRTVVR2xDY0dNelRqRmFVMmd3WlZoQ2JGQlRTbWhaV0UxMFdsZG9hMGxwZDJka2JVWnpaRmRWT1ZsNlJYVmtiVVp6WkZkVmNFOTNiMmRtVkhOTFEyY2lmUS4ifQ.KHec8TlcmVHaDq2sVAVvsj_8HZz8Zu1j0-sMBm6kmzyN5W5ipnDl6DMU1IMyXt43k9FEOveBBAwAZ4sZajmyBzEE71QcGkqXja6Y000oBu3VxotBHAZh0_zjKClui0gFBkhKc2M1g-S4RYj13IfC2BydYIou5IK-qY2L6DF0JOilew16IYLq_EqpNQ7ELl3AVGkKtGQLSSTeRwUHxB_9Vq7-WLKXuIO07eioeDqEEY1Oh0qzVitAepzhCyMQlXQ2QZr373rcFlOppoByWCXG946iEXTzvw3O-BR1EyJu-YsBvgPMCgBP_3MxIj9nzroy5NbuK4uTXS1GmEXEqIsT1g"}' - headers: - content-length: - - '1821' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:21 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type --new-attestation-policy --policy-format - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: '"eyJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ICJkbVZ5YzJsdmJqMGdNUzR3TzJGMWRHaHZjbWw2WVhScGIyNXlkV3hsYzN0ak9sdDBlWEJsUFQwaUpHbHpMV1JsWW5WbloyRmliR1VpWFNBOVBpQndaWEp0YVhRb0tUdDlPMmx6YzNWaGJtTmxjblZzWlhON1l6cGJkSGx3WlQwOUlpUnBjeTFrWldKMVoyZGhZbXhsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYVhNdFpHVmlkV2RuWVdKc1pTSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtjMmQ0TFcxeWMybG5ibVZ5SWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXljMmxuYm1WeUlpd2dkbUZzZFdVOVl5NTJZV3gxWlNrN1l6cGJkSGx3WlQwOUlpUnpaM2d0YlhKbGJtTnNZWFpsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXlaVzVqYkdGMlpTSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtjSEp2WkhWamRDMXBaQ0pkSUQwLUlHbHpjM1ZsS0hSNWNHVTlJbkJ5YjJSMVkzUXRhV1FpTENCMllXeDFaVDFqTG5aaGJIVmxLVHRqT2x0MGVYQmxQVDBpSkhOMmJpSmRJRDAtSUdsemMzVmxLSFI1Y0dVOUluTjJiaUlzSUhaaGJIVmxQV011ZG1Gc2RXVXBPMk02VzNSNWNHVTlQU0lrZEdWbElsMGdQVDRnYVhOemRXVW9kSGx3WlQwaWRHVmxJaXdnZG1Gc2RXVTlZeTUyWVd4MVpTazdmVHMifQ."' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '909' - Content-Type: - - text/plain - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczODQsImlhdCI6MTY1NzE2Mzc4NCwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzg0LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJVcGRhdGVkIiwieC1tcy1wb2xpY3ktdG9rZW4taGFzaCI6IlQ5cDdub19xaVNnQ1U1bUNRby02M1VXeUxaX1NHLXNLWHU4Y0NtM1ozTG8ifQ.OcBuchxntXuEwNsFiikPrkK7hbhzotq5o-zmQp4uvwmHgwY7vT-hFfdmoIvkFZxUcnhtWeHzzPoBR9MFVojbXl0DIV8ZxDn5cLv7U_FtZRtGH4Gx0F8qlorg4KvtcTuFp6744S4W0vyC3xTxObDlZPFCQFnugrX_4LFIJ5Q6GZEniLfHzgFWzebiWa9Ok_DEz3rLb7g4kYiBiWy_ncWXtkMY6lwHiZetUdfWMXOvJzEOekiDl9XEAAmRzqCLFlBWjWFEj7hVqT5QdOX02DYRMoyfjM6Ny_22if_r9W8j9dxnuaTSzNgqeUAAY9eR-QiyGE8Dz9_T7XQ2bjcrWqbILA"}' - headers: - content-length: - - '821' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:24 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy set - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type --new-attestation-policy --policy-format - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczODYsImlhdCI6MTY1NzE2Mzc4NiwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzg2LCJ4LW1zLXBvbGljeSI6ImV5SmhiR2NpT2lKdWIyNWxJbjAuZXlKQmRIUmxjM1JoZEdsdmJsQnZiR2xqZVNJNklDSmtiVlo1WXpKc2RtSnFNR2ROVXpSM1R6SkdNV1JIYUhaamJXdzJXVmhTY0dJeU5YbGtWM2hzWXpOMGFrOXNkREJsV0VKc1VGUXdhVXBIYkhwTVYxSnNXVzVXYmxveVJtbGlSMVZwV0ZOQk9WQnBRbmRhV0VwMFlWaFJiMHRVZERsUE1teDZZek5XYUdKdFRteGpibFp6V2xoT04xbDZjR0prU0d4M1dsUXdPVWxwVW5CamVURnJXbGRLTVZveVpHaFpiWGhzU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TfMZdHEnPnlZXK3z4zJC5shHuUrYGPB9OVppSkBnwxW_X9uoNGarYA4TEHNdVfa6Ga_uHNx_C4BGR-8WIJlfm6L632lzgwL1wqtJSrQSkz3Q_IIy9gQZ4t9rfG5jAsXvairVsiW5bJG0V_16WnqyX-B5c1M2qhh_Yg"}' - headers: - content-length: - - '1917' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:26 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy reset - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:27 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: '"eyJhbGciOiJub25lIn0.."' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '23' - Content-Type: - - text/plain - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: POST - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave%3Areset?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczODksImlhdCI6MTY1NzE2Mzc4OSwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcHd4Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNjU3MTYzNzg5LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJSZW1vdmVkIn0.Gsdq-FNdj2H0UooCO9qtwT4q7l0HseBhV_t_FjWP1F3qt3F8b_NHa-BOfPIU8-yTfyHyNiOqb2TEODUXZxk_NJ9V3-HST62rPS4T7VfwCzSLCd74E0PucyCzseRROXfkVKa2NhB-wpIgoFw3RbAomZnrgYxHzg5ZieandBqefSDhOiOsZOthUil-kcF_Km-57zW81etvc2xLROGZeHPAcDsrRK40adcW7tvdyao6W_7PymHv7nxPqCFjEYF_z-5Y26eYR69VixTi8Ly-b8juvuX1y8eEu_ERbPm2c9BA9jLa9lSuWwI8jBVmK-lQbWt_qnA6LB5ZKwGvNmyG44g6SQ"}' - headers: - content-length: - - '726' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:28 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation policy reset - Connection: - - keep-alive - ParameterSetName: - - -n -g --attestation-type - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004","name":"att3000004","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000004.wus.attest.azure.net"}}' - headers: - cache-control: - - no-cache - content-length: - - '350' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.8.1 (Windows-10-10.0.22000-SP0) msrest/0.7.0 msrest_azure/0.6.4 azure-attestation/0.1.0 - Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://att3000004.wus.attest.azure.net/policies/SgxEnclave?api-version=2020-10-01&tee=SgxEnclave - response: - body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3k3dHp1bGZocHB3eC53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE2NTcxNjczOTEsImlhdCI6MTY1NzE2Mzc5MSwiaXNzIjoiaHR0cHM6Ly9hdHQzeTd0enVsZmhwcH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m5VRlEwWjJGWVRucGtWMVZ2WkVoc2QxcFVNR2xqTTFwMVNXbDNaMlJ0Um5Oa1YxVTVXWGsxTWxsWGVERmFVMnMzV1hwd1ltUkliSGRhVkRBNVNXNW5kR0pZVFhSWldGSXdXbGhPTUZsWVVuQmlNalIwWkVoc2QxcFRTbVJKUkRBdFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVVteGFVMGx6U1VoYWFHSklWbXhRVjAxMVpHMUdjMlJYVlhCUE16QTNJbjAuIn0.Kjfzf0DizROrp5ZGySzS9_L5jrSq7Ev0NYyjtmF8HpQ8SHzcOoTtW6isp3-HpuwUv8Di7MiwjOtiP_kLVhbMq2pxn-5_Pk7X1XJYOpLbEnK3Qqi-Ww1kDyjfUcfI3L2rH135sqwJmgXxoyGdz1E6cPWKknGTsDbsHVreB2NyERZve64CCHjft7vJP9hcX4SfO6amKSv4-T9JRGfRTqGKRF4VLVOyqxc3tP-Q0rgDvNwkbxW2EeS7acmrX94sOnFQpIuYkBVJ8_kyARCPoyAVPJ1suUBD8nwMEejv-jjBjiHwq9pUUDVBMyiVQ8X01_Zz5GIv8PtjU3AbO5TLgyCGNQ"}' - headers: - content-length: - - '1966' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 07 Jul 2022 03:16:30 GMT - server: - - Kestrel - x-ms-maa-service-version: - - 1.11.01987.157 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -n -g -y - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2020-10-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 07 Jul 2022 03:16:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -n -g -y - User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000003?api-version=2020-10-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 07 Jul 2022 03:16:47 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-maa-service-version: - - 1.11.01987.157 - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - attestation delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -n -g -y + - -y -n --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-attestationmanagementclient/unknown Python/3.8.1 - (Windows-10-10.0.22000-SP0) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000004?api-version=2020-10-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att0000002?api-version=2020-10-01 response: body: string: '' @@ -2008,7 +319,7 @@ interactions: content-length: - '0' date: - - Thu, 07 Jul 2022 03:16:56 GMT + - Fri, 08 Dec 2023 07:32:30 GMT expires: - '-1' pragma: @@ -2020,7 +331,7 @@ interactions: x-content-type-options: - nosniff x-ms-maa-service-version: - - 1.11.01987.157 + - 1.11.02509.1778 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: diff --git a/src/attestation/azext_attestation/tests/latest/recordings/test_provider_with_signer_1.yaml b/src/attestation/azext_attestation/tests/latest/recordings/test_provider_with_signer_1.yaml new file mode 100644 index 00000000000..398876932c7 --- /dev/null +++ b/src/attestation/azext_attestation/tests/latest/recordings/test_provider_with_signer_1.yaml @@ -0,0 +1,937 @@ +interactions: +- request: + body: '{"location": "westus", "properties": {"policySigningCertificates": {"keys": + [{"alg": "RS256", "kty": "RSA", "use": "sig", "x5c": ["MIIDRjCCAi6gAwIBAgIIQDwUUGwcWKswDQYJKoZIhvcNAQELBQAwHzEdMBsGA1UEAwwUTWFhT3JpZ2luYWxUZXN0Q2VydDEwIBcNMjMxMjAxMDAwMDAwWhgPMjA3MzEyMDEwMDAwMDBaMB8xHTAbBgNVBAMMFE1hYU9yaWdpbmFsVGVzdENlcnQxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArHz41/8zQ+egEB+9evUMIQPmrXR5uyeXJC3RNFVV0BT4OCFYWnj7ADJFtwfOXy6H7lDuMb4EvumJpAwKzNLSLfwsYDHzin49LUB65EfoaOmLYPCtR3hDHFTAp4hMxYYnRDvh1pkDu/9VJy69VSZfG9qoKz4TPOQvhKLC4WmEWUygStHfxT6dHZqGd74bsSY5H+VJlQYkzY/8lSWbkV0eMru23GUj1fECEU/+SUERphRdT/3CaIxXkT3NrSxn81LqdjtQwUaUeUX3IVzLuHNWzBjxI/kKaaeQBFWlK5QjZdV+AFIy+aINz6+nU27Tl+nx0l9Rku+/iJb+qa4Tn+ndjQIDAQABo4GDMIGAME4GA1UdIwRHMEWAFBY7+c0gwUUFE8aSiRGnoproh1j4oSOkITAfMR0wGwYDVQQDDBRNYWFPcmlnaW5hbFRlc3RDZXJ0MYIIQDwUUGwcWKswHQYDVR0OBBYEFBY7+c0gwUUFE8aSiRGnoproh1j4MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACxDiFT6b3+Vf7xdVcFZTORe5hUIa2zI+nj35bQH5B8OMNZdTuq3QRPxv1omEqREHqDqiMLBlNdKZkkyGaHzOVki1XR8GMxW16pkHtJTKDIWc/pgO+FUNNZ92y/uL7a1cHLOElxksedGPF1JefY48NdhQUubPIP2BuBwOUiGCYZytmS3JG8yrVrHUpxCwhoali7mB1eHYGyARDQi2T4UO1LLEqLt5yLCRxlYugfPsgpGYEnEmfrLS6eEydIyXkxioGjO77gDABblyeOq6gYnfTgqm96mpo0LL48aPx9rfew5dgYIU6WgKpOqg/uYMw0kvwBMSI8XpgydJIYxM5v5wtQ="]}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation create + Connection: + - keep-alive + Content-Length: + - '1262' + Content-Type: + - application/json + ParameterSetName: + - -l -n -g --certs-input-path + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net"}}' + headers: + cache-control: + - no-cache + content-length: + - '355' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:11 GMT + expires: + - '-1' + location: + - https://att1000002.wus.attest.azure.net/ + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer list + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer list + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att1000002.wus.attest.azure.net/certificates?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciO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n3bFup2TwZ7xryZTB5Ue-6bfmIf1CuQxObnhQzklj97NZ1KihWzlHSENQqCjmEzXXBv6KN2HzU7feKHxShK-aQ-UoQTLQ3dqaQkbS98lD4uHGV6XwLhNdRRbgivSXfkZHyCnIkMfLUO52XjQrrsOGtmmOAfg"}' + headers: + content-length: + - '2302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:15 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy show + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy show + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att1000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MWplMm53bndxcWlkdi53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzMzgsImlhdCI6MTcwMjAyMDczOCwiaXNzIjoiaHR0cHM6Ly9hdHQxamUybndud3FxaWR2Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzM4LCJ4LW1zLXBvbGljeSI6ImV5SmhiR2NpT2lKdWIyNWxJbjAuZXlKQmRIUmxjM1JoZEdsdmJsQnZiR2xqZVNJNkltUnRWbmxqTW14Mlltb3daMDFUTkhoUE1rNTJZbTFhY0ZvelZubFpXRkp3WWpJMWVXUlhlR3hqTTNNNVVHbENjR016VGpGYVdFSjVZak5DYkdOdVVqVkxTRkkxWTBkVk9VbHVaM1JpV0UxMFl6SmtORXhZVW1wWmJXeHJXbGMxTUdGWFduQmFXRWxwVEVOQ01sbFhlREZhVkRCcFRWUkJhVXRVZERsUE1rWXhaRWRvZG1OdGJEWlpXRkp3WWpJMWVXUlhlR3hqTTNNNVVHbENkMXBZU25SaFdGRnZTMVIwT1U4eWJIcGpNMVpvWW0xT2JHTnVWbk5hV0U0M1dYcHdZbVJJYkhkYVZEQTVTVzVuZEdKWVRYUmpNbVEwVEZkc2VreFhVbXhaYmxadVdqSkdhV0pIVldsWVUwRTVVR2xDY0dNelRqRmFVMmd3WlZoQ2JGQlRTbkJqZVRGcldsZEtNVm95WkdoWmJYaHNTV2wzWjJSdFJuTmtWMVU1V1hrMU1sbFhlREZhVTJzM1dYcH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wkEjC5EVrOfF3RH6wbfz8FI2TfUJijM02IehhISyT3LnC5st97BfGARXEpTAaCXS8dgibE0NpV0SZ6oN8Hv4dwhWK6IkziTcPyKfSrhU3t8yS3Zfo7UL0g8wQA"}' + headers: + content-length: + - '2158' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:18 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer add + Connection: + - keep-alive + ParameterSetName: + - -n -g -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyAiYWxnIjoiUlMyNTYiLCAieDVjIjogWyJNSUlEUmpDQ0FpNmdBd0lCQWdJSVFEd1VVR3djV0tzd0RRWUpLb1pJaHZjTkFRRUxCUUF3SHpFZE1Cc0dBMVVFQXd3VVRXRmhUM0p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9VLhwHlCXEw86jqkfLGgvLA5eO4PYWleKNqonMhI7zu0-s53n3DO9S4c78pYwHOAsMNMImJHlRKRJcN46IXVxKfbgySuxov937BuTdWcTKIxg"' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer add + Connection: + - keep-alive + Content-Length: + - '3399' + Content-Type: + - application/json + ParameterSetName: + - -n -g -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://att1000002.wus.attest.azure.net/certificates:add?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MWplMm53bndxcWlkdi53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNDEsImlhdCI6MTcwMjAyMDc0MSwiaXNzIjoiaHR0cHM6Ly9hdHQxamUybndud3FxaWR2Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzQxLCJ4LW1zLWNlcnRpZmljYXRlLXRodW1icHJpbnQiOiI4MUVENkZDNzI5RjZGMjYzMTIwNzgwQUM2RDY3ODg5M0U3MDRDQzlDIiwieC1tcy1wb2xpY3ljZXJ0aWZpY2F0ZXMtcmVzdWx0IjoiSXNQcmVzZW50In0.mzL2pWgcFtl8reoHOGsZZmVbvMaPQDifU6z2q1s4DZkS7XTXIYthuKFEh7cSrZBCcXYJdAVeydscA2vUUIpdfqBhT7SACGeylvCbCv4leVMKePfXskXgpjK678iuP7gbHCvlWpwNgoy5cxX2t8ew2mdAFybrBgacgPqNg9GONPTZkrenvR79G8UCdiuiUdoZm_Xj4SSY63jEeeeC6NvR14dFKR6q84d9-wv-ysZNu8xuIatc7-R5uWNmKSkJCQTbunP1gpDKJ1h3m0Ftlp5F7ilUakoUJ4BDjWECGZrZSjkplYdOZfYFqltw23_1UmD_fwFjEsmBpPLKcLZjXabPLQ"}' + headers: + content-length: + - '842' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:21 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer list + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer list + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att1000002.wus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cCtTL1l4SGtCNlREVDVaT3ZrSVZZbGpQbGcwNlZaaFdpaFVVRCtXblVRU2ZGbmZWV2JTclBWeVpvNVkyR2RRVVVBK2VLL3V1cTFib3hORVVHZEY1NE9BNCtFcEpVR0RhS3JUTXk2MFdVeERpcDQwVkszMUtBNWZpWUN5ZVlpV1lRdm02QlJkQmIrT3R5dFhIWTcvU0tlanVFSHdjaFhOU2hHaW55M0J4dzhPYzcxdlRnMTlMSEs2Z0MwbDQ5QjJuejdEbW15WktLVEpwU1FSTlRwc3JpRk05cUM4NWhrczVhMkloVE45d1NHUCs1L0Yrb0k2eEEvUFhUSSJdfV19fQ.KKwo6rYSqwUSkis1ykdmO7BTZcjcsxWpN3hnmmkRm-v6Rr6r_hjs3v6maKj5y_O6aEE6zbvcREDV1Ekri6rgnfMHVekBWDQGSv-xr9yCuPPCUeVsPJYmynuSU8RViLtHPJ5M_AGl7KFE5xim6ldzlHCg7rKghGFIF3M60_YAR7rEEXfWF1A2PpdSRs_oS2dJtQRKGMEnIXNiIpIAh5c-5m1_N5GVQRWCIcqSTqE4U-OspZV6nMh8ANOB3r2g7rz1mvW1tQ3LcRDG8qvpIQ-nwB0r-Ordnce_Ove9kaldU3QAFLW017d4zHGtyEivEpZKnysFzkrBwAYFHJvdmtFO3A"}' + headers: + content-length: + - '3821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:23 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer remove + Connection: + - keep-alive + ParameterSetName: + - -n -g -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:25 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyAiYWxnIjoiUlMyNTYiLCAieDVjIjogWyJNSUlEUmpDQ0FpNmdBd0lCQWdJSVFEd1VVR3djV0tzd0RRWUpLb1pJaHZjTkFRRUxCUUF3SHpFZE1Cc0dBMVVFQXd3VVRXRmhUM0pwWjJsdVlXeFVaWE4wUTJWeWRERXdJQmNOTWpNeE1qQXhNREF3TURBd1doZ1BNakEzTXpFeU1ERXdNREF3TURCYU1COHhIVEFiQmdOVkJBTU1GRTFoWVU5eWFXZHBibUZzVkdWemRFTmxjblF4TUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFySHo0MS84elErZWdFQis5ZXZVTUlRUG1yWFI1dXllWEpDM1JORlZWMEJUNE9DRllXbmo3QURKRnR3Zk9YeTZIN2xEdU1iNEV2dW1KcEF3S3pOTFNMZndzWURIemluNDlMVUI2NUVmb2FPbUxZUEN0UjNoREhGVEFwNGhNeFlZblJEdmgxcGtEdS85Vkp5NjlWU1pmRzlxb0t6NFRQT1F2aEtMQzRXbUVXVXlnU3RIZnhUNmRIWnFHZDc0YnNTWTVIK1ZKbFFZa3pZLzhsU1dia1YwZU1ydTIzR1VqMW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tCNlREVDVaT3ZrSVZZbGpQbGcwNlZaaFdpaFVVRCtXblVRU2ZGbmZWV2JTclBWeVpvNVkyR2RRVVVBK2VLL3V1cTFib3hORVVHZEY1NE9BNCtFcEpVR0RhS3JUTXk2MFdVeERpcDQwVkszMUtBNWZpWUN5ZVlpV1lRdm02QlJkQmIrT3R5dFhIWTcvU0tlanVFSHdjaFhOU2hHaW55M0J4dzhPYzcxdlRnMTlMSEs2Z0MwbDQ5QjJuejdEbW15WktLVEpwU1FSTlRwc3JpRk05cUM4NWhrczVhMkloVE45d1NHUCs1L0Yrb0k2eEEvUFhUSSJdfX0.UiHsv_Dsn8HCHaDn3qNk1plQOZjFc3a8TUK9ZW6lJGwSZy3R69ls-RG1JZco6A3AA3Ale9NE5YIW9AkujpV8o3dGjhSLQLpYpO5pl-uriKMAs1d9nVWQ2p3t87d8diivy1A-tlS-Pn_BcuBWn5hh-dUhFnGM0jWUqeSXHUvIaQDGLZSLpdIpoZVtTtNTFZMkMb6XUwbzUzWBUXhFGO5bjA375kV0P_fWKJ0mvjn-t9VLhwHlCXEw86jqkfLGgvLA5eO4PYWleKNqonMhI7zu0-s53n3DO9S4c78pYwHOAsMNMImJHlRKRJcN46IXVxKfbgySuxov937BuTdWcTKIxg"' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer remove + Connection: + - keep-alive + Content-Length: + - '3399' + Content-Type: + - application/json + ParameterSetName: + - -n -g -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://att1000002.wus.attest.azure.net/certificates:remove?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MWplMm53bndxcWlkdi53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNDcsImlhdCI6MTcwMjAyMDc0NywiaXNzIjoiaHR0cHM6Ly9hdHQxamUybndud3FxaWR2Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzQ3LCJ4LW1zLWNlcnRpZmljYXRlLXRodW1icHJpbnQiOiI4MUVENkZDNzI5RjZGMjYzMTIwNzgwQUM2RDY3ODg5M0U3MDRDQzlDIiwieC1tcy1wb2xpY3ljZXJ0aWZpY2F0ZXMtcmVzdWx0IjoiSXNBYnNlbnQifQ.CuzgKvVz9ROA7xRZuKPErTI4bj-zEOnKT1MNqGdh5ltWLPNIwXTRLa0iL1Uh0GkJm73vfQ3RZbJvJOBUYAKJ5vI3YhrcD65xgidhQxvjKZ6h00FfWX0ubheHUNQRIhaUJl7AQ-_ncugJqydbXhe4y9XxCE2iaHrI-zWyVXn8dcGt4Q-goSlI2xM-AAhnGgHUtEdaXIBI4kU-EjtkHiI3wrlSco5ooHiLjwZFPq6FxCkpXXUrqOdvjkmiroK7_hLX_ohPWXrAeGIDM6ysesYCaIEm0wbaRlpURUVbUnDGxMoa2lE_CN_eeGsFdSpoME7vifUWKZ0AMXgpES4xfe9qNw"}' + headers: + content-length: + - '841' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:26 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer remove + Connection: + - keep-alive + ParameterSetName: + - -n -g -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer remove + Connection: + - keep-alive + ParameterSetName: + - -n -g -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att1000002.wus.attest.azure.net/certificates?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MWplMm53bndxcWlkdi53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNTAsImlhdCI6MTcwMjAyMDc1MCwiaXNzIjoiaHR0cHM6Ly9hdHQxamUybndud3FxaWR2Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzUwLCJ4LW1zLXBvbGljeS1jZXJ0aWZpY2F0ZXMiOnsia2V5cyI6W3siYWxnIjoiUlMyNTYiLCJrdHkiOiJSU0EiLCJ1c2UiOiJzaWciLCJ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iMytWZjd4ZFZjRlpUT1JlNWhVSWEyekkrbmozNWJRSDVCOE9NTlpkVHVxM1FSUHh2MW9tRXFSRUhxRHFpTUxCbE5kS1pra3lHYUh6T1ZraTFYUjhHTXhXMTZwa0h0SlRLRElXYy9wZ08rRlVOTlo5MnkvdUw3YTFjSExPRWx4a3NlZEdQRjFKZWZZNDhOZGhRVXViUElQMkJ1QndPVWlHQ1laeXRtUzNKRzh5clZySFVweEN3aG9hbGk3bUIxZUhZR3lBUkRRaTJUNFVPMUxMRXFMdDV5TENSeGxZdWdmUHNncEdZRW5FbWZyTFM2ZUV5ZEl5WGt4aW9Hak83N2dEQUJibHllT3E2Z1luZlRncW05Nm1wbzBMTDQ4YVB4OXJmZXc1ZGdZSVU2V2dLcE9xZy91WU13MGt2d0JNU0k4WHBneWRKSVl4TTV2NXd0UT0iXX1dfX0.KbMAD33Z8AKw1xv1cxYqnwiQ9pT6CJrNioTuTk66VkcN1f1JDhCIdLTlswHU4mThtTBiWuMMA4BMk8SQcaVB295C-WSvdKuYuropVhKNZt_knIMxBXRYTq-UsqivB5ByQweA37koWB42xriOKwO3nZEDwf2mlaCcq8Csuz9NVawUydWz8rf4na5DjzK9VCx1SINL9yLK2Ej3oFRR5KagG5c1XTjXF9OYw-_goYhMmedOfFg4CDqLdJZV2JeM-nRB7RLHBxcnQXSvx24RlvMuTSUu2WTjU72ofLgIf9JpAvqQ_7tfUF4Ps1c3_TMgHh6MCQ3XDMB0XxCTcysvZkX7lA"}' + headers: + content-length: + - '2302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:29 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer add + Connection: + - keep-alive + ParameterSetName: + - -n -g --signer + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyAiYWxnIjoiUlMyNTYiLCAieDVjIjogWyJNSUlEUmpDQ0FpNmdBd0lCQWdJSVFEd1VVR3djV0tzd0RRWUpLb1pJaHZjTkFRRUxCUUF3SHpFZE1Cc0dBMVVFQXd3VVRXRmhUM0pwWjJsdVlXeFVaWE4wUTJWeWRERXdJQmNOTWpNeE1qQXhNREF3TURBd1doZ1BNakEzTXpFeU1ERXdNREF3TURCYU1COHhIVEFiQmdOVkJBTU1GRTFoWVU5eWFXZHBibUZzVkdWemRFTmxjblF4TUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFySHo0MS84elErZWdFQis5ZXZVTUlRUG1yWFI1dXllWEpDM1JORlZWMEJUNE9DRllXbmo3QURKRnR3Zk9YeTZIN2xEdU1iNEV2dW1KcEF3S3pOTFNMZndzWURIemluNDlMVUI2NUVmb2FPbUxZUEN0UjNoREhGVEFwNGhNeFlZblJEdmgxcGtEdS85Vkp5NjlW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2WTBRZVo2L0ZXakpJbnEyTGxZKzIwZG02M1NxNXRGVEVzMmI5dDVybEp4SDdtZDRoRTgxUGxJUDE3ZTlTUnMxVHNUNXZhcCtTL1l4SGtCNlREVDVaT3ZrSVZZbGpQbGcwNlZaaFdpaFVVRCtXblVRU2ZGbmZWV2JTclBWeVpvNVkyR2RRVVVBK2VLL3V1cTFib3hORVVHZEY1NE9BNCtFcEpVR0RhS3JUTXk2MFdVeERpcDQwVkszMUtBNWZpWUN5ZVlpV1lRdm02QlJkQmIrT3R5dFhIWTcvU0tlanVFSHdjaFhOU2hHaW55M0J4dzhPYzcxdlRnMTlMSEs2Z0MwbDQ5QjJuejdEbW15WktLVEpwU1FSTlRwc3JpRk05cUM4NWhrczVhMkloVE45d1NHUCs1L0Yrb0k2eEEvUFhUSSJdfX0.UiHsv_Dsn8HCHaDn3qNk1plQOZjFc3a8TUK9ZW6lJGwSZy3R69ls-RG1JZco6A3AA3Ale9NE5YIW9AkujpV8o3dGjhSLQLpYpO5pl-uriKMAs1d9nVWQ2p3t87d8diivy1A-tlS-Pn_BcuBWn5hh-dUhFnGM0jWUqeSXHUvIaQDGLZSLpdIpoZVtTtNTFZMkMb6XUwbzUzWBUXhFGO5bjA375kV0P_fWKJ0mvjn-t9VLhwHlCXEw86jqkfLGgvLA5eO4PYWleKNqonMhI7zu0-s53n3DO9S4c78pYwHOAsMNMImJHlRKRJcN46IXVxKfbgySuxov937BuTdWcTKIxg"' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer add + Connection: + - keep-alive + Content-Length: + - '3399' + Content-Type: + - application/json + ParameterSetName: + - -n -g --signer + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://att1000002.wus.attest.azure.net/certificates:add?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MWplMm53bndxcWlkdi53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNTMsImlhdCI6MTcwMjAyMDc1MywiaXNzIjoiaHR0cHM6Ly9hdHQxamUybndud3FxaWR2Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzUzLCJ4LW1zLWNlcnRpZmljYXRlLXRodW1icHJpbnQiOiI4MUVENkZDNzI5RjZGMjYzMTIwNzgwQUM2RDY3ODg5M0U3MDRDQzlDIiwieC1tcy1wb2xpY3ljZXJ0aWZpY2F0ZXMtcmVzdWx0IjoiSXNQcmVzZW50In0.qu6ocS29A_C5u_sPnVENYmLSnovF4nRXwuwHU3v7r1DcvpkVxqVoB4cEQJ-Puy8qgajoXGnZvC4Sb5r-qV17dE1MXHKuLZL-B83QpfPSY7EHlR4t2awfQiMmT9S9etwI5r72iX2Bbhn5B4fu0Aud-7juGPkzD1YqPRrAgSkO5cS6QPHisnEW-IG3F-vHuY32L6kYUcM6Ik1DDnN7f0H1WHlTiqZLn1ZRCFHXYslUAc7WLw52EWuS8eIuhCl5jrfIDmGUiUMYbaQrmVM2Qr2MCvqi19Jvp6Ir4K74KC7GNHDUOSWHSZa9ZbWcEC8ScqVFjTXzxYlUB-k4TTXejPl0Eg"}' + headers: + content-length: + - '842' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:32 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer list + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer list + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att1000002.wus.attest.azure.net/certificates?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MWplMm53bndxcWlkdi53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNTYsImlhdCI6MTcwMjAyMDc1NiwiaXNzIjoiaHR0cHM6Ly9hdHQxamUybndud3FxaWR2Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzU2LCJ4LW1z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C9rKtOl6yrojGGgGKVO_bZhB1OZZYsKjSUxnRFugy0ohNxYSEb1DyoCEzgdVw1mRvSP5-TAj7rKcsCbdJ_jfT6_Cwx2on3hLKWhY_QAncZQJlq-uOeCIb6sl87-CcOG0-X1vd6DMr15N6-uFcOO2DqC97UwaZwrKBQJYJwakvnK7qgCjkmmztv8gYr5l6t_XzokaQBE15b2kfjiWz-_hvjw22pbg_eSrfjnmGuPvKf7xk9U1mLyG47JMh_O9ogyC3tUoeVoysMQ_f3PlCtCYSYS-BxOF9IW3J0XylYipJrrsm8CWpvsnP-gKA"}' + headers: + content-length: + - '3821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:35 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer remove + Connection: + - keep-alive + ParameterSetName: + - -n -g --signer + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - n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GwSZy3R69ls-RG1JZco6A3AA3Ale9NE5YIW9AkujpV8o3dGjhSLQLpYpO5pl-uriKMAs1d9nVWQ2p3t87d8diivy1A-tlS-Pn_BcuBWn5hh-dUhFnGM0jWUqeSXHUvIaQDGLZSLpdIpoZVtTtNTFZMkMb6XUwbzUzWBUXhFGO5bjA375kV0P_fWKJ0mvjn-t9VLhwHlCXEw86jqkfLGgvLA5eO4PYWleKNqonMhI7zu0-s53n3DO9S4c78pYwHOAsMNMImJHlRKRJcN46IXVxKfbgySuxov937BuTdWcTKIxg"' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer remove + Connection: + - keep-alive + Content-Length: + - '3399' + Content-Type: + - application/json + ParameterSetName: + - -n -g --signer + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://att1000002.wus.attest.azure.net/certificates:remove?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MWplMm53bndxcWlkdi53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNTksImlhdCI6MTcwMjAyMDc1OSwiaXNzIjoiaHR0cHM6Ly9hdHQxamUybndud3FxaWR2Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzU5LCJ4LW1zLWNlcnRpZmljYXRlLXRodW1icHJpbnQiOiI4MUVENkZDNzI5RjZGMjYzMTIwNzgwQUM2RDY3ODg5M0U3MDRDQzlDIiwieC1tcy1wb2xpY3ljZXJ0aWZpY2F0ZXMtcmVzdWx0IjoiSXNBYnNlbnQifQ.DZukh7GZJy18A_lok8e2gS3E4idYSuqTu3BP_KF-kGGYR9RuT5_SkJ-EMtUOb-afGtgV4LYnILYDCFcJW4jisJvk43SIw23ym8U_yTm74vRO8bzDErElbjzuphfgGAa6inEz7roILBilFWcfy2IbjEZDK9iLvGeXp_2fOMYGmOYlfpETjBDCHrjXlKzSVnnePmheFm2_zVE0F7_jcmvPGO6Kcc7N65hRCTY26PylBNQWsa5-rGFx4FqTBezhtC-2R2CPmrNIZuSM6kr1ifOuLgKRefdhmP3s-DuesSLw51NDXzoGIzqbyHNsu4y5Cu4DT0ohg8daG6s9lJpMq6eW-Q"}' + headers: + content-length: + - '841' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:38 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer remove + Connection: + - keep-alive + ParameterSetName: + - -n -g --signer + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002","name":"att1000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att1000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation signer remove + Connection: + - keep-alive + ParameterSetName: + - -n -g --signer + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att1000002.wus.attest.azure.net/certificates?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MWplMm53bndxcWlkdi53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNjEsImlhdCI6MTcwMjAyMDc2MSwiaXNzIjoiaHR0cHM6Ly9hdHQxamUybndud3FxaWR2Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzYxLCJ4LW1zLXBvbGljeS1jZXJ0aWZpY2F0ZXMiOnsia2V5cyI6W3siYWxnIjoiUlMyNTYiLCJrdHkiOiJSU0EiLCJ1c2UiOiJzaWciLCJ4NWMiOlsiTUlJRFJqQ0NBaTZnQXdJQkFnSUlRRHdVVUd3Y1dLc3dEUVlKS29aSWh2Y05BUUVMQlFBd0h6RWRNQnNHQTFVRUF3d1VUV0ZoVDNKcFoybHVZV3hVWlhOMFEyVnlkREV3SUJjTk1qTXhNakF4TURBd01EQXdXaGdQTWpBM016RXlNREV3TURBd01EQmFNQjh4SFRBYkJnTlZCQU1NRkUxaFlVOXlhV2RwYm1Gc1ZHVnpkRU5sY25ReE1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBckh6NDEvOHpRK2VnRUIrOWV2VU1JUVBtclhSNXV5ZVhKQzNSTkZWVjBCVDRPQ0ZZV25qN0F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c1ZGdZSVU2V2dLcE9xZy91WU13MGt2d0JNU0k4WHBneWRKSVl4TTV2NXd0UT0iXX1dfX0.eeokWLvm2C3Dsb--pV0tIWIoj0YWiyiwSK4MPrhodhtUCwtdDA6-YA5ZuR2d8U8JmdLzexvdXKHovIp7TPBg-i4SkFIM_o55ntcGF5NfrlWr0qOb5LyHgy7c9yq_c-3ZIu28mXUF0lcVEwYRwhsmgtbGT2stngQ_tMK5S87BpZhsy6_7clyExyMEcZM_ZSjLj6MBxXstKAz0bgXKI03SqRhg9yUleScsnEevPychzk95W0TQFGHGS0JaiVfgGPsRcse1anaIDBq2MFJcJMACz0dyeabEYK74X8lJOhTanCSPiOvltSU0HTiWJNHB0wUNcjHOQT2HjBiTrc5pDRYnyA"}' + headers: + content-length: + - '2302' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:41 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att1000002?api-version=2020-10-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 08 Dec 2023 07:32:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +version: 1 diff --git a/src/attestation/azext_attestation/tests/latest/recordings/test_provider_with_signer_2.yaml b/src/attestation/azext_attestation/tests/latest/recordings/test_provider_with_signer_2.yaml new file mode 100644 index 00000000000..9d6d3f4f382 --- /dev/null +++ b/src/attestation/azext_attestation/tests/latest/recordings/test_provider_with_signer_2.yaml @@ -0,0 +1,399 @@ +interactions: +- request: + body: '{"location": "westus", "properties": {"policySigningCertificates": {"keys": + [{"alg": "RS256", "kty": "RSA", "use": "sig", "x5c": ["MIIDRjCCAi6gAwIBAgIIJcdZv4O76ywwDQYJKoZIhvcNAQELBQAwHzEdMBsGA1UEAwwUTWFhT3JpZ2luYWxUZXN0Q2VydDEwIBcNMjMxMjA0MDAwMDAwWhgPMjA3MzEyMDQwMDAwMDBaMB8xHTAbBgNVBAMMFE1hYU9yaWdpbmFsVGVzdENlcnQxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlwu79hWYy2//Biu1GYtL1LA0EbUel2N1Ij8LeRUJE6UJPDZvesuw03KdWZIcG49oesCWAmvVrbeph0vOtnZi02EBEwIHak8vs0OX8J06gBRADCZ64IzqG+UpGHVt9yc01I+gI+yMJb8161VFwDym/XwY/6KAFi64W0sofTD2f77tgz2x8Kkl4mX8QUjvEafNDtHGVPfPcWiU/wYWT+x2pSLmnijNl97FPabotLUAEdUYHVVIKDvGxyp2am8+74xeGIb9/GVP6NRJCN/yE3FcMc6qNGoysai9gte//A03uWVIJtDBAccniUrPhenLS352YwSP5LQMfqTiIShIBVM5BwIDAQABo4GDMIGAME4GA1UdIwRHMEWAFFFlFjpkdDB5nEgUMuK25bzbSpLVoSOkITAfMR0wGwYDVQQDDBRNYWFPcmlnaW5hbFRlc3RDZXJ0MYIIJcdZv4O76ywwHQYDVR0OBBYEFFFlFjpkdDB5nEgUMuK25bzbSpLVMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABCUBWBQIg5jc5d3F/EJeP8pq2LwvcFDD753TbGKx7TsaHHgphACnKOCSpREiftsiR5Oic487MYwfFUWB0pgCFc6iWzUV5sRtSHDo4NuA5psgnDcYBnh6TuVfpGArXvHON0K4QbO56fN4xfmfDC4dohuH5OaCwiKK5K1Qb+s5gqo1bwvOMn4cA5A0KtPsdyG2skhVV4o6sF9ChytlVhtC5zDO5Fy0YKBwYtPXzcAL9FauAxLNTFq4Cuye44h2FwfQRON7qkYzxPOMaCU8GMUB8Jf+9AkucwmvF50L40yZCFx9hqAoTcSMo5e2rc7yOyo+TetRpyAqkQ9bFCAdVEf2aU="]}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation create + Connection: + - keep-alive + Content-Length: + - '1262' + Content-Type: + - application/json + ParameterSetName: + - -l -n -g --certs-input-path + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002","name":"att2000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att2000002.wus.attest.azure.net"}}' + headers: + cache-control: + - no-cache + content-length: + - '355' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:10 GMT + expires: + - '-1' + location: + - https://att2000002.wus.attest.azure.net/ + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy show + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002","name":"att2000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att2000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy show + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att2000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MmpneDJ2bmxsY2Yycy53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzMzUsImlhdCI6MTcwMjAyMDczNSwiaXNzIjoiaHR0cHM6Ly9hdHQyamd4Mn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VhwYU0yZDBZMGhLZGxwSVZtcGtRekZ3V2tOS1pFbEVNQzFKUjJ4Nll6TldiRXRJVWpWalIxVTVTVzVDZVdJeVVqRlpNMUYwWVZkUmFVeERRakpaVjNneFdsUXhha3h1V21oaVNGWnNTMVIwYWs5c2REQmxXRUpzVUZRd2FXVkRNWFJqZVRGNldqTm5kR016V25WSmJEQm5VRlEwWjJGWVRucGtWMVZ2WkVoc2QxcFVNR2xqTTFwMVNXbDNaMlJ0Um5Oa1YxVTVXWGsxTWxsWGVERmFVMnMzV1hwd1ltUkliSGRhVkRBNVNXNW5kR0pZVFhSWldGSXdXbGhPTUZsWVVuQmlNalIwWkVoc2QxcFRTbVJKUkRBdFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVVteGFVMGx6U1VoYWFHSklWbXhRVjAxMVpHMUdjMlJYVlhCUE16QTNJbjAuIn0.anzafp6cCktrFMmgoSeMKVhiQOI7G5CTrdQ-pDP8sfO52uihir1S6ckxuPxESIdGor-euWNQfQju0BfmGjL6KgBusGWATy2SiCQGIt0RkR29JLQeSs8NB7AuAwVZ6lFg7iRgvpq5m3eAtsW_mWyvZ7h9sNZcoH2dRm8b3tIWXNgJeE-55WxezwDA3zKq0MtchooGfbXMPTQ2adazLKi8RSTcHj0FqcYTrx_EOKKZ3FAkxceEGimQVG7CuuNN_jy2kk9AMcqT4blqFD_2MgV2thFlGcpEnRkZpIYF-4yT1Sqr-D8AA69-k0LQHuEbghezNdI_XOZA7ir1vHQr2ATYsA"}' + headers: + content-length: + - '2158' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:15 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002","name":"att2000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att2000002.wus.attest.azure.net"}}' + headers: + cache-control: + - no-cache + content-length: + - '355' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002","name":"att2000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att2000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyAiYWxnIjoiUlMyNTYiLCAieDVjIjogWyJNSUlEUmpDQ0FpNmdBd0lCQWdJSUpjZFp2NE83Nnl3d0RRWUpLb1pJaHZjTkFRRUxCUUF3SHpFZE1Cc0dBMVVFQXd3VVRXRmhUM0pwWjJsdVlXeFVaWE4wUTJWeWRERXdJQmNOTWpNeE1qQTBNREF3TURBd1doZ1BNakEzTXpFeU1EUXdNREF3TURCYU1COHhIVEFiQmdOVkJBTU1GRTFoWVU5eWFXZHBibUZzVkdWemRFTmxjblF4TUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFsd3U3OWhXWXkyLy9CaXUxR1l0TDFMQTBFYlVlbDJOMUlqOExlUlVKRTZVSlBEWnZlc3V3MDNLZFdaSWNHNDlvZXNDV0FtdlZyYmVwaDB2T3RuWmkwMkVCRXdJSGFrOHZzME9YOEowNmdCUkFEQ1o2NEl6cUcrVXBHSFZ0OXljMDFJK2dJK3lNSmI4MTYxVkZ3RHltL1h3WS82S0FGaTY0VzBzb2ZURDJmNzd0Z3oyeDhLa2w0bVg4UVVqdkVhZk5EdEhHVlBmUGNXaVUvd1lXVCt4MnBTTG1uaWpObDk3RlBhYm90TFVBRWRVWUhWVklLRHZHeHlwMmFtOCs3NHhlR0liOS9HVlA2TlJKQ04veUUzRmNNYzZxTkdveXNhaTlndGUvL0EwM3VXVklKdERCQWNjbmlVclBoZW5MUzM1Mll3U1A1TFFNZnFUaUlTaElCVk01QndJREFRQUJvNEdETUlHQU1FNEdBMVVkSXdSSE1FV0FGRkZsRmpwa2REQjVuRWdVTXVLMjViemJTcExWb1NPa0lUQWZNUjB3R3dZRFZRUUREQlJOWVdGUGNt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V1U5WXk1MllXeDFaU2s3WXpwYmRIbHdaVDA5SWlSelozZ3RiWEpsYm1Oc1lYWmxJbDBnUFQ0Z2FYTnpkV1VvZEhsd1pUMGljMmQ0TFcxeVpXNWpiR0YyWlNJc0lIWmhiSFZsUFdNdWRtRnNkV1VwTzJNNlczUjVjR1U5UFNJa2NISnZaSFZqZEMxcFpDSmRJRDAtSUdsemMzVmxLSFI1Y0dVOUluQnliMlIxWTNRdGFXUWlMQ0IyWVd4MVpUMWpMblpoYkhWbEtUdGpPbHQwZVhCbFBUMGlKSE4yYmlKZElEMC1JR2x6YzNWbEtIUjVjR1U5SW5OMmJpSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtkR1ZsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpZEdWbElpd2dkbUZzZFdVOVl5NTJZV3gxWlNrN2ZUcyJ9.lUzO5dDT6NcjwqdkxQiwFOkOBOfssucghqSF5AgUacMmlCN9ssiudLWgMTCnGlr2UoKN674Egl2GL8wPcPc3_Ph8syJKmXpOSLgY57zfO2LSSFrD3ZRbB-RkwIM_d9v7545_5cZIQD2gyql4MUATXYKAk3cvmQR1aK5n1rNwqWbesSAOZz-RhVjiYl5I5vsWIVMCy6qM4UyCQki-UNQ2upp1R1ExBMLswfIDjKZxVptkW9jG7A3CdgqAl8jtxYvetkcqe3fEOs9-D_zonHgcKqvyRRp2qw5R8hKaFxeTg311yi_L7xIWehGeOZofBckmweUPNs7LC6mo55e9lnyOhw"' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + Content-Length: + - '2768' + Content-Type: + - application/json + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://att2000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: +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9bjOfaybVJwtFpjN-sAHqEm1k4tVhucpNQUWzJIRHxRPk3hrUtOlrgnBQtK8tEQxSZNl2LjRKipqTn_ypy8wTW3Pgf1N3A7i2kq6T1JL7-UCzQ1YrDU011V3ACoWzSTcazph-hEq9d6BUruu-9QYzl4FQbT3VD0wYgmK3N9Ia-xMPnMGQQbE378UiKIPkEMHDp8FajWnPGOkZpoYV4OBlG2ZLMhpciKP3jJy6BFSere9LNTpAQrfmwQoL4nKg563OPgOpQWQLTS9nb6iMEt_jV3M7Gwo_x5GPNh7Nds9h8SKqGQ"}' + headers: + content-length: + - '2415' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:19 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002","name":"att2000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"Isolated","status":"Ready","attestUri":"https://att2000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '418' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att2000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0MmpneDJ2bmxsY2Yycy53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNDIsImlhdCI6MTcwMjAyMDc0MiwiaXNzIjoiaHR0cHM6Ly9hdHQyamd4MnZubGxjZjJzLnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzQyLCJ4LW1zLXBvbGljeSI6ImV5QWlZV3huSWpvaVVsTXlOVFlpTENBaWVEVmpJam9nV3lKTlNVbEVVbXBEUTBGcE5tZEJkMGxDUVdkSlNVcGpaRnAyTkU4M05ubDNkMFJSV1VwTGIxcEphSFpqVGtGUlJVeENVVUYzU0hwRlpFMUNjMGRCTVZWRlFYZDNWVlJYUm1oVU0wcHdXakpzZFZsWGVGVmFXRTR3VVRKV2VXUkVSWGRKUW1OT1RXcE5lRTFxUVRCTlJFRjNUVVJCZDFkb1oxQk5ha0V6VFhwRmVVMUVVWGROUkVGM1RVUkNZVTFDT0hoSVZFRmlRbWRPVmtKQlRVMUdSVEZvV1ZVNWVXRlhaSEJpYlVaelZrZFdlbVJGVG14amJsRjRUVWxKUWtscVFVNUNaMnR4YUd0cFJ6bDNNRUpCVVVWR1FVRlBRM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EX3pvbkhnY0txdnlSUnAycXc1UjhoS2FGeGVUZzMxMXlpX0w3eElXZWhHZU9ab2ZCY2ttd2VVUE5zN0xDNm1vNTVlOWxueU9odyJ9.kUB5QUa7Q4hNu1RgfSJrQfzI70Dh90FCDgUa5lYt1emyQUyh4hYHRHYEwK5Bke9kBV3o2NLIc8Me1Hu4duWffpxc3caBVEnV2rpkzpmSADwLS8TGqYI1AmJNH-oSW1Por6O8bNAoF2Y8g0YeiosxBTTGcNzJhoChbFmLsDSDombvRU0eNZwkkc-P-DDjZFHY2gS_wzQrTv9eluYIW-FA8dQK2cxAjxMjlFFSWPh99vc6AooEWV8-hdqhw8o9csNESlrPK-ufc06QN377_rc4FVteYCLM4niWxOWwpClH7RwvTx-PFlZgSVwDCXFKdCbpY0Vyu6ID6jwAoxwtJWsGLw"}' + headers: + content-length: + - '4395' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:22 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att2000002?api-version=2020-10-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 08 Dec 2023 07:32:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +version: 1 diff --git a/src/attestation/azext_attestation/tests/latest/recordings/test_provider_without_signer.yaml b/src/attestation/azext_attestation/tests/latest/recordings/test_provider_without_signer.yaml new file mode 100644 index 00000000000..1bed75bf053 --- /dev/null +++ b/src/attestation/azext_attestation/tests/latest/recordings/test_provider_without_signer.yaml @@ -0,0 +1,1215 @@ +interactions: +- request: + body: '{"location": "westus", "properties": {"policySigningCertificates": {"keys": + []}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation create + Connection: + - keep-alive + Content-Length: + - '81' + Content-Type: + - application/json + ParameterSetName: + - -l -n -g + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:11 GMT + expires: + - '-1' + location: + - https://att3000002.wus.attest.azure.net/ + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy show + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy show + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzMzUsImlhdCI6MTcwMjAyMDczNSwiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNz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J4Nll6TldiRXRJVWpWalIxVTVTVzVDZVdJeVVqRlpNMUYwWVZkUmFVeERRakpaVjNneFdsUXhha3h1V21oaVNGWnNTMVIwYWs5c2REQmxXRUpzVUZRd2FXVkRNWFJqZVRGNldqTm5kR016V25WSmJEQm5VRlEwWjJGWVRucGtWMVZ2WkVoc2QxcFVNR2xqTTFwMVNXbDNaMlJ0Um5Oa1YxVTVXWGsxTWxsWGVERmFVMnMzV1hwd1ltUkliSGRhVkRBNVNXNW5kR0pZVFhSWldGSXdXbGhPTUZsWVVuQmlNalIwWkVoc2QxcFRTbVJKUkRBdFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVVteGFVMGx6U1VoYWFHSklWbXhRVjAxMVpHMUdjMlJYVlhCUE16QTNJbjAuIn0.WTDNzG9kBT8nLkztgDHg6Xox3HExRGLlAe8F7bU1gDK8TZ264ckj9QXWb9wu1UXMim4x6OBRhW-vfTEEE_OBViTubZaXxXdlr2FNyJ5ObuurzZl-D51hl6AHjUogW1Ja-mueY4qL8Oma5HfeVlM4hn_rAqetz05OjfyZFlh_EJCrIVxWPwDyFJ2cF4dZ5UEPKCcDgthJaIGPqNXtGt01u63GKxfa47Wcfc7TuXokuBzEX88RotrZZh5-38S4ffIvnKIzuvQBHm_mOgVt2ha0SNuHdH0b0aFU6dluAAraIV9hwbkgvXJtI5WC7NfyB7MzLNDYURp20vbE6WC8kpB4uw"}' + headers: + content-length: + - '2158' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:14 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ImRtVnljMmx2YmowZ01TNHdPd3BoZFhSb2IzSnBlbUYwYVc5dWNuVnNaWE1nZXdwYklIUjVjR1U5UFNJa2FYTXRaR1ZpZFdkbllXSnNaU0lzSUhaaGJIVmxQVDFtWVd4elpTQmRDaVltSUZzZ2RIbHdaVDA5SWlSd2NtOWtkV04wTFdsa0lpd2dkbUZzZFdVOVBUUTJNemtnWFFvbUppQmJJSFI1Y0dVOVBTSWtiV2x1TFhOMmJpSXNJSFpoYkhWbFBqMGdNQ0JkQ2lZbUlGc2dkSGx3WlQwOUlpUnpaM2d0YlhKemFXZHVaWElpTENCMllXeDFaVDA5SWtVek1VTTVSVFV3TlVZek4wRTFPRVJGTURrek16VXdOelZHUXpnMU9URXlOVFF6TVRORlFqSXdRa0l4UVRJM1JUVTBORE5EUXpRMU1FSTJSVE16UlRVaVhRbzlQaUJ3WlhKdGFYUW9LVHNLZlRzS0lHbHpjM1ZoYm1ObGNuVnNaWE1nZXdwak9sc2dkSGx3WlQwOUlpUnpaM2d0YlhKemFXZHVaWElpSUYwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXljMmxuYm1WeUlpd0tkbUZzZFdVOVl5NTJZV3gxWlNrN0NpQmpNVHBiZEhsd1pUMDlJbTFoWVMxbGFHUWlYU0E5UGlCcGMzTjFaU2gwZVhCbFBTSmhZWE10Wldoa0lpd2dkbUZzZFdVOVl6RXVkbUZzZFdVcE93b2dmVHNLQ2cifQ."' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + Content-Length: + - '837' + Content-Type: + - application/json + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzMzksImlhdCI6MTcwMjAyMDczOSwiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzM5LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJVcGRhdGVkIiwieC1tcy1wb2xpY3ktdG9rZW4taGFzaCI6IjRPd2tSa1JXUEZiX2tEME9MejRjUnZWQU5DMlp4Q21hS2VDRWgzbDV1aFEifQ.iNmLKiOJ2l37b26jxReLND5Is3OaYUasM7X3ZdYEipOpOvHF6Pn-C-6mnGx-ieE-Q28Oo-xVobUQYE6xmxb79TotXhaiEdJ1iM1r-lWLVs_sjFfCtk-egbiReCWSQjWe3y120sE8UfkdJak-VMQ5j6rlVZnSllzyu-S3w92rQfUX3xO0BPLXpPdjeNY8V2YHDsiJe36NbmKiIVukNKPbkkdeY2y-pzOd46KD0mqiPRFH075I-9AnN84wLKLADLhCRNxaNnmWNSbLh8P06csT6zsQ4Gf_irjlzF1GMySHfj58jFiZNwHV7wzt4oUjETZu37X9bCq_5smQSy_TfyyHTQ"}' + headers: + content-length: + - '821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:19 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjo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nBZekprTkV4WE1YbGpNbXh1WW0xV2VVbHBkMHRrYlVaelpGZFZPVmw1TlRKWlYzZ3hXbE5yTjBOcFFtcE5WSEJpWkVoc2QxcFVNRGxKYlRGb1dWTXhiR0ZIVVdsWVUwRTVVR2xDY0dNelRqRmFVMmd3WlZoQ2JGQlRTbWhaV0UxMFdsZG9hMGxwZDJka2JVWnpaRmRWT1ZsNlJYVmtiVVp6WkZkVmNFOTNiMmRtVkhOTFEyY2lmUS4ifQ.Vn01fXpkPnVj6TeCJqy0JRMoL4HqVCSzm5NemN3uQE3TnF5a2b-PMGNUC90h2Szhpdwe92ik1yWTO73_jQuhVv3hG8HbS7ASCrm4IIROqF1VNZTgHbLAmMInVyUppq0NxOa1G0z7IRdNBStWIAbDr_eR66MzGjT_0J9vNBFX8bLyu9pj9wpqIkTjLA3gx4C5V8otfkrI-Q_Io9OJ9C-dT5W9ycW6OG9gyslQ8kCHnwVeJQILwSb8Ox6-Q3pH5uBsHUpNSHyXQ6FmILXVwxqubYZ262YOmAvk-QGuo3VQyeTUIl6CLOf-UMJD8TwWUfiqbM1DCKYI1DcVkMLJ5KEAiQ"}' + headers: + content-length: + - '1821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:22 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ICJkbVZ5YzJsdmJqMGdNUzR3TzJGMWRHaHZjbWw2WVhScGIyNXlkV3hsYzN0ak9sdDBlWEJsUFQwaUpHbHpMV1JsWW5WbloyRmliR1VpWFNBOVBpQndaWEp0YVhRb0tUdDlPMmx6YzNWaGJtTmxjblZzWlhON1l6cGJkSGx3WlQwOUlpUnBjeTFrWldKMVoyZGhZbXhsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYVhNdFpHVmlkV2RuWVdKc1pTSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtjMmQ0TFcxeWMybG5ibVZ5SWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXljMmxuYm1WeUlpd2dkbUZzZFdVOVl5NTJZV3gxWlNrN1l6cGJkSGx3WlQwOUlpUnpaM2d0YlhKbGJtTnNZWFpsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXlaVzVqYkdGMlpTSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtjSEp2WkhWamRDMXBaQ0pkSUQwLUlHbHpjM1ZsS0hSNWNHVTlJbkJ5YjJSMVkzUXRhV1FpTENCMllXeDFaVDFqTG5aaGJIVmxLVHRqT2x0MGVYQmxQVDBpSkhOMmJpSmRJRDAtSUdsemMzVmxLSFI1Y0dVOUluTjJiaUlzSUhaaGJIVmxQV011ZG1Gc2RXVXBPMk02VzNSNWNHVTlQU0lrZEdWbElsMGdQVDRnYVhOemRXVW9kSGx3WlQwaWRHVmxJaXdnZG1Gc2RXVTlZeTUyWVd4MVpTazdmVHMifQ."' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + Content-Length: + - '909' + Content-Type: + - application/json + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNDcsImlhdCI6MTcwMjAyMDc0NywiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzQ3LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJVcGRhdGVkIiwieC1tcy1wb2xpY3ktdG9rZW4taGFzaCI6IlQ5cDdub19xaVNnQ1U1bUNRby02M1VXeUxaX1NHLXNLWHU4Y0NtM1ozTG8ifQ.YqxmgrD-hOLmN9PYU04c_H9P72IZuXq_yQvfbDabAYjpOymavSijBShrEBICe1IIqRUNrEpaQVWzaKZKeZIesqFjCrh9fggVoAuTxp5gZDlcP0ZiWw8qTLa7FGvsWDc0lnmY_3wzlpf433G4EKBMg8ybdjeB0OKnBSKjPABte7hoWMPXiRIekHNBq_oNxrkhLtqTze9NkXKddAFIeQdvmERn548omFhfk-mLLVOaJLpmeh2XZ7HYQKYrEDMIwRf0mokvXgtpyChopNJ0oicN7Fs9JwMAuOEiHc7C9JqIQfJ0lbGtGpyuo37ZLc_rOyi9XLQzPGOSN1IghR_yglFzAQ"}' + headers: + content-length: + - '821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:27 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwM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wVEVOQ01sbFhlREZhVkRGcVRHNWFhR0pJVm14TFZIUnFUMngwTUdWWVFteFFWREJwU2toT01tSnBTbVJKUkRBdFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVRqSmlhVWx6U1VoYWFHSklWbXhRVjAxMVpHMUdjMlJYVlhCUE1rMDJWek5TTldOSFZUbFFVMGxyWkVkV2JFbHNNR2RRVkRSbllWaE9lbVJYVlc5a1NHeDNXbFF3YVdSSFZteEphWGRuWkcxR2MyUlhWVGxaZVRVeVdWZDRNVnBUYXpkbVZITWlmUS4ifQ.mMdVduXleqzZdMRcpcftsoQz4K7wtp6djqymmlU0FXM0TFxWOtQwIgS78v5JoeNZE1nndttr51nZV3ygZyjEArMazIy7q0TxgsApqKuVN5s60cphOUjXers_MyZft6K6-nNE2LwkNZiXvrguYelmJCuPmS7kXdLocc__jOEJcj5kDB4gdGj3dzk3gsiiMDXJIyCQCVHPextC7DPq0UTVCPc5Ar8R_Fxpi6A81poKXcTVIWweR1dlMx8QY-JKawJ_6QELTbGeI8eUWSARAx743dF1MMEoGI7VtxDhmzDbxceJkIDHmMcJD17-yhYcPUwLzTcYH7rkijwegJ7D2_E9uw"}' + headers: + content-length: + - '1917' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:30 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ImRtVnljMmx2YmowZ01TNHdPd3BoZFhSb2IzSnBlbUYwYVc5dWNuVnNaWE1nZXdwYklIUjVjR1U5UFNJa2FYTXRaR1ZpZFdkbllXSnNaU0lzSUhaaGJIVmxQVDFtWVd4elpTQmRDaVltSUZzZ2RIbHdaVDA5SWlSd2NtOWtkV04wTFdsa0lpd2dkbUZzZFdVOVBUUTJNemtnWFFvbUppQmJJSFI1Y0dVOVBTSWtiV2x1TFhOMmJpSXNJSFpoYkhWbFBqMGdNQ0JkQ2lZbUlGc2dkSGx3WlQwOUlpUnpaM2d0YlhKemFXZHVaWElpTENCMllXeDFaVDA5SWtVek1VTTVSVFV3TlVZek4wRTFPRVJGTURrek16VXdOelZHUXpnMU9URXlOVFF6TVRORlFqSXdRa0l4UVRJM1JUVTBORE5EUXpRMU1FSTJSVE16UlRVaVhRbzlQaUJ3WlhKdGFYUW9LVHNLZlRzS0lHbHpjM1ZoYm1ObGNuVnNaWE1nZXdwak9sc2dkSGx3WlQwOUlpUnpaM2d0YlhKemFXZHVaWElpSUYwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXljMmxuYm1WeUlpd0tkbUZzZFdVOVl5NTJZV3gxWlNrN0NpQmpNVHBiZEhsd1pUMDlJbTFoWVMxbGFHUWlYU0E5UGlCcGMzTjFaU2gwZVhCbFBTSmhZWE10Wldoa0lpd2dkbUZzZFdVOVl6RXVkbUZzZFdVcE93b2dmVHNLQ2cifQ."' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + Content-Length: + - '837' + Content-Type: + - application/json + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNTUsImlhdCI6MTcwMjAyMDc1NSwiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzU1LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJVcGRhdGVkIiwieC1tcy1wb2xpY3ktdG9rZW4taGFzaCI6IjRPd2tSa1JXUEZiX2tEME9MejRjUnZWQU5DMlp4Q21hS2VDRWgzbDV1aFEifQ.pYNQ1Du-ISmxM_sbLvE0fu_rDE3m2fMNXPcGS8QytsrfgA8grE5huzeyKMKCVC6-OjJX0Ao7BVTXPT0z86cU8yN6i1ASqXKeP9jfU0ttFTF25ZQ2XGRQ22fqYj42653cDhZT-4_HUsf-h7XP3RB9R68aTUbuZ7DZyWQ1InwfY2sUReHKCe-VDwSyDYyy_175a7N8tkiBRmgRjis-Dh1OiH-bZSBg2wSn2yuGMv1sDmklnpDPVltsUjgz9iMWJ-achmJcuIr4bWAlF4RHhArIvN6Mtph0iGcly4ATytLUtrGCAOID8eNmMJXBD_SjcZCzYquml_Ni8PVYEH9o-j2KcA"}' + headers: + content-length: + - '821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:34 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type -f + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNTcsImlhdCI6MTcwMjAyMDc1NywiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1cy5hdHRlc3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hiR0ZIVVdsWVUwRTVVR2xDY0dNelRqRmFVMmd3WlZoQ2JGQlRTbWhaV0UxMFdsZG9hMGxwZDJka2JVWnpaRmRWT1ZsNlJYVmtiVVp6WkZkVmNFOTNiMmRtVkhOTFEyY2lmUS4ifQ.Y7EOCWKM6CkQ6hHMWCPqmdTZ6Igjx4qcZALYJI2FPcZZy741W2dl3Gj1RrWyNevWH-cTPXsY58CiRl8Su03Ejb6DL7aZRGNCARKX6Q9ihGQIQqANflqindQiqszhvDziTT7RJEn_3hmWegmJxED3UP5yWomVMS4DKZQMB_17knytvsrOwZ56Cg9u1548rVpO0k9QZfm3TCjRbIKmEtYyPylpxhrZuAwidEwakHMLZIn-7PwBhAqXEtztRAxTwsE6OKudR4l-eBU-Qgdy_3K3cx2-8wZ9wqY04rbEjLGd2R-sMVMekq0Mcz7WZb3rhXjj8-cOS3xOZQfiM7y_JOdI4g"}' + headers: + content-length: + - '1821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:37 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type --new-attestation-policy --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type --new-attestation-policy --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ICJkbVZ5YzJsdmJqMGdNUzR3TzJGMWRHaHZjbWw2WVhScGIyNXlkV3hsYzN0ak9sdDBlWEJsUFQwaUpHbHpMV1JsWW5WbloyRmliR1VpWFNBOVBpQndaWEp0YVhRb0tUdDlPMmx6YzNWaGJtTmxjblZzWlhON1l6cGJkSGx3WlQwOUlpUnBjeTFrWldKMVoyZGhZbXhsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYVhNdFpHVmlkV2RuWVdKc1pTSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtjMmQ0TFcxeWMybG5ibVZ5SWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXljMmxuYm1WeUlpd2dkbUZzZFdVOVl5NTJZV3gxWlNrN1l6cGJkSGx3WlQwOUlpUnpaM2d0YlhKbGJtTnNZWFpsSWwwZ1BUNGdhWE56ZFdVb2RIbHdaVDBpYzJkNExXMXlaVzVqYkdGMlpTSXNJSFpoYkhWbFBXTXVkbUZzZFdVcE8yTTZXM1I1Y0dVOVBTSWtjSEp2WkhWamRDMXBaQ0pkSUQwLUlHbHpjM1ZsS0hSNWNHVTlJbkJ5YjJSMVkzUXRhV1FpTENCMllXeDFaVDFqTG5aaGJIVmxLVHRqT2x0MGVYQmxQVDBpSkhOMmJpSmRJRDAtSUdsemMzVmxLSFI1Y0dVOUluTjJiaUlzSUhaaGJIVmxQV011ZG1Gc2RXVXBPMk02VzNSNWNHVTlQU0lrZEdWbElsMGdQVDRnYVhOemRXVW9kSGx3WlQwaWRHVmxJaXdnZG1Gc2RXVTlZeTUyWVd4MVpTazdmVHMifQ."' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + Content-Length: + - '909' + Content-Type: + - application/json + ParameterSetName: + - -n -g --attestation-type --new-attestation-policy --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNjIsImlhdCI6MTcwMjAyMDc2MiwiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzYyLCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJVcGRhdGVkIiwieC1tcy1wb2xpY3ktdG9rZW4taGFzaCI6IlQ5cDdub19xaVNnQ1U1bUNRby02M1VXeUxaX1NHLXNLWHU4Y0NtM1ozTG8ifQ.WTfQ1xhKFt9wBFs3Rat86LxD9RJVt5yVSpoS1yjiRLdsQJtv8OPECggkQ8rnmmJe2amiX9pMLBeqh2vwoSqVDx-xC7mbt_5TBz3jcGG5SQLAdgeHaMpWkUKXoITM7_Gm4l9UKnzFyI9x_bnYMqwJcp1cc0sE9VMWy3m6CF21blg0oMDpJjAr8_Plz5TYomnNTIe0mrAUmCC9loC5rLShhkOZMC3oH6wwJZPUXIBOuPRXLGeXv78zBAkW0E2v1Obx61RwNUIkpzj-ppl2jXGZNqDQCLKvnTu8AUe-GB3e123re5oD6hW6JBnZtmAx0Ek28L1Q2wO1Jjj8opsMvk_96A"}' + headers: + content-length: + - '821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:41 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type --new-attestation-policy --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy set + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type --new-attestation-policy --policy-format + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNjQsImlhdCI6MTcwMjAyMDc2NCwiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1c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dFNVZHNlbU16Vm14TFNGSTFZMGRWT1VsdVRqSmlhVWx6U1VoYWFHSklWbXhRVjAxMVpHMUdjMlJYVlhCUE1rMDJWek5TTldOSFZUbFFVMGxyWkVkV2JFbHNNR2RRVkRSbllWaE9lbVJYVlc5a1NHeDNXbFF3YVdSSFZteEphWGRuWkcxR2MyUlhWVGxaZVRVeVdWZDRNVnBUYXpkbVZITWlmUS4ifQ.U6RfW2mvVdcydc644tg420YqLeK0NZoPG92o6FydXFI2FH1c3yUqQRPorqlZ6dsvyjpNxl05eSmMFCb1ZzmM_55DZfhrBnT9_d-HlXn7ikjRa6i6tuLtl8US5orGo9YxWT8Ty7m5ARFxV35nkhFU3JYej2bPLXGenAi53N68enUDuKrpAVcrop2K1JHBe61F3DcQ_SAprjv_de1rZ_CMNernQntmSqEhlF6mLh2Q-w01XA1Q_n-vHWeDwhZxUPANcSfXH2BXd1dDV-PbppIEwU5u-HeIRK5mTecrFj1YWOkcelv4ibPyD9QJZ2IWp9hXcK8kOVBODiXxEjMhzQvw3g"}' + headers: + content-length: + - '1917' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:43 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy reset + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: '"eyJhbGciOiJub25lIn0.."' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy reset + Connection: + - keep-alive + Content-Length: + - '23' + Content-Type: + - application/json + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave:reset?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNjcsImlhdCI6MTcwMjAyMDc2NywiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzY3LCJ4LW1zLXBvbGljeS1yZXN1bHQiOiJSZW1vdmVkIn0.m0oe4Y7vcLk6kT9UIZozHIupVqEjFJdRFaH-8UhPxrg8cEcfJz7gFRCEM3KpAfniwH-qcsjClTED2UUJZliDvXC6-9XjbX9Uu1ZC7Y5r1m5HqRQKzU9aKK92jBe0JWX3XBWTVzR_CKcuCg-iiyDunJGZ2isa7XuDK_OZFARP7H8--nwjDqxql95r67_Sn35KQ55k9twgDR_7Tp-d9aQA-rxlyTbEz_Zx3YFDyYI628QrnpbUWtDrpnBtLlyHWIptm9eZNLu8AgxJWRo8KrgIF1MYsSN6IwB3yuP-wJi5xurKV8PT8J3_3fkANwqOg-UGcU2n0lJEu3ALfylLQFb4fA"}' + headers: + content-length: + - '726' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:46 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy reset + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002","name":"att3000002","type":"Microsoft.Attestation/attestationProviders","location":"westus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://att3000002.wus.attest.azure.net","publicNetworkAccess":null,"tpmAttestationAuthentication":null}}' + headers: + cache-control: + - no-cache + content-length: + - '413' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation policy reset + Connection: + - keep-alive + ParameterSetName: + - -n -g --attestation-type + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://att3000002.wus.attest.azure.net/policies/SgxEnclave?api-version=2022-08-01 + response: + body: + string: '{"token":"eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vYXR0M3dhbDVmN2M3bXdxNS53dXMuYXR0ZXN0LmF6dXJlLm5ldC9jZXJ0cyIsImtpZCI6Ilh4UmMydkxoMUU1RnJzTmF3blJIM1B6dUZncWczcTdOdkNkbmpvSkhCR0U9IiwidHlwIjoiSldUIn0.eyJleHAiOjE3MDIwMjQzNzAsImlhdCI6MTcwMjAyMDc3MCwiaXNzIjoiaHR0cHM6Ly9hdHQzd2FsNWY3Yzdtd3E1Lnd1cy5hdHRlc3QuYXp1cmUubmV0IiwibmJmIjoxNzAyMDIwNzcwLCJ4LW1zLXBvbGljeSI6ImV5SmhiR2NpT2lKdWIyNWxJbjAuZXlKQmRIUmxjM1JoZEdsdmJsQnZiR2xqZVNJNkltUnRWbmxqTW14Mlltb3daMDFUTkhoUE1rNTJZbTFhY0ZvelZubFpXRkp3WWpJMWVXUlhlR3hqTTNNNVVHbENjR016VGpGYVdFSjVZak5DYkdOdVVqVkxTRkkxWTBkVk9VbHVaM1JpV0UxMFl6SmtORXhZVW1wWmJXeHJXbGMxTUdGWFduQmFXRWxwVEVOQ01sbFhlREZhVkRCcFRWUkJhVXRVZERsUE1rWXhaRWRvZG1OdGJEWlpXRkp3WWpJMWVXUlhlR3hqTTNNNVVHbENkMXBZU25SaFdGRnZTMVIwT1U4eWJIcGpNMVpvWW0xT2JHTnVWbk5hV0U0M1dYcHdZbVJJYkhkYVZEQTVTVzVuZEdKWVRYUmpNbVEwVEZkc2VreFhVbXhaYmxadVdqSkdhV0pIVldsWVUwRTVVR2xDY0dNelRqRmFVMmd3WlZoQ2JGQlR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pn3EtHyDm6cVWaeiV8aMWhh2_GrpLqsTf-hsOpWNjA_MG6fWjQ1EvTQqkgOrdvIbgePea1hOlUaTBFfal8yRk1qskxYNx6QnQq_zIPQMCc-KbUCqPb2-qaRQ3yc-UFXCGHgf5i5LcKc0EJMK7vUE3BAtwz5ZTDalb2eu3L-h_EQMUeuXW2G_jkJpmQMtCH5chldJQINhZAbaw"}' + headers: + content-length: + - '2158' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Dec 2023 07:32:50 GMT + server: + - Kestrel + x-ms-maa-service-version: + - 1.11.02509.1778 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - attestation delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Attestation/attestationProviders/att3000002?api-version=2020-10-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 08 Dec 2023 07:32:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-maa-service-version: + - 1.11.02509.1778 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +version: 1 diff --git a/src/attestation/azext_attestation/tests/latest/test_attestation_scenario.py b/src/attestation/azext_attestation/tests/latest/test_attestation_scenario.py index 004c49fcbb5..3bfce52eb8d 100644 --- a/src/attestation/azext_attestation/tests/latest/test_attestation_scenario.py +++ b/src/attestation/azext_attestation/tests/latest/test_attestation_scenario.py @@ -9,289 +9,233 @@ # -------------------------------------------------------------------------- import os -import time from azure.cli.testsdk import ScenarioTest -from .. import try_manual, raise_if, calc_coverage +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from azure.cli.testsdk import ResourceGroupPreparer TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) -# Env setup -@try_manual -def setup(test, rg): - test.kwargs.update({ - 'init_cert1_file': os.path.join(TEST_DIR, 'cert_group_1', 'init_cert.pem'), - 'init_cert2_file': os.path.join(TEST_DIR, 'cert_group_2', 'init_cert.pem'), - 'new_signer_jwt_file': os.path.join(TEST_DIR, 'cert_group_1', 'new_signer_jwt.txt'), - 'signed_jwt_policy1_file': os.path.join(TEST_DIR, 'policies', 'signed_jwt_sgx_policy_1.txt'), - 'signed_jwt_policy2_file': os.path.join(TEST_DIR, 'policies', 'signed_jwt_sgx_policy_2.txt'), - 'unsigned_jwt_policy_file': os.path.join(TEST_DIR, 'policies', 'unsigned_jwt_sgx_policy.txt'), - 'text_policy_file': os.path.join(TEST_DIR, 'policies', 'text_sgx_policy.txt'), - 'att1': test.create_random_name('att1', 16), - 'att2': test.create_random_name('att2', 16), - 'att3': test.create_random_name('att3', 16) - }) - - -# EXAMPLE: /AttestationProviders/put/AttestationProviders_Create -@try_manual -def step__attestationproviders_put(test, rg): - test.cmd('az attestation create -l westus ' - '-n "testattestationprovider" ' - '--resource-group "{rg}"', - checks=[ - test.check('name', 'testattestationprovider'), - test.check('status', 'Ready'), - test.check('trustModel', 'AAD') - ]) - - -# EXAMPLE: /AttestationProviders/get/AttestationProviders_Get -@try_manual -def step__attestationproviders_get(test, rg): - test.cmd('az attestation show ' - '-n "testattestationprovider" ' - '--resource-group "{rg}"', - checks=[ - test.check('name', 'testattestationprovider'), - test.check('status', 'Ready') - ]) - - -# EXAMPLE: /AttestationProviders/get/AttestationProviders_ListByResourceGroup -@try_manual -def step__attestationproviders_get2(test, rg): - test.cmd('az attestation list ' - '--resource-group "{rg}"', - checks=[ - test.check('length(value)', 1), - test.check('value[0].name', 'testattestationprovider'), - test.check('value[0].status', 'Ready') - ]) - - -# EXAMPLE: /AttestationProviders/get/AttestationProviders_List -@try_manual -def step__attestationproviders_get3(test, rg): - test.cmd('az attestation list') - - -# EXAMPLE: /AttestationProviders/patch/AttestationProviders_Update -@try_manual -def step__attestationproviders_patch(test, rg): - test.cmd('az attestation update ' - '-n "testattestationprovider" ' - '--resource-group "{rg}" ' - '--tags Property1="Value1" Property2="Value2" Property3="Value3"', - checks=[ - test.check('tags.Property1', 'Value1'), - test.check('tags.Property2', 'Value2'), - test.check('tags.Property3', 'Value3') - ]) - - -# EXAMPLE: /AttestationProviders/delete/AttestationProviders_Delete -@try_manual -def step__attestationproviders_delete(test, rg): - test.cmd('az attestation delete -y ' - '-n "testattestationprovider" ' - '--resource-group "{rg}"') - - -@try_manual -def test_provider_with_signer_1(test, rg): - test.cmd('az attestation create -l westus -n {att1} -g {rg} --certs-input-path "{init_cert1_file}"', checks=[ - test.check('name', '{att1}'), - test.check('status', 'Ready'), - test.check('trustModel', 'Isolated') - ]) - - test.cmd('az attestation signer list -n {att1} -g {rg}', checks=[ - test.check('CertificateCount', 1), - test.check('Certificates[0].use', 'sig'), - test.exists('Certificates[0].alg'), - test.exists('Certificates[0].kty'), - test.exists('Certificates[0].x5c'), - test.exists('JKU'), - test.exists('Jwt'), - test.exists('Algorithm') - ]) - - test.cmd('az attestation policy show -n {att1} -g {rg} --attestation-type SGX-IntelSDK', checks=[ - test.check('Algorithm', 'none'), - test.check('JwtLength', 944), - test.check('TextLength', 501), - test.exists('Jwt'), - test.exists('Text') - ]) - - from knack.util import CLIError - with test.assertRaisesRegex(CLIError, 'PolicyParsingError'): - test.cmd('az attestation policy set -n {att1} -g {rg} --attestation-type SGX-IntelSDK ' - '-f "{signed_jwt_policy1_file}" --policy-format JWT', - checks=[ - test.check('Algorithm', 'RSA256'), - test.check('JwtLength', 2862), - test.check('TextLength', 608), - test.exists('Jwt'), - test.exists('Text') - ]) - - """ Bypass this since the test file can be only used on old api version +class AttestationManagementClientScenarioTest(ScenarioTest): - test.cmd('az attestation signer add -n {att1} -g {rg} -f "{new_signer_jwt_file}"', - checks=test.check('CertificateCount', 2)) + @AllowLargeResponse(size_kb=99999) + @ResourceGroupPreparer(name_prefix='clitestattestation_testrg1'[:7], key='rg', parameter_name='rg') + def test_attestation(self, rg): + self.kwargs.update({ + 'att0': self.create_random_name('att0', 16), + }) - test.cmd('az attestation signer remove -n {att1} -g {rg} -f "{new_signer_jwt_file}"', - checks=test.check('CertificateCount', 1)) + self.cmd('az attestation create -l westus ' + '-n {att0} ' + '--resource-group "{rg}"', + checks=[ + self.check('name', '{att0}'), + self.check('status', 'Ready'), + self.check('trustModel', 'AAD') + ]) - with open(test.kwargs['new_signer_jwt_file']) as f: - test.kwargs['new_signer_jwt'] = f.read() + self.cmd('az attestation show ' + '-n {att0} ' + '--resource-group "{rg}"', + checks=[ + self.check('name', '{att0}'), + self.check('status', 'Ready') + ]) + self.cmd('az attestation list ' + '--resource-group "{rg}"', + checks=[ + self.check('length(value)', 1), + self.check('value[0].name', '{att0}'), + self.check('value[0].status', 'Ready') + ]) + self.cmd('az attestation list') - test.cmd('az attestation signer add -n {att1} -g {rg} --signer {new_signer_jwt}', - checks=test.check('CertificateCount', 2)) + self.cmd('az attestation update ' + '-n "{att0}" ' + '--resource-group "{rg}" ' + '--tags Property1="Value1" Property2="Value2" Property3="Value3"', + checks=[ + self.check('tags.Property1', 'Value1'), + self.check('tags.Property2', 'Value2'), + self.check('tags.Property3', 'Value3') + ]) + self.cmd('az attestation get-default-by-location -l "West US"', checks=[ + self.check('attestUri', 'https://sharedwus.wus.attest.azure.net'), + self.check('location', 'West US') + ]) + self.cmd('az attestation delete -y ' + '-n "{att0}" ' + '--resource-group "{rg}"') + + @AllowLargeResponse(size_kb=99999) + @ResourceGroupPreparer(name_prefix='clitestattestation_testrg1'[:7], key='rg', parameter_name='rg') + def test_provider_with_signer_1(self, rg): + self.kwargs.update({ + 'init_cert1_file': os.path.join(TEST_DIR, 'cert_group_1', 'init_cert.pem'), + 'new_signer_jwt_file': os.path.join(TEST_DIR, 'cert_group_1', 'new_signer_jwt.txt'), + 'att1': self.create_random_name('att1', 16), + }) + self.cmd('az attestation create -l westus -n {att1} -g {rg} --certs-input-path "{init_cert1_file}"', checks=[ + self.check('name', '{att1}'), + self.check('status', 'Ready'), + self.check('trustModel', 'Isolated') + ]) + + self.cmd('az attestation signer list -n {att1} -g {rg}', checks=[ + self.check('CertificateCount', 1), + self.check('Certificates[0].use', 'sig'), + self.exists('Certificates[0].alg'), + self.exists('Certificates[0].kty'), + self.exists('Certificates[0].x5c'), + self.exists('JKU'), + self.exists('Jwt'), + self.exists('Algorithm') + ]) + + self.cmd('az attestation policy show -n {att1} -g {rg} --attestation-type SgxEnclave', checks=[ + self.check('Algorithm', 'none'), + self.check('JwtLength', 1088), + self.check('TextLength', 582), + self.exists('Jwt'), + self.exists('Text') + ]) + + # from azure.core.exceptions import HttpResponseError + # with test.assertRaisesRegex(HttpResponseError, 'PolicyParsingError'): + # test.cmd('az attestation policy set -n {att1} -g {rg} --attestation-type SgxEnclave ' + # '-f "{signed_jwt_policy1_file}" --policy-format JWT', + # checks=[ + # test.check('Algorithm', 'RSA256'), + # test.check('JwtLength', 2862), + # test.check('TextLength', 608), + # test.exists('Jwt'), + # test.exists('Text') + # ]) + + self.cmd('az attestation signer add -n {att1} -g {rg} -f "{new_signer_jwt_file}"') + + self.cmd('az attestation signer list -n {att1} -g {rg}', checks=self.check('CertificateCount', 2)) + + self.cmd('az attestation signer remove -n {att1} -g {rg} -f "{new_signer_jwt_file}"', + checks=self.check('CertificateCount', 1)) + + with open(self.kwargs['new_signer_jwt_file']) as f: + self.kwargs['new_signer_jwt'] = f.read() + + self.cmd('az attestation signer add -n {att1} -g {rg} --signer {new_signer_jwt}') + + self.cmd('az attestation signer list -n {att1} -g {rg}', checks=self.check('CertificateCount', 2)) + + self.cmd('az attestation signer remove -n {att1} -g {rg} --signer {new_signer_jwt}', + checks=self.check('CertificateCount', 1)) + + self.cmd('az attestation delete -n {att1} -g {rg} -y') + + @AllowLargeResponse(size_kb=99999) + @ResourceGroupPreparer(name_prefix='clitestattestation_testrg1'[:7], key='rg', parameter_name='rg') + def test_provider_with_signer_2(self, rg): + self.kwargs.update({ + 'init_cert2_file': os.path.join(TEST_DIR, 'cert_group_2', 'init_cert.pem'), + 'signed_jwt_policy2_file': os.path.join(TEST_DIR, 'policies', 'signed_jwt_sgx_policy_2.txt'), + 'att2': self.create_random_name('att2', 16), + }) + self.cmd('az attestation create -l westus -n {att2} -g {rg} --certs-input-path "{init_cert2_file}"', + checks=[ + self.check('name', '{att2}'), + self.check('status', 'Ready'), + self.check('trustModel', 'Isolated') + ]) - test.cmd('az attestation signer remove -n {att1} -g {rg} --signer {new_signer_jwt}', - checks=test.check('CertificateCount', 1)) - """ + self.cmd('az attestation policy show -n {att2} -g {rg} --attestation-type SgxEnclave', checks=[ + self.check('Algorithm', 'none'), + self.check('JwtLength', 1088), + self.check('TextLength', 582), + self.exists('Jwt'), + self.exists('Text') + ]) + self.cmd('az attestation policy set -n {att2} -g {rg} --attestation-type SgxEnclave ' + '-f "{signed_jwt_policy2_file}" --policy-format JWT', + checks=[ + self.check('Algorithm', 'RS256'), + self.check('JwtLength', 2766), + self.check('TextLength', 479), + self.exists('Jwt'), + self.exists('Text') + ]) + self.cmd('az attestation delete -n {att2} -g {rg} -y') -@try_manual -def test_provider_with_signer_2(test, rg): - test.cmd('az attestation create -l westus -n {att2} -g {rg} --certs-input-path "{init_cert2_file}"', checks=[ - test.check('name', '{att2}'), - test.check('status', 'Ready'), - test.check('trustModel', 'Isolated') - ]) + @AllowLargeResponse(size_kb=99999) + @ResourceGroupPreparer(name_prefix='clitestattestation_testrg1'[:7], key='rg', parameter_name='rg') + def test_provider_without_signer(self, rg): + self.kwargs.update({ + 'unsigned_jwt_policy_file': os.path.join(TEST_DIR, 'policies', 'unsigned_jwt_sgx_policy.txt'), + 'text_policy_file': os.path.join(TEST_DIR, 'policies', 'text_sgx_policy.txt'), + 'att3': self.create_random_name('att3', 16) + }) + self.cmd('az attestation create -l westus -n {att3} -g {rg}', checks=[ + self.check('name', '{att3}'), + self.check('status', 'Ready'), + self.check('trustModel', 'AAD') + ]) + + self.cmd('az attestation policy show -n {att3} -g {rg} --attestation-type SgxEnclave', checks=[ + self.check('Algorithm', 'none'), + self.check('JwtLength', 1088), + self.check('TextLength', 582), + self.exists('Jwt'), + self.exists('Text') + ]) + + self.cmd( + 'az attestation policy set -n {att3} -g {rg} --attestation-type SgxEnclave -f "{text_policy_file}"', + checks=[ + self.check('Algorithm', 'none'), + self.check('JwtLength', 835), + self.check('TextLength', 430), + self.exists('Jwt'), + self.exists('Text') + ]) + + self.cmd('az attestation policy set -n {att3} -g {rg} --attestation-type SgxEnclave ' + '-f "{unsigned_jwt_policy_file}" --policy-format JWT', + checks=[ + self.check('Algorithm', 'none'), + self.check('JwtLength', 907), + self.check('TextLength', 479), + self.exists('Jwt'), + self.exists('Text') + ]) - test.cmd('az attestation policy show -n {att2} -g {rg} --attestation-type SGX-IntelSDK', checks=[ - test.check('Algorithm', 'none'), - test.check('JwtLength', 944), - test.check('TextLength', 501), - test.exists('Jwt'), - test.exists('Text') - ]) - from knack.util import CLIError - with test.assertRaisesRegex(CLIError, 'InvalidOperation'): - test.cmd('az attestation policy set -n {att2} -g {rg} --attestation-type SGX-IntelSDK ' - '-f "{signed_jwt_policy2_file}" --policy-format JWT', + self.cmd('az attestation policy set -n {att3} -g {rg} --attestation-type SgxEnclave ' + '-f "{text_policy_file}"', checks=[ - test.check('Algorithm', 'RSA256'), - test.check('JwtLength', 2862), - test.check('TextLength', 608), - test.exists('Jwt'), - test.exists('Text') + self.check('Algorithm', 'none'), + self.check('JwtLength', 835), + self.check('TextLength', 430), + self.exists('Jwt'), + self.exists('Text') ]) + with open(self.kwargs['unsigned_jwt_policy_file']) as f: + self.kwargs['unsigned_jwt_policy'] = f.read() -@try_manual -def test_provider_without_signer(test, rg): - test.cmd('az attestation create -l westus -n {att3} -g {rg}', checks=[ - test.check('name', '{att3}'), - test.check('status', 'Ready'), - test.check('trustModel', 'AAD') - ]) - - test.cmd('az attestation policy show -n {att3} -g {rg} --attestation-type SGX-IntelSDK', checks=[ - test.check('Algorithm', 'none'), - test.check('JwtLength', 944), - test.check('TextLength', 501), - test.exists('Jwt'), - test.exists('Text') - ]) - - test.cmd('az attestation policy set -n {att3} -g {rg} --attestation-type SGX-IntelSDK ' - '-f "{text_policy_file}"', - checks=[ - test.check('Algorithm', 'none'), - test.check('JwtLength', 835), - test.check('TextLength', 430), - test.exists('Jwt'), - test.exists('Text') - ]) - - test.cmd('az attestation policy set -n {att3} -g {rg} --attestation-type SGX-IntelSDK ' - '-f "{unsigned_jwt_policy_file}" --policy-format JWT', - checks=[ - test.check('Algorithm', 'none'), - test.check('JwtLength', 907), - test.check('TextLength', 479), - test.exists('Jwt'), - test.exists('Text') - ]) - - test.cmd('az attestation policy set -n {att3} -g {rg} --attestation-type SGX-IntelSDK ' - '-f "{text_policy_file}"', - checks=[ - test.check('Algorithm', 'none'), - test.check('JwtLength', 835), - test.check('TextLength', 430), - test.exists('Jwt'), - test.exists('Text') - ]) - - with open(test.kwargs['unsigned_jwt_policy_file']) as f: - test.kwargs['unsigned_jwt_policy'] = f.read() - - test.cmd('az attestation policy set -n {att3} -g {rg} --attestation-type SGX-IntelSDK ' - '--new-attestation-policy {unsigned_jwt_policy} --policy-format JWT', - checks=[ - test.check('Algorithm', 'none'), - test.check('JwtLength', 907), - test.check('TextLength', 479), - test.exists('Jwt'), - test.exists('Text') - ]) - - test.cmd('az attestation policy reset -n {att3} -g {rg} --attestation-type SGX-IntelSDK', checks=[ - test.check('Algorithm', 'none'), - test.check('JwtLength', 944), - test.check('TextLength', 501), - test.exists('Jwt'), - test.exists('Text') - ]) - - -@try_manual -def test_get_default_provider_by_location(test, rg): - test.cmd('az attestation get-default-by-location -l "West US"', checks=[ - test.check('attestUri', 'https://sharedwus.wus.attest.azure.net'), - test.check('location', 'West US') - ]) - - -# Env cleanup -@try_manual -def cleanup(test, rg): - test.cmd('az attestation delete -n {att1} -g {rg} -y') - test.cmd('az attestation delete -n {att2} -g {rg} -y') - test.cmd('az attestation delete -n {att3} -g {rg} -y') - - -# Testcase -@try_manual -def call_scenario(test, rg): - setup(test, rg) - step__attestationproviders_put(test, rg) - step__attestationproviders_get(test, rg) - step__attestationproviders_get2(test, rg) - step__attestationproviders_get3(test, rg) - step__attestationproviders_patch(test, rg) - step__attestationproviders_delete(test, rg) - test_get_default_provider_by_location(test, rg) - test_provider_with_signer_1(test, rg) - test_provider_with_signer_2(test, rg) - test_provider_without_signer(test, rg) - cleanup(test, rg) - - -@try_manual -class AttestationManagementClientScenarioTest(ScenarioTest): + self.cmd('az attestation policy set -n {att3} -g {rg} --attestation-type SgxEnclave ' + '--new-attestation-policy {unsigned_jwt_policy} --policy-format JWT', + checks=[ + self.check('Algorithm', 'none'), + self.check('JwtLength', 907), + self.check('TextLength', 479), + self.exists('Jwt'), + self.exists('Text') + ]) - @ResourceGroupPreparer(name_prefix='clitestattestation_testrg1'[:7], key='rg', parameter_name='rg') - def test_attestation(self, rg): - call_scenario(self, rg) - calc_coverage(__file__) - raise_if() + self.cmd('az attestation policy reset -n {att3} -g {rg} --attestation-type SgxEnclave', checks=[ + self.check('Algorithm', 'none'), + self.check('JwtLength', 1088), + self.check('TextLength', 582), + self.exists('Jwt'), + self.exists('Text') + ]) + self.cmd('az attestation delete -n {att3} -g {rg} -y') diff --git a/src/attestation/azext_attestation/tests/latest/test_attestation_scenario_coverage.md b/src/attestation/azext_attestation/tests/latest/test_attestation_scenario_coverage.md deleted file mode 100644 index 334afd4715f..00000000000 --- a/src/attestation/azext_attestation/tests/latest/test_attestation_scenario_coverage.md +++ /dev/null @@ -1,8 +0,0 @@ -|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt| -|step__attestationproviders_put|successed||||2022-07-07 03:14:30.841351|2022-07-07 03:14:41.204845| -|step__attestationproviders_get|successed||||2022-07-07 03:14:41.204845|2022-07-07 03:14:42.619068| -|step__attestationproviders_get2|successed||||2022-07-07 03:14:42.619068|2022-07-07 03:14:43.900284| -|step__attestationproviders_get3|successed||||2022-07-07 03:14:43.900284|2022-07-07 03:14:45.343817| -|step__attestationproviders_patch|successed||||2022-07-07 03:14:45.343817|2022-07-07 03:14:51.774229| -|step__attestationproviders_delete|successed||||2022-07-07 03:14:51.774229|2022-07-07 03:15:02.086530| -Coverage: 6/6 diff --git a/src/attestation/azext_attestation/vendored_sdks/__init__.py b/src/attestation/azext_attestation/vendored_sdks/__init__.py deleted file mode 100644 index c9cfdc73e77..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/__init__.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/__init__.py deleted file mode 100644 index cfca63c02e0..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import AttestationClientConfiguration -from ._attestation_client import AttestationClient -__all__ = ['AttestationClient', 'AttestationClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/_attestation_client.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/_attestation_client.py deleted file mode 100644 index 4eb0e52b2a1..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/_attestation_client.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import AttestationClientConfiguration -from .operations import PolicyOperations -from .operations import PolicyCertificatesOperations -from .operations import SigningCertificatesOperations -from .operations import MetadataConfigurationOperations -from .operations import AttestOperations -from . import models - - -class AttestationClient(SDKClient): - """Describes the interface for the per-tenant enclave service. - - :ivar config: Configuration for client. - :vartype config: AttestationClientConfiguration - - :ivar policy: Policy operations - :vartype policy: azure.attestation.operations.PolicyOperations - :ivar policy_certificates: PolicyCertificates operations - :vartype policy_certificates: azure.attestation.operations.PolicyCertificatesOperations - :ivar signing_certificates: SigningCertificates operations - :vartype signing_certificates: azure.attestation.operations.SigningCertificatesOperations - :ivar metadata_configuration: MetadataConfiguration operations - :vartype metadata_configuration: azure.attestation.operations.MetadataConfigurationOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - """ - - def __init__( - self, credentials): - - self.config = AttestationClientConfiguration(credentials) - super(AttestationClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-10-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.policy = PolicyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.policy_certificates = PolicyCertificatesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.signing_certificates = SigningCertificatesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.metadata_configuration = MetadataConfigurationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.attest = AttestOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/_configuration.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/_configuration.py deleted file mode 100644 index 4346af59281..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/_configuration.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class AttestationClientConfiguration(AzureConfiguration): - """Configuration for AttestationClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - """ - - def __init__( - self, credentials): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - base_url = '{tenantBaseUrl}' - - super(AttestationClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-attestation/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/__init__.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/__init__.py deleted file mode 100644 index 4268421bd3d..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - - -from ._models_py3 import AttestationPolicy, \ - AttestSgxEnclaveRequest, AttestOpenEnclaveRequest, TPMOpenEnclaveRequest, RuntimeData, InitTimeData - -from ._attestation_client_enums import ( - TeeKind, DataType -) - -__all__ = [ - 'AttestationPolicy', - 'AttestSgxEnclaveRequest', - 'AttestOpenEnclaveRequest', - 'TPMOpenEnclaveRequest', - 'RuntimeData', - 'InitTimeData', - 'TeeKind', - 'DataType' -] diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/_attestation_client_enums.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/_attestation_client_enums.py deleted file mode 100644 index 5c511a28957..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/_attestation_client_enums.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class TeeKind(str, Enum): - - sgx_intel_sdk = "SGX-IntelSDK" - sgx_open_enclave_sdk = "SGX-OpenEnclaveSDK" - tpm = "TPM" - - -class DataType(str, Enum): - - json = 'JSON' - binary = 'Binary' diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/_models_py3.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/_models_py3.py deleted file mode 100644 index 9d383bddcd1..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/models/_models_py3.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AttestationPolicy(Model): - - _attribute_map = { - 'token': {'key': 'token', 'type': 'str'}, - } - - def __init__(self, *, token: str=None, **kwargs) -> None: - super(AttestationPolicy, self).__init__(**kwargs) - self.token = token - - -class AttestSgxEnclaveRequest(Model): - """Attestation request for SGX-IntelSDK enclaves. - """ - - _attribute_map = { - 'quote': {'key': 'quote', 'type': 'str'}, - 'runtime_data': {'key': 'runtimeData', 'type': 'RuntimeData'}, - 'init_time_data': {'key': 'initTimeData', 'type': 'InitTimeData'}, - 'draft_policy_for_attestation': {'key': 'draftPolicyForAttestation', 'type': 'str'} - } - - def __init__(self, quoto=None, runtime_data=None, init_time_data=None, draft_policy_for_attestation=None, **kwargs): - super(AttestSgxEnclaveRequest, self).__init__(**kwargs) - self.quoto = quoto - self.runtime_data = runtime_data - self.init_time_data = init_time_data - self.draft_policy_for_attestation = draft_policy_for_attestation - - -class AttestOpenEnclaveRequest(Model): - """Attestation request for SGX-OpenEnclaveSDK enclaves. - """ - - _attribute_map = { - 'report': {'key': 'report', 'type': 'str'}, - 'runtime_data': {'key': 'runtimeData', 'type': 'RuntimeData'}, - 'init_time_data': {'key': 'initTimeData', 'type': 'InitTimeData'}, - 'draft_policy_for_attestation': {'key': 'draftPolicyForAttestation', 'type': 'str'} - } - - def __init__(self, report=None, runtime_data=None, init_time_data=None, draft_policy_for_attestation=None, **kwargs): - super(AttestOpenEnclaveRequest, self).__init__(**kwargs) - self.report = report - self.runtime_data = runtime_data - self.init_time_data = init_time_data - self.draft_policy_for_attestation = draft_policy_for_attestation - - -class TPMOpenEnclaveRequest(Model): - """Attestation request for Trusted Platform Module (TPM) attestation. - """ - - _attribute_map = { - 'data': {'key': 'data', 'type': 'str'} - } - - def __init__(self, data=None, **kwargs): - super(TPMOpenEnclaveRequest, self).__init__(**kwargs) - self.data = data - - -class RuntimeData(Model): - """Defines the \"run time data\" provided by the attestation target for use by the MAA - """ - - _attribute_map = { - 'data': {'key': 'data', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'DataType'} - } - - def __init__(self, data=None, data_type=None, **kwargs): - super(RuntimeData, self).__init__(**kwargs) - self.data = data - self.data_type = data_type - - -class InitTimeData(Model): - """Defines the \"initialization time data\" used to provision the attestation target for use by the MAA - """ - - _attribute_map = { - 'data': {'key': 'data', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'DataType'} - } - - def __init__(self, data=None, data_type=None, **kwargs): - super(InitTimeData, self).__init__(**kwargs) - self.data = data - self.data_type = data_type - - -class CloudError(Model): - """An error response from Attestation. - - :param error: - :type error: ~azure.attestation.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from Attestation. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for displaying in a user interface. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/__init__.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/__init__.py deleted file mode 100644 index f40143cc477..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._policy_operations import PolicyOperations -from ._policy_certificates_operations import PolicyCertificatesOperations -from ._signing_certificates_operations import SigningCertificatesOperations -from ._metadata_configuration_operations import MetadataConfigurationOperations -from ._attest_operations import AttestOperations - -__all__ = [ - 'PolicyOperations', - 'PolicyCertificatesOperations', - 'SigningCertificatesOperations', - 'MetadataConfigurationOperations', - 'AttestOperations' -] diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_attest_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_attest_operations.py deleted file mode 100644 index 3d79125d229..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_attest_operations.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from knack.cli import CLIError - -from .. import models - - -class AttestOperations(object): - """AttestOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-10-01" - - self.config = config - - def attest_open_enclave( - self, tenant_base_url, request, custom_headers=None, raw=False, **operation_config): - """Attest to an SGX-OpenEnclaveSDK enclave. - """ - url = '/attest/OpenEnclave' - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'text/plain' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'AttestOpenEnclaveRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 401]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 400: - raise CLIError(response.text) - if response.status_code == 401: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_metadata_configuration_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_metadata_configuration_operations.py deleted file mode 100644 index 60b4da09d64..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_metadata_configuration_operations.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class MetadataConfigurationOperations(object): - """MetadataConfigurationOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def get( - self, tenant_base_url, custom_headers=None, raw=False, **operation_config): - """Retrieves the OpenID Configuration data for the Azure Attestation - Service. - - Retrieves metadata about the attestation signing keys in use by the - attestation service. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 400: - deserialized = self._deserialize('CloudError', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/.well-known/openid-configuration'} diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_policy_certificates_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_policy_certificates_operations.py deleted file mode 100644 index 3236a8870f9..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_policy_certificates_operations.py +++ /dev/null @@ -1,249 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from knack.cli import CLIError - -from .. import models - - -class PolicyCertificatesOperations(object): - """PolicyCertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-10-01" - - self.config = config - - def get( - self, tenant_base_url, custom_headers=None, raw=False, **operation_config): - """Retrieves the set of certificates used to express policy for the - current tenant. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 401]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - if response.status_code == 400: - deserialized = self._deserialize('CloudError', response) - if response.status_code == 401: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/certificates'} - - def add( - self, tenant_base_url, policy_certificate_to_add, custom_headers=None, raw=False, **operation_config): - """Adds a new attestation policy certificate to the set of policy - management certificates. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param policy_certificate_to_add: An RFC7519 JSON Web Token containing - a claim named "maa-policyCertificate" whose value is an RFC7517 JSON - Web Key which specifies a new key to add. The RFC7519 JWT must be - signed with one of the existing signing certificates - :type policy_certificate_to_add: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.add.metadata['url'] - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # query_parameters['api-version'] = '2018-09-01-preview' - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(policy_certificate_to_add, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 401]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - if response.status_code == 400: - raise CLIError(response.text) - if response.status_code == 401: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add.metadata = {'url': '/certificates%3aadd'} - # add.metadata = {'url': '/operations/policy/certificates'} - - def remove( - self, tenant_base_url, policy_certificate_to_remove, custom_headers=None, raw=False, **operation_config): - """Removes the specified policy management certificate. Note that the - final policy management certificate cannot be removed. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param policy_certificate_to_remove: An RFC7519 JSON Web Token - containing a claim named "maa-policyCertificate" whose value is an - RFC7517 JSON Web Key which specifies a new key to update. The RFC7519 - JWT must be signed with one of the existing signing certificates - :type policy_certificate_to_remove: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.remove.metadata['url'] - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # query_parameters['api-version'] = '2018-09-01-preview' - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(policy_certificate_to_remove, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 401]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - if response.status_code == 400: - raise CLIError(response.text) - if response.status_code == 401: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - remove.metadata = {'url': '/certificates%3aremove'} - # remove.metadata = {'url': '/operations/policy/certificates'} diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_policy_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_policy_operations.py deleted file mode 100644 index aed3850069a..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_policy_operations.py +++ /dev/null @@ -1,323 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from knack.cli import CLIError - -from .. import models - - -class PolicyOperations(object): - """PolicyOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-10-01" - - self.config = config - - def prepare_to_set( - self, tenant_base_url, tee, policy_jws, custom_headers=None, raw=False, **operation_config): - """Accepts a new policy document and returns a JWT which expresses used - in preparation to set attestation policy. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param tee: Specifies the trusted execution environment to be used to - validate the evidence. Possible values include: 'SgxEnclave', - 'OpenEnclave', 'CyResComponent', 'VSMEnclave' - :type tee: str or ~azure.attestation.models.TeeKind - :param policy_jws: JSON Web Signature (See RFC7515) expressing the new - policy - :type policy_jws: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.prepare_to_set.metadata['url'] - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['tee'] = self._serialize.query("tee", tee, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'text/plain' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(policy_jws, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 401]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - if response.status_code == 400: - deserialized = self._deserialize('CloudError', response) - if response.status_code == 401: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - prepare_to_set.metadata = {'url': '/operations/policy/updatepolicy'} - - def get( - self, tenant_base_url, tee, custom_headers=None, raw=False, **operation_config): - """Retrieves the current policy for a given kind of attestation type. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param tee: Specifies the trusted execution environment to be used to - validate the evidence. Possible values include: 'SgxEnclave', - 'OpenEnclave', 'CyResComponent', 'VSMEnclave' - :type tee: str or ~azure.attestation.models.TeeKind - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = '/policies/{}'.format(tee) - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['tee'] = self._serialize.query("tee", tee, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 401]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AttestationPolicy', response) - if response.status_code == 400: - raise CLIError(response.text) - if response.status_code == 401: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def set( - self, tenant_base_url, tee, new_attestation_policy, custom_headers=None, raw=False, **operation_config): - """Sets the policy for a given kind of attestation type. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param tee: Specifies the trusted execution environment to be used to - validate the evidence. Possible values include: 'SgxEnclave', - 'OpenEnclave', 'CyResComponent', 'VSMEnclave' - :type tee: str or ~azure.attestation.models.TeeKind - :param new_attestation_policy: JWT Expressing the new policy - :type new_attestation_policy: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = '/policies/{}'.format(tee) - # url = '/operations/policy/updatepolicy' - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # query_parameters['api-version'] = '2018-09-01-preview' - query_parameters['tee'] = self._serialize.query("tee", tee, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'text/plain' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(new_attestation_policy, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 401]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 400: - raise CLIError(response.text) - if response.status_code == 401: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def reset( - self, tenant_base_url, tee, policy_jws, custom_headers=None, raw=False, **operation_config): - """Resets the attestation policy for the specified tenant and reverts to - the default policy. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param tee: Specifies the trusted execution environment to be used to - validate the evidence. Possible values include: 'SgxEnclave', - 'OpenEnclave', 'CyResComponent', 'VSMEnclave' - :type tee: str or ~azure.attestation.models.TeeKind - :param policy_jws: JSON Web Signature with an empty policy document - :type policy_jws: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = '/policies/{}%3areset'.format(tee) - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['tee'] = self._serialize.query("tee", tee, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'text/plain' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(policy_jws, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400, 401]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - if response.status_code == 400: - raise CLIError(response.text) - if response.status_code == 401: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_signing_certificates_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_signing_certificates_operations.py deleted file mode 100644 index 4bbbc9bba01..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_attestation/operations/_signing_certificates_operations.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class SigningCertificatesOperations(object): - """SigningCertificatesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def get( - self, tenant_base_url, custom_headers=None, raw=False, **operation_config): - """Retrieves the attestation signing keys in use by the attestation - service. - - Retrieves metadata signing certificates in use by the attestation - service. - - :param tenant_base_url: The tenant name, for example - https://mytenant.attest.azure.net. - :type tenant_base_url: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'tenantBaseUrl': self._serialize.url("tenant_base_url", tenant_base_url, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 400]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('object', response) - if response.status_code == 400: - deserialized = self._deserialize('CloudError', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/certs'} diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/__init__.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/__init__.py deleted file mode 100644 index 2a7fdf5d24f..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._attestation_management_client import AttestationManagementClient -__all__ = ['AttestationManagementClient'] - -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/_attestation_management_client.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/_attestation_management_client.py deleted file mode 100644 index bf6cf4fef35..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/_attestation_management_client.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - -from ._configuration import AttestationManagementClientConfiguration -from .operations import OperationOperations -from .operations import AttestationProviderOperations -from . import models - - -class AttestationManagementClient(object): - """Various APIs for managing resources in attestation service. This primarily encompasses per-tenant instance management. - - :ivar operation: OperationOperations operations - :vartype operation: attestation_management_client.operations.OperationOperations - :ivar attestation_provider: AttestationProviderOperations operations - :vartype attestation_provider: attestation_management_client.operations.AttestationProviderOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = AttestationManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operation = OperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.attestation_provider = AttestationProviderOperations( - self._client, self._config, self._serialize, self._deserialize) - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> AttestationManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/_configuration.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/_configuration.py deleted file mode 100644 index 4af50b643db..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/_configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - from azure.core.credentials import TokenCredential - -VERSION = "unknown" - -class AttestationManagementClientConfiguration(Configuration): - """Configuration for AttestationManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(AttestationManagementClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2020-10-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'attestationmanagementclient/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/__init__.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/__init__.py deleted file mode 100644 index b76b31d5b48..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._attestation_management_client import AttestationManagementClient -__all__ = ['AttestationManagementClient'] diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/_attestation_management_client.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/_attestation_management_client.py deleted file mode 100644 index 0779916cc0b..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/_attestation_management_client.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -from ._configuration import AttestationManagementClientConfiguration -from .operations import OperationOperations -from .operations import AttestationProviderOperations -from .. import models - - -class AttestationManagementClient(object): - """Various APIs for managing resources in attestation service. This primarily encompasses per-tenant instance management. - - :ivar operation: OperationOperations operations - :vartype operation: attestation_management_client.aio.operations.OperationOperations - :ivar attestation_provider: AttestationProviderOperations operations - :vartype attestation_provider: attestation_management_client.aio.operations.AttestationProviderOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = AttestationManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operation = OperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.attestation_provider = AttestationProviderOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "AttestationManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/_configuration.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/_configuration.py deleted file mode 100644 index 68499085868..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/_configuration.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -VERSION = "unknown" - -class AttestationManagementClientConfiguration(Configuration): - """Configuration for AttestationManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(AttestationManagementClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2020-10-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'attestationmanagementclient/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/__init__.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/__init__.py deleted file mode 100644 index a56bb00ec32..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._operation_operations import OperationOperations -from ._attestation_provider_operations import AttestationProviderOperations - -__all__ = [ - 'OperationOperations', - 'AttestationProviderOperations', -] diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/_attestation_provider_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/_attestation_provider_operations.py deleted file mode 100644 index a964c3870c0..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/_attestation_provider_operations.py +++ /dev/null @@ -1,513 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class AttestationProviderOperations: - """AttestationProviderOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~attestation_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - resource_group_name: str, - provider_name: str, - **kwargs - ) -> "models.AttestationProvider": - """Get the status of Attestation Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param provider_name: Name of the attestation service instance. - :type provider_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProvider, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProvider - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProvider"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}'} # type: ignore - - async def create( - self, - resource_group_name: str, - provider_name: str, - location: str, - tags: Optional[Dict[str, str]] = None, - keys: Optional[List["models.JsonWebKey"]] = None, - **kwargs - ) -> "models.AttestationProvider": - """Creates a new Attestation Provider instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param provider_name: Name of the attestation service instance. - :type provider_name: str - :param location: The supported Azure location where the attestation service instance should be - created. - :type location: str - :param tags: The tags that will be assigned to the attestation service instance. - :type tags: dict[str, str] - :param keys: The value of the "keys" parameter is an array of JWK values. By - default, the order of the JWK values within the array does not imply - an order of preference among them, although applications of JWK Sets - can choose to assign a meaning to the order for their purposes, if - desired. - :type keys: list[~attestation_management_client.models.JsonWebKey] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProvider, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProvider - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProvider"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - creation_params = models.AttestationServiceCreationParams(location=location, tags=tags, keys=keys) - api_version = "2020-10-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(creation_params, 'AttestationServiceCreationParams') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}'} # type: ignore - - async def update( - self, - resource_group_name: str, - provider_name: str, - tags: Optional[Dict[str, str]] = None, - **kwargs - ) -> "models.AttestationProvider": - """Updates the Attestation Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param provider_name: Name of the attestation service instance. - :type provider_name: str - :param tags: The tags that will be assigned to the attestation service instance. - :type tags: dict[str, str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProvider, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProvider - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProvider"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - update_params = models.AttestationServicePatchParams(tags=tags) - api_version = "2020-10-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(update_params, 'AttestationServicePatchParams') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}'} # type: ignore - - async def delete( - self, - resource_group_name: str, - provider_name: str, - **kwargs - ) -> None: - """Delete Attestation Service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param provider_name: Name of the attestation service. - :type provider_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}'} # type: ignore - - async def list( - self, - **kwargs - ) -> "models.AttestationProviderListResult": - """Returns a list of attestation providers in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProviderListResult, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProviderListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProviderListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/attestationProviders'} # type: ignore - - async def list_by_resource_group( - self, - resource_group_name: str, - **kwargs - ) -> "models.AttestationProviderListResult": - """Returns attestation providers list in a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProviderListResult, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProviderListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProviderListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders'} # type: ignore - - async def list_default( - self, - **kwargs - ) -> "models.AttestationProviderListResult": - """Get the default provider. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProviderListResult, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProviderListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.list_default.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProviderListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_default.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/defaultProviders'} # type: ignore - - async def get_default_by_location( - self, - location: str, - **kwargs - ) -> "models.AttestationProvider": - """Get the default provider by location. - - :param location: The location of the default provider. - :type location: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProvider, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProvider - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProvider"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.get_default_by_location.metadata['url'] # type: ignore - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', min_length=1), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_default_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/locations/{location}/defaultProvider'} # type: ignore diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/_operation_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/_operation_operations.py deleted file mode 100644 index 38233a08a12..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/aio/operations/_operation_operations.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class OperationOperations: - """OperationOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~attestation_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def list( - self, - **kwargs - ) -> "models.OperationList": - """Lists all of the available Azure attestation operations. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationList, or the result of cls(response) - :rtype: ~attestation_management_client.models.OperationList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.list.metadata['url'] # type: ignore - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Attestation/operations'} # type: ignore diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/__init__.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/__init__.py deleted file mode 100644 index 6563d24d181..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._models_py3 import AttestationProvider -from ._models_py3 import AttestationProviderListResult -from ._models_py3 import AttestationServiceCreationParams -from ._models_py3 import AttestationServicePatchParams -from ._models_py3 import CloudErrorBody -from ._models_py3 import JsonWebKey -from ._models_py3 import OperationList -from ._models_py3 import OperationsDefinition -from ._models_py3 import OperationsDisplayDefinition -from ._models_py3 import Resource -from ._models_py3 import SystemData -from ._models_py3 import TrackedResource - -from ._attestation_management_client_enums import ( - AttestationServiceStatus, - CreatedByType, -) - -__all__ = [ - 'AttestationProvider', - 'AttestationProviderListResult', - 'AttestationServiceCreationParams', - 'AttestationServicePatchParams', - 'CloudErrorBody', - 'JsonWebKey', - 'OperationList', - 'OperationsDefinition', - 'OperationsDisplayDefinition', - 'Resource', - 'SystemData', - 'TrackedResource', - 'AttestationServiceStatus', - 'CreatedByType' -] diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/_attestation_management_client_enums.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/_attestation_management_client_enums.py deleted file mode 100644 index 196f20eb637..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/_attestation_management_client_enums.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum, EnumMeta -from six import with_metaclass - -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class AttestationServiceStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Status of attestation service. - """ - - READY = "Ready" - NOT_READY = "NotReady" - ERROR = "Error" - -class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of identity that created the resource. - """ - - USER = "User" - APPLICATION = "Application" - MANAGED_IDENTITY = "ManagedIdentity" - KEY = "Key" diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/_models_py3.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/_models_py3.py deleted file mode 100644 index 9b9bb0e8dfc..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/models/_models_py3.py +++ /dev/null @@ -1,492 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Dict, List, Optional, Union - -import msrest.serialization - -from ._attestation_management_client_enums import * - - -class Resource(msrest.serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location - - -class AttestationProvider(TrackedResource): - """Attestation service response message. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :ivar system_data: The system metadata relating to this resource. - :vartype system_data: ~attestation_management_client.models.SystemData - :param trust_model: Trust model for the attestation service instance. - :type trust_model: str - :param status: Status of attestation service. Possible values include: "Ready", "NotReady", - "Error". - :type status: str or ~attestation_management_client.models.AttestationServiceStatus - :param attest_uri: Gets the uri of attestation service. - :type attest_uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'trust_model': {'key': 'properties.trustModel', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'attest_uri': {'key': 'properties.attestUri', 'type': 'str'}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - trust_model: Optional[str] = None, - status: Optional[Union[str, "AttestationServiceStatus"]] = None, - attest_uri: Optional[str] = None, - **kwargs - ): - super(AttestationProvider, self).__init__(tags=tags, location=location, **kwargs) - self.system_data = None - self.trust_model = trust_model - self.status = status - self.attest_uri = attest_uri - - -class AttestationProviderListResult(msrest.serialization.Model): - """Attestation Providers List. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar system_data: The system metadata relating to this resource. - :vartype system_data: ~attestation_management_client.models.SystemData - :param value: Attestation Provider array. - :type value: list[~attestation_management_client.models.AttestationProvider] - """ - - _validation = { - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'value': {'key': 'value', 'type': '[AttestationProvider]'}, - } - - def __init__( - self, - *, - value: Optional[List["AttestationProvider"]] = None, - **kwargs - ): - super(AttestationProviderListResult, self).__init__(**kwargs) - self.system_data = None - self.value = value - - -class AttestationServiceCreationParams(msrest.serialization.Model): - """Parameters for creating an attestation service instance. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The supported Azure location where the attestation service instance - should be created. - :type location: str - :param tags: A set of tags. The tags that will be assigned to the attestation service instance. - :type tags: dict[str, str] - :param keys: The value of the "keys" parameter is an array of JWK values. By - default, the order of the JWK values within the array does not imply - an order of preference among them, although applications of JWK Sets - can choose to assign a meaning to the order for their purposes, if - desired. - :type keys: list[~attestation_management_client.models.JsonWebKey] - """ - - _validation = { - 'location': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'keys': {'key': 'properties.policySigningCertificates.keys', 'type': '[JsonWebKey]'}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - keys=None, - **kwargs - ): - super(AttestationServiceCreationParams, self).__init__(**kwargs) - self.location = location - self.tags = tags - self.keys = keys - - -class AttestationServicePatchParams(msrest.serialization.Model): - """Parameters for patching an attestation service instance. - - :param tags: A set of tags. The tags that will be assigned to the attestation service instance. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(AttestationServicePatchParams, self).__init__(**kwargs) - self.tags = tags - - -class CloudErrorBody(msrest.serialization.Model): - """An error response from Attestation. - - :param code: An identifier for the error. Codes are invariant and are intended to be consumed - programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable for displaying in a - user interface. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - - -class JsonWebKey1(msrest.serialization.Model): - """JsonWebKey. - """ - - _attribute_map = { - 'alg': {'key': 'alg', 'type': 'str'}, - 'e': {'key': 'e', 'type': 'str'}, - 'kid': {'key': 'kid', 'type': 'str'}, - 'kty': {'key': 'kty', 'type': 'str'}, - 'n': {'key': 'n', 'type': 'str'}, - 'use': {'key': 'use', 'type': 'str'}, - 'x5c': {'key': 'x5c', 'type': '[str]'} - } - - def __init__( - self, - *, - alg: str=None, - kid: str=None, - kty: str=None, - use: str=None, - e: Optional[str] = None, - n: Optional[str] = None, - x5c: Optional[List[str]] = None, - **kwargs - ): - super(JsonWebKey1, self).__init__(**kwargs) - self.alg = alg - self.e = e - self.kid = kid - self.kty = kty - self.n = n - self.use = use - self.x5c = x5c - - -class JsonWebKey(msrest.serialization.Model): - """JsonWebKey. - """ - - _attribute_map = { - 'alg': {'key': 'alg', 'type': 'str'}, - 'kty': {'key': 'kty', 'type': 'str'}, - 'use': {'key': 'use', 'type': 'str'}, - 'x5c': {'key': 'x5c', 'type': '[str]'} - } - - def __init__( - self, - *, - alg: str = None, - kty: str = None, - use: str = None, - x5c: Optional[List[str]] = None, - **kwargs - ): - super(JsonWebKey, self).__init__(**kwargs) - self.alg = alg - self.kty = kty - self.use = use - self.x5c = x5c - - -class OperationList(msrest.serialization.Model): - """List of supported operations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar system_data: The system metadata relating to this resource. - :vartype system_data: ~attestation_management_client.models.SystemData - :param value: List of supported operations. - :type value: list[~attestation_management_client.models.OperationsDefinition] - """ - - _validation = { - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'value': {'key': 'value', 'type': '[OperationsDefinition]'}, - } - - def __init__( - self, - *, - value: Optional[List["OperationsDefinition"]] = None, - **kwargs - ): - super(OperationList, self).__init__(**kwargs) - self.system_data = None - self.value = value - - -class OperationsDefinition(msrest.serialization.Model): - """Definition object with the name and properties of an operation. - - :param name: Name of the operation. - :type name: str - :param display: Display object with properties of the operation. - :type display: ~attestation_management_client.models.OperationsDisplayDefinition - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationsDisplayDefinition'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["OperationsDisplayDefinition"] = None, - **kwargs - ): - super(OperationsDefinition, self).__init__(**kwargs) - self.name = name - self.display = display - - -class OperationsDisplayDefinition(msrest.serialization.Model): - """Display object with properties of the operation. - - :param provider: Resource provider of the operation. - :type provider: str - :param resource: Resource for the operation. - :type resource: str - :param operation: Short description of the operation. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - resource: Optional[str] = None, - operation: Optional[str] = None, - description: Optional[str] = None, - **kwargs - ): - super(OperationsDisplayDefinition, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class SystemData(msrest.serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". - :type created_by_type: str or ~attestation_management_client.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: ~datetime.datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". - :type last_modified_by_type: str or ~attestation_management_client.models.CreatedByType - :param last_modified_at: The type of identity that last modified the resource. - :type last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): - super(SystemData, self).__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/__init__.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/__init__.py deleted file mode 100644 index a56bb00ec32..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._operation_operations import OperationOperations -from ._attestation_provider_operations import AttestationProviderOperations - -__all__ = [ - 'OperationOperations', - 'AttestationProviderOperations', -] diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/_attestation_provider_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/_attestation_provider_operations.py deleted file mode 100644 index 003570bae21..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/_attestation_provider_operations.py +++ /dev/null @@ -1,521 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class AttestationProviderOperations(object): - """AttestationProviderOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~attestation_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - resource_group_name, # type: str - provider_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.AttestationProvider" - """Get the status of Attestation Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param provider_name: Name of the attestation service instance. - :type provider_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProvider, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProvider - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProvider"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}'} # type: ignore - - def create( - self, - resource_group_name, # type: str - provider_name, # type: str - location, # type: str - tags=None, # type: Optional[Dict[str, str]] - certs=None, - **kwargs # type: Any - ): - # type: (...) -> "models.AttestationProvider" - """Creates a new Attestation Provider instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param provider_name: Name of the attestation service instance. - :type provider_name: str - :param location: The supported Azure location where the attestation service instance should be - created. - :type location: str - :param tags: The tags that will be assigned to the attestation service instance. - :type tags: dict[str, str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProvider, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProvider - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProvider"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - creation_params = models.AttestationServiceCreationParams( - location=location, tags=tags, - keys=certs) - api_version = "2020-10-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(creation_params, 'AttestationServiceCreationParams') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}'} # type: ignore - - def update( - self, - resource_group_name, # type: str - provider_name, # type: str - tags=None, # type: Optional[Dict[str, str]] - **kwargs # type: Any - ): - # type: (...) -> "models.AttestationProvider" - """Updates the Attestation Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param provider_name: Name of the attestation service instance. - :type provider_name: str - :param tags: The tags that will be assigned to the attestation service instance. - :type tags: dict[str, str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProvider, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProvider - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProvider"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - update_params = models.AttestationServicePatchParams(tags=tags) - api_version = "2020-10-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(update_params, 'AttestationServicePatchParams') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}'} # type: ignore - - def delete( - self, - resource_group_name, # type: str - provider_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Delete Attestation Service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param provider_name: Name of the attestation service. - :type provider_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}'} # type: ignore - - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> "models.AttestationProviderListResult" - """Returns a list of attestation providers in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProviderListResult, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProviderListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProviderListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/attestationProviders'} # type: ignore - - def list_by_resource_group( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.AttestationProviderListResult" - """Returns attestation providers list in a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProviderListResult, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProviderListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProviderListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders'} # type: ignore - - def list_default( - self, - **kwargs # type: Any - ): - # type: (...) -> "models.AttestationProviderListResult" - """Get the default provider. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProviderListResult, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProviderListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.list_default.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProviderListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_default.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/defaultProviders'} # type: ignore - - def get_default_by_location( - self, - location, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.AttestationProvider" - """Get the default provider by location. - - :param location: The location of the default provider. - :type location: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AttestationProvider, or the result of cls(response) - :rtype: ~attestation_management_client.models.AttestationProvider - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AttestationProvider"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.get_default_by_location.metadata['url'] # type: ignore - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', min_length=1), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AttestationProvider', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_default_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/locations/{location}/defaultProvider'} # type: ignore diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/_operation_operations.py b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/_operation_operations.py deleted file mode 100644 index 8e650a20c18..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/operations/_operation_operations.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class OperationOperations(object): - """OperationOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~attestation_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> "models.OperationList" - """Lists all of the available Azure attestation operations. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationList, or the result of cls(response) - :rtype: ~attestation_management_client.models.OperationList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01" - accept = "application/json" - - # Construct URL - url = self.list.metadata['url'] # type: ignore - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Attestation/operations'} # type: ignore diff --git a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/py.typed b/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/attestation/azext_attestation/vendored_sdks/azure_mgmt_attestation/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/attestation/setup.py b/src/attestation/setup.py index 5b65ae10faf..ea0d7ceba01 100644 --- a/src/attestation/setup.py +++ b/src/attestation/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.2.1' +VERSION = '1.0.0' try: from azext_attestation.manual.version import VERSION except ImportError: @@ -31,7 +31,7 @@ ] DEPENDENCIES = [ - 'pyjwt==1.7.1' + 'pyjwt~=2.4.0' ] try: