diff --git a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetCodeSigningStatus.json b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetCodeSigningStatus.json deleted file mode 100644 index 575d9f8e835d..000000000000 --- a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetCodeSigningStatus.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_GetCodeSigningStatus", - "title": "Gets the status of a codesign operation.", - "parameters": { - "codeSigningAccountName": "YourAccountName", - "certificateProfileName": "YourCertificateProfileName", - "api-version": "2023-06-15-preview", - "operationId": "9797c668-5b3c-4586-8e0c-2768c8160bad" - }, - "responses": { - "200": { - "body": { - "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signStatus": { - "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signature": "OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4MjJjZDE1ZDZjMTViMGYwMGEwOA==", - "signingCertificate": "N2IzZDk3OWNhODMzMGE5NGZhN2U5ZTFiNDY2ZDhiOTllMGJjZGVhMWVjOTA1OTZjMGRjYzhkN2VmNmI0MzAwYw==" - } - } - } - } -} diff --git a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetSignRootCertificate.json b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetSignRootCertificate.json deleted file mode 100644 index a30586b44a55..000000000000 --- a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetSignRootCertificate.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_GetSignRootCertificate", - "title": "Gets the codesigning root certificate on the certificate chain for that account and profile name.", - "parameters": { - "codeSigningAccountName": "YourAccountName", - "certificateProfileName": "YourCertificateProfileName", - "api-version": "2023-06-15-preview" - }, - "responses": { - "200": { - "body": "MjUzNjlhMDQ3Yzc0YTQ3NjdiNjYzZTIzMWFlMTAxMDVkODMxM2Y5ZjNkNmU0YTVlOTQ1ZGZiMWQ5NDgzOWU0NQ==" - } - } -} diff --git a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListSignEkus.json b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListSignEkus.json deleted file mode 100644 index f02e52c98d6e..000000000000 --- a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListSignEkus.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_ListSignEkus", - "title": "Gets a list of extended key usage object identifiers that are allowed.", - "parameters": { - "codeSigningAccountName": "YourAccountName", - "certificateProfileName": "YourCertificateProfileName", - "api-version": "2023-06-15-preview" - }, - "responses": { - "200": { - "body": { - "ekus": [ - "1.3.6.1.5.5.7.3.8", - "1.3.6.1.5.5.7.3.10" - ] - } - } - } -} diff --git a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_Sign.json b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_Sign.json deleted file mode 100644 index 1d8643356d05..000000000000 --- a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_Sign.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_Sign", - "title": "Submit a codesign operation.", - "parameters": { - "codeSigningAccountName": "YourAccountName", - "certificateProfileName": "YourCertificateProfileName", - "api-version": "2023-06-15-preview", - "x-correlation-id": "9797c668-5b3c-4586-8e0c-2768c8160bad", - "body": { - "signatureAlgorithm": "RS256", - "digest": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ=", - "fileHashList": [ - "Y29uc2VjdGV0dXIgYWRpcGlzY2luZyBlbGl0", - "c2VkIGRvIGVpdXNtb2QgdGVtcG9yIGluY2lkaWR1bnQ=" - ], - "authenticodeHashList": [ - "dXQgbGFib3JlIGV0IGRvbG9yZSBtYWduYSBhbGlxdWE=", - "IFV0IGVuaW0gYWQgbWluaW0gdmVuaWFt" - ] - } - }, - "responses": { - "202": { - "headers": { - "azure-async-operation": "http://localhost:8080/operations/76f60a30-d088-42e0-b16d-b76b88d3cbe1" - }, - "body": { - "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signStatus": { - "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signature": "cXVpcyBub3N0cnVkIGV4ZXJjaXRhdGlvbiB1bGxhbWNvIGxhYm9yaXM=", - "signingCertificate": "bmlzaSB1dCBhbGlxdWlwIGV4IGVhIGNvbW1vZG8gY29uc2VxdWF0" - } - } - } - } -} diff --git a/specification/codesigning/CodeSigning/main.tsp b/specification/codesigning/CodeSigning/main.tsp deleted file mode 100644 index 5de3acc20400..000000000000 --- a/specification/codesigning/CodeSigning/main.tsp +++ /dev/null @@ -1,197 +0,0 @@ -import "@typespec/rest"; -import "@typespec/versioning"; -import "@azure-tools/typespec-azure-core"; - -using TypeSpec.Http; -using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.Core; - -@useAuth( - OAuth2Auth<[ - { - type: OAuth2FlowType.implicit, - authorizationUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", - scopes: ["https://codesigning.azure.net/.default"], - } - ]> -) -@service({ - title: "Azure CodeSigning", - summary: "Azure CodeSigning is a service that provides managed code signing for all.", -}) -@versioned(Azure.CodeSigning.Versions) -@server( - "https://{region}.codesigning.azure.net/", - "CodeSign and retrieve relevant information pertaining signing process.", - { - @doc("The Azure region wherein requests for signing will be sent.") - region: string, - } -) -@doc("Azure CodeSigning is a service that provides managed code signing for all.") -namespace Azure.CodeSigning; - -@doc("Versions info.") -enum Versions { - @doc("The 2023-06-15-preview version.") - @useDependency(Azure.Core.Versions.v1_0_Preview_2) - v2023_06_15_preview: "2023-06-15-preview", -} - -interface CertificateProfileOperations { - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "This is a custom operation status endpoint." - @summary("Gets the status of a codesigning operation.") - @doc("This status operation requires that a Sign request has been submitted and the operationId is known.") - @route("/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}/sign/{operationId}") - getCodeSigningStatus is Foundations.GetOperationStatus< - CodeSigningOptions, - CodeSignResult - >; - - #suppress "@azure-tools/typespec-azure-core/rpc-operation-request-body" "no body included, bytesbody is the response object." - #suppress "@azure-tools/typespec-azure-core/no-rpc-path-params" "Service needs rpc paths to follow pattern of other services." - @summary("Gets the codesigning root certificate on the certificate chain for that account and profile name.") - @doc("The root certificate is generated as part of the initial account creation and it is used to sign the bits for the profile provided.") - @route("/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}/sign/rootcert") - getSignRootCertificate is RpcOperation< - CodeSigningOptions, - BytesBody<"application/x-x509-ca-cert"> - >; - - @summary("Gets a list of extended key usage object identifiers that are allowed for this account and profile combination.") - @doc("The list of extended key usages are used to determine the purpose of the certificate usage as part of the codesigning operation.") - listSignEkus is StandardResourceOperations.ResourceList; - - @summary("Submit a codesign operation.") - @doc("Submit a codesign operation under the created codesign account and profile name provided.") - @pollingOperation(CertificateProfileOperations.getCodeSigningStatus) - sign is StandardResourceOperations.LongRunningResourceAction< - CertificateProfile, - CodeSigningSubmissionOptions, - CodeSignOperationStatus - >; -} - -@doc("Algorithms supported for signing.") -enum SignatureAlgorithm { - @doc("RSASSA-PKCS1-v1_5 using SHA-256 hash algorithm.") - RS256, - - @doc("RSASSA-PKCS1-v1_5 using SHA-384 hash algorithm.") - RS384, - - @doc("RSASSA-PKCS1-v1_5 using SHA-512 hash algorithm.") - RS512, - - @doc("RSASSA-PSS using SHA-256 hash algorithm.") - PS256, - - @doc("RSASSA-PSS using SHA-384 hash algorithm.") - PS384, - - @doc("RSASSA-PSS using SHA-512 hash algorithm.") - PS512, - - @doc("ECDSA using P-256 and SHA-256 hash algorithm.") - ES256, - - @doc("ECDSA using P-384 and SHA-384 hash algorithm.") - ES384, - - @doc("ECDSA using P-521 and SHA-512 hash algorithm.") - ES512, - - @doc("ECDSA using secp256k1 and SHA-256 hash algorithm.") - ES256K, -} - -@doc("Azure CodeSigning customer account created upon registration on the service.") -@resource("codesigningaccounts") -model CodeSigningAccount { - @key("codeSigningAccountName") - @visibility("read", "update") - @doc("Azure CodeSigning account name.") - codeSigningAccountName: string; -} - -@doc("Azure CodeSigning certificate profile configured on a codesign account.") -@resource("certificateprofiles") -@parentResource(CodeSigningAccount) -model CertificateProfile { - @key("certificateProfileName") - @visibility("read", "update") - @doc("Azure Codesigning certificate profile name under a codesign account.") - certificateProfileName: string; -} - -@doc("The codesign request information to be signed by the service.") -model CodeSigningSubmissionOptions { - @doc("The supported signature algorithm identifiers.") - signatureAlgorithm: SignatureAlgorithm; - - @doc("Content digest to codesign.") - digest: bytes; - - @doc("List of full file digital signatures.") - fileHashList?: bytes[]; - - @doc("List of authenticode digital signatures.") - authenticodeHashList?: bytes[]; -} - -@doc("The codesign operation status response.") -model CodeSignOperationStatus { - @doc("Unique Id of the operation.") - id: string; - - @doc("The result of the codesign operation including the signature and signing certificate.") - signResult?: CodeSignResult; -} - -@doc("The sign status model.") -model CodeSignResult { - @doc("Response Id of the codesign operation.") - operationId: string; - - @doc("Digital signature of the requested content digest.") - signature?: bytes; - - @doc(""" -Signing certificate corresponding to the private key used to codesign the requested -digest. -""") - signingCertificate?: bytes; -} - -@doc("Codesigning option parameters corresponding to the account and certificate profile name.") -model CodeSigningOptions { - @doc("CodeSigning account name.") - @path - codeSigningAccountName: string; - - @doc("Certificate profile name.") - @path - certificateProfileName: string; -} - -@doc("Extended key usage object identifier that are allowed.") -@resource("sign/eku") -@parentResource(CertificateProfile) -model ExtendedKeyUsage { - @key("ekus") - @visibility("read", "update") - @doc("An element of ekus.") - ekus: string[]; -} - -@doc("Public root certificate from the certificate chain.") -model BytesBody { - @doc("The root certificate of the certificate chain of this profile.") - @body - body: bytes; - - @doc("The content type of the x509 cert.") - @header - contentType: ContentType; -} diff --git a/specification/codesigning/CodeSigning/tspconfig.yaml b/specification/codesigning/CodeSigning/tspconfig.yaml deleted file mode 100644 index 9c9521757e51..000000000000 --- a/specification/codesigning/CodeSigning/tspconfig.yaml +++ /dev/null @@ -1,32 +0,0 @@ -parameters: - "service-dir": - default: "sdk/codesigning" -emit: - - "@azure-tools/typespec-autorest" -linter: - extends: - - "@azure-tools/typespec-azure-core/all" -options: - "@azure-tools/typespec-autorest": - azure-resource-provider-folder: "data-plane" - emitter-output-dir: "{project-root}/.." - examples-directory: "examples" - output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azure.codesigning.json" - "@azure-tools/typespec-python": - package-dir: "azure-codesigning" - package-name: "{package-dir}" - "@azure-tools/typespec-csharp": - clear-output-folder: true - package-dir: "Azure.CodeSigning" - model-namespace: false - namespace: "{package-dir}" - "@azure-tools/typespec-ts": - package-dir: "azurecodesigning-rest" - generateMetadata: true - generateTest: true - packageDetails: - name: "@azure-rest/azure-codesigning-rest" - description: "Azure Codesigning Service" - "@azure-tools/typespec-java": - package-dir: "azure-codesigning" - namespace: com.azure.codesigning diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json deleted file mode 100644 index 4be8817cbfee..000000000000 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json +++ /dev/null @@ -1,693 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure CodeSigning", - "version": "2023-06-15-preview", - "description": "Azure CodeSigning is a service that provides managed code signing for all.", - "x-typespec-generated": [ - { - "emitter": "@azure-tools/typespec-autorest" - } - ] - }, - "schemes": [ - "https" - ], - "x-ms-parameterized-host": { - "hostTemplate": "https://{region}.codesigning.azure.net/", - "useSchemePrefix": false, - "parameters": [ - { - "name": "region", - "in": "path", - "description": "The Azure region wherein requests for signing will be sent.", - "required": true, - "type": "string" - } - ] - }, - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], - "security": [ - { - "OAuth2Auth": [ - "https://codesigning.azure.net/.default" - ] - } - ], - "securityDefinitions": { - "OAuth2Auth": { - "type": "oauth2", - "flow": "implicit", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", - "scopes": { - "https://codesigning.azure.net/.default": "" - } - } - }, - "tags": [], - "paths": { - "/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}:sign": { - "post": { - "operationId": "CertificateProfileOperations_Sign", - "summary": "Submit a codesign operation.", - "description": "Submit a codesign operation under the created codesign account and profile name provided.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "codeSigningAccountName", - "in": "path", - "description": "Azure CodeSigning account name.", - "required": true, - "type": "string" - }, - { - "name": "certificateProfileName", - "in": "path", - "description": "Azure Codesigning certificate profile name under a codesign account.", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CodeSigningSubmissionOptions" - } - } - ], - "responses": { - "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", - "schema": { - "type": "object", - "description": "Provides status details for long running operations.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the operation." - }, - "status": { - "$ref": "#/definitions/Azure.Core.Foundations.OperationState", - "description": "The status of the operation" - }, - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "Error object that describes the error when status is \"Failed\"." - }, - "result": { - "$ref": "#/definitions/CodeSignOperationStatus", - "description": "The result of the operation." - } - }, - "required": [ - "id", - "status" - ] - }, - "headers": { - "Operation-Location": { - "type": "string", - "format": "uri", - "description": "The location for monitoring the operation state." - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Submit a codesign operation.": { - "$ref": "./examples/CertificateProfileOperations_Sign.json" - } - }, - "x-ms-long-running-operation": true - } - }, - "/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}/sign/{operationId}": { - "get": { - "operationId": "CertificateProfileOperations_GetCodeSigningStatus", - "summary": "Gets the status of a codesigning operation.", - "description": "This status operation requires that a Sign request has been submitted and the operationId is known.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "$ref": "#/parameters/CodeSigningOptions.codeSigningAccountName" - }, - { - "$ref": "#/parameters/CodeSigningOptions.certificateProfileName" - }, - { - "name": "operationId", - "in": "path", - "description": "The unique ID of the operation.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "type": "object", - "description": "Provides status details for long running operations.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the operation." - }, - "status": { - "$ref": "#/definitions/Azure.Core.Foundations.OperationState", - "description": "The status of the operation" - }, - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "Error object that describes the error when status is \"Failed\"." - }, - "result": { - "$ref": "#/definitions/CodeSignResult", - "description": "The result of the operation." - } - }, - "required": [ - "id", - "status" - ] - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Gets the status of a codesign operation.": { - "$ref": "./examples/CertificateProfileOperations_GetCodeSigningStatus.json" - } - } - } - }, - "/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}/sign/eku": { - "get": { - "operationId": "CertificateProfileOperations_ListSignEkus", - "summary": "Gets a list of extended key usage object identifiers that are allowed for this account and profile combination.", - "description": "The list of extended key usages are used to determine the purpose of the certificate usage as part of the codesigning operation.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "codeSigningAccountName", - "in": "path", - "description": "Azure CodeSigning account name.", - "required": true, - "type": "string" - }, - { - "name": "certificateProfileName", - "in": "path", - "description": "Azure Codesigning certificate profile name under a codesign account.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedExtendedKeyUsage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Gets a list of extended key usage object identifiers that are allowed.": { - "$ref": "./examples/CertificateProfileOperations_ListSignEkus.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}/sign/rootcert": { - "get": { - "operationId": "CertificateProfileOperations_GetSignRootCertificate", - "summary": "Gets the codesigning root certificate on the certificate chain for that account and profile name.", - "description": "The root certificate is generated as part of the initial account creation and it is used to sign the bits for the profile provided.", - "produces": [ - "application/x-x509-ca-cert", - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "$ref": "#/parameters/CodeSigningOptions.codeSigningAccountName" - }, - { - "$ref": "#/parameters/CodeSigningOptions.certificateProfileName" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "type": "file" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Gets the codesigning root certificate on the certificate chain for that account and profile name.": { - "$ref": "./examples/CertificateProfileOperations_GetSignRootCertificate.json" - } - } - } - } - }, - "definitions": { - "Azure.Core.Foundations.Error": { - "type": "object", - "description": "The error object.", - "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "message": { - "type": "string", - "description": "A human-readable representation of the error." - }, - "target": { - "type": "string", - "description": "The target of the error." - }, - "details": { - "type": "array", - "description": "An array of details about specific errors that led to this reported error.", - "items": { - "$ref": "#/definitions/Azure.Core.Foundations.Error" - }, - "x-ms-identifiers": [] - }, - "innererror": { - "$ref": "#/definitions/Azure.Core.Foundations.InnerError", - "description": "An object containing more specific information than the current object about the error." - } - }, - "required": [ - "code", - "message" - ] - }, - "Azure.Core.Foundations.ErrorResponse": { - "type": "object", - "description": "A response containing error details.", - "properties": { - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "The error object." - } - }, - "required": [ - "error" - ] - }, - "Azure.Core.Foundations.InnerError": { - "type": "object", - "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", - "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "innererror": { - "$ref": "#/definitions/Azure.Core.Foundations.InnerError", - "description": "Inner error." - } - } - }, - "Azure.Core.Foundations.OperationState": { - "type": "string", - "description": "Enum describing allowed operation states.", - "enum": [ - "NotStarted", - "Running", - "Succeeded", - "Failed", - "Canceled" - ], - "x-ms-enum": { - "name": "OperationState", - "modelAsString": true, - "values": [ - { - "name": "NotStarted", - "value": "NotStarted", - "description": "The operation has not started." - }, - { - "name": "Running", - "value": "Running", - "description": "The operation is in progress." - }, - { - "name": "Succeeded", - "value": "Succeeded", - "description": "The operation has completed successfully." - }, - { - "name": "Failed", - "value": "Failed", - "description": "The operation has failed." - }, - { - "name": "Canceled", - "value": "Canceled", - "description": "The operation has been canceled by the user." - } - ] - } - }, - "CertificateProfile": { - "type": "object", - "description": "Azure CodeSigning certificate profile configured on a codesign account.", - "properties": { - "certificateProfileName": { - "type": "string", - "description": "Azure Codesigning certificate profile name under a codesign account.", - "x-ms-mutability": [ - "read", - "update" - ] - } - }, - "required": [ - "certificateProfileName" - ] - }, - "CodeSignOperationStatus": { - "type": "object", - "description": "The codesign operation status response.", - "properties": { - "id": { - "type": "string", - "description": "Unique Id of the operation." - }, - "signResult": { - "$ref": "#/definitions/CodeSignResult", - "description": "The result of the codesign operation including the signature and signing certificate." - } - }, - "required": [ - "id" - ] - }, - "CodeSignResult": { - "type": "object", - "description": "The sign status model.", - "properties": { - "operationId": { - "type": "string", - "description": "Response Id of the codesign operation." - }, - "signature": { - "type": "string", - "format": "byte", - "description": "Digital signature of the requested content digest." - }, - "signingCertificate": { - "type": "string", - "format": "byte", - "description": "Signing certificate corresponding to the private key used to codesign the requested\ndigest." - } - }, - "required": [ - "operationId" - ] - }, - "CodeSigningAccount": { - "type": "object", - "description": "Azure CodeSigning customer account created upon registration on the service.", - "properties": { - "codeSigningAccountName": { - "type": "string", - "description": "Azure CodeSigning account name.", - "x-ms-mutability": [ - "read", - "update" - ] - } - }, - "required": [ - "codeSigningAccountName" - ] - }, - "CodeSigningSubmissionOptions": { - "type": "object", - "description": "The codesign request information to be signed by the service.", - "properties": { - "signatureAlgorithm": { - "$ref": "#/definitions/SignatureAlgorithm", - "description": "The supported signature algorithm identifiers." - }, - "digest": { - "type": "string", - "format": "byte", - "description": "Content digest to codesign." - }, - "fileHashList": { - "type": "array", - "description": "List of full file digital signatures.", - "items": { - "type": "string", - "format": "byte" - } - }, - "authenticodeHashList": { - "type": "array", - "description": "List of authenticode digital signatures.", - "items": { - "type": "string", - "format": "byte" - } - } - }, - "required": [ - "signatureAlgorithm", - "digest" - ] - }, - "ExtendedKeyUsage": { - "type": "object", - "description": "Extended key usage object identifier that are allowed.", - "properties": { - "ekus": { - "type": "array", - "description": "An element of ekus.", - "items": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "update" - ] - } - }, - "required": [ - "ekus" - ] - }, - "PagedExtendedKeyUsage": { - "type": "object", - "description": "Paged collection of ExtendedKeyUsage items", - "properties": { - "value": { - "type": "array", - "description": "The ExtendedKeyUsage items on this page", - "items": { - "$ref": "#/definitions/ExtendedKeyUsage" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "SignatureAlgorithm": { - "type": "string", - "description": "Algorithms supported for signing.", - "enum": [ - "RS256", - "RS384", - "RS512", - "PS256", - "PS384", - "PS512", - "ES256", - "ES384", - "ES512", - "ES256K" - ], - "x-ms-enum": { - "name": "SignatureAlgorithm", - "modelAsString": true, - "values": [ - { - "name": "RS256", - "value": "RS256", - "description": "RSASSA-PKCS1-v1_5 using SHA-256 hash algorithm." - }, - { - "name": "RS384", - "value": "RS384", - "description": "RSASSA-PKCS1-v1_5 using SHA-384 hash algorithm." - }, - { - "name": "RS512", - "value": "RS512", - "description": "RSASSA-PKCS1-v1_5 using SHA-512 hash algorithm." - }, - { - "name": "PS256", - "value": "PS256", - "description": "RSASSA-PSS using SHA-256 hash algorithm." - }, - { - "name": "PS384", - "value": "PS384", - "description": "RSASSA-PSS using SHA-384 hash algorithm." - }, - { - "name": "PS512", - "value": "PS512", - "description": "RSASSA-PSS using SHA-512 hash algorithm." - }, - { - "name": "ES256", - "value": "ES256", - "description": "ECDSA using P-256 and SHA-256 hash algorithm." - }, - { - "name": "ES384", - "value": "ES384", - "description": "ECDSA using P-384 and SHA-384 hash algorithm." - }, - { - "name": "ES512", - "value": "ES512", - "description": "ECDSA using P-521 and SHA-512 hash algorithm." - }, - { - "name": "ES256K", - "value": "ES256K", - "description": "ECDSA using secp256k1 and SHA-256 hash algorithm." - } - ] - } - }, - "Versions": { - "type": "string", - "description": "Versions info.", - "enum": [ - "2023-06-15-preview" - ], - "x-ms-enum": { - "name": "Versions", - "modelAsString": true, - "values": [ - { - "name": "v2023_06_15_preview", - "value": "2023-06-15-preview", - "description": "The 2023-06-15-preview version." - } - ] - } - } - }, - "parameters": { - "Azure.Core.Foundations.ApiVersionParameter": { - "name": "api-version", - "in": "query", - "description": "The API version to use for this operation.", - "required": true, - "type": "string", - "minLength": 1, - "x-ms-parameter-location": "method", - "x-ms-client-name": "apiVersion" - }, - "CodeSigningOptions.certificateProfileName": { - "name": "certificateProfileName", - "in": "path", - "description": "Certificate profile name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "CodeSigningOptions.codeSigningAccountName": { - "name": "codeSigningAccountName", - "in": "path", - "description": "CodeSigning account name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetCodeSigningStatus.json b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetCodeSigningStatus.json deleted file mode 100644 index 575d9f8e835d..000000000000 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetCodeSigningStatus.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_GetCodeSigningStatus", - "title": "Gets the status of a codesign operation.", - "parameters": { - "codeSigningAccountName": "YourAccountName", - "certificateProfileName": "YourCertificateProfileName", - "api-version": "2023-06-15-preview", - "operationId": "9797c668-5b3c-4586-8e0c-2768c8160bad" - }, - "responses": { - "200": { - "body": { - "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signStatus": { - "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signature": "OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4MjJjZDE1ZDZjMTViMGYwMGEwOA==", - "signingCertificate": "N2IzZDk3OWNhODMzMGE5NGZhN2U5ZTFiNDY2ZDhiOTllMGJjZGVhMWVjOTA1OTZjMGRjYzhkN2VmNmI0MzAwYw==" - } - } - } - } -} diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json deleted file mode 100644 index a30586b44a55..000000000000 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_GetSignRootCertificate", - "title": "Gets the codesigning root certificate on the certificate chain for that account and profile name.", - "parameters": { - "codeSigningAccountName": "YourAccountName", - "certificateProfileName": "YourCertificateProfileName", - "api-version": "2023-06-15-preview" - }, - "responses": { - "200": { - "body": "MjUzNjlhMDQ3Yzc0YTQ3NjdiNjYzZTIzMWFlMTAxMDVkODMxM2Y5ZjNkNmU0YTVlOTQ1ZGZiMWQ5NDgzOWU0NQ==" - } - } -} diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListSignEkus.json b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListSignEkus.json deleted file mode 100644 index f02e52c98d6e..000000000000 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListSignEkus.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_ListSignEkus", - "title": "Gets a list of extended key usage object identifiers that are allowed.", - "parameters": { - "codeSigningAccountName": "YourAccountName", - "certificateProfileName": "YourCertificateProfileName", - "api-version": "2023-06-15-preview" - }, - "responses": { - "200": { - "body": { - "ekus": [ - "1.3.6.1.5.5.7.3.8", - "1.3.6.1.5.5.7.3.10" - ] - } - } - } -} diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json deleted file mode 100644 index 1d8643356d05..000000000000 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_Sign", - "title": "Submit a codesign operation.", - "parameters": { - "codeSigningAccountName": "YourAccountName", - "certificateProfileName": "YourCertificateProfileName", - "api-version": "2023-06-15-preview", - "x-correlation-id": "9797c668-5b3c-4586-8e0c-2768c8160bad", - "body": { - "signatureAlgorithm": "RS256", - "digest": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ=", - "fileHashList": [ - "Y29uc2VjdGV0dXIgYWRpcGlzY2luZyBlbGl0", - "c2VkIGRvIGVpdXNtb2QgdGVtcG9yIGluY2lkaWR1bnQ=" - ], - "authenticodeHashList": [ - "dXQgbGFib3JlIGV0IGRvbG9yZSBtYWduYSBhbGlxdWE=", - "IFV0IGVuaW0gYWQgbWluaW0gdmVuaWFt" - ] - } - }, - "responses": { - "202": { - "headers": { - "azure-async-operation": "http://localhost:8080/operations/76f60a30-d088-42e0-b16d-b76b88d3cbe1" - }, - "body": { - "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signStatus": { - "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signature": "cXVpcyBub3N0cnVkIGV4ZXJjaXRhdGlvbiB1bGxhbWNvIGxhYm9yaXM=", - "signingCertificate": "bmlzaSB1dCBhbGlxdWlwIGV4IGVhIGNvbW1vZG8gY29uc2VxdWF0" - } - } - } - } -} diff --git a/specification/codesigning/data-plane/readme.md b/specification/codesigning/data-plane/readme.md deleted file mode 100644 index 1a43e8691a4b..000000000000 --- a/specification/codesigning/data-plane/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -# Azure.CodeSigning - -> see https://aka.ms/autorest - -This is the AutoRest configuration file for Azure.CodeSigning. - -## Getting Started - -To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: - -> `autorest readme.md` - -To see additional help and options, run: - -> `autorest --help` - -For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. - ---- - -## Configuration - -### Basic Information - -These are the global settings for the Azure.CodeSigning. - -```yaml -openapi-type: data-plane -tag: 2023-06-15-preview -``` - -### Tag: 2023-06-15-preview - -These settings apply only when `--tag=2023-06-15-preview` is specified on the command line. - -```yaml $(tag) == '2023-06-15-preview' -input-file: - - Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json -``` - ----