From b15388c3702d17b1d7563fe13fcc92dee32b1bf3 Mon Sep 17 00:00:00 2001 From: Jaxel Rojas Lopez Date: Fri, 22 Sep 2023 15:26:40 -0400 Subject: [PATCH 1/6] fix: update developer signing typespec project per Review feedback Renamed Azure.CodeSigning to Azure.Developer.Signing per SDK review Renamed sign operations to replace codesigning for signing Simplified models and prop names per Sdk review feedback Corrected example header for polling operation Corrected examples to use modified structure --- ...teProfileOperations_GetSigningStatus.json} | 8 +- ...fileOperations_ListExtendedKeyUsages.json} | 4 +- .../CertificateProfileOperations_Sign.json | 10 +- .../codesigning/CodeSigning/main.tsp | 111 ++++---- .../codesigning/CodeSigning/tspconfig.yaml | 16 +- .../azure.developer.signing.json} | 260 ++++++++---------- ...fileOperations_GetSignRootCertificate.json | 0 ...teProfileOperations_GetSigningStatus.json} | 6 +- ...fileOperations_ListExtendedKeyUsages.json} | 2 +- .../CertificateProfileOperations_Sign.json | 8 +- 10 files changed, 188 insertions(+), 237 deletions(-) rename specification/codesigning/{data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetCodeSigningStatus.json => CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetSigningStatus.json} (74%) rename specification/codesigning/{data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListSignEkus.json => CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListExtendedKeyUsages.json} (81%) rename specification/codesigning/data-plane/{Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json => Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json} (80%) rename specification/codesigning/data-plane/{Azure.CodeSigning => Azure.Developer.Signing}/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json (100%) rename specification/codesigning/{CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetCodeSigningStatus.json => data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json} (84%) rename specification/codesigning/{CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListSignEkus.json => data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json} (85%) rename specification/codesigning/data-plane/{Azure.CodeSigning => Azure.Developer.Signing}/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json (74%) diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetCodeSigningStatus.json b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetSigningStatus.json similarity index 74% rename from specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetCodeSigningStatus.json rename to specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetSigningStatus.json index 575d9f8e835d..4e0bbefd54b5 100644 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetCodeSigningStatus.json +++ b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetSigningStatus.json @@ -1,5 +1,5 @@ { - "operationId": "CertificateProfileOperations_GetCodeSigningStatus", + "operationId": "CertificateProfileOperations_GetSigningStatus", "title": "Gets the status of a codesign operation.", "parameters": { "codeSigningAccountName": "YourAccountName", @@ -11,10 +11,8 @@ "200": { "body": { "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signStatus": { - "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", + "status": "Succeeded", + "result": { "signature": "OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4MjJjZDE1ZDZjMTViMGYwMGEwOA==", "signingCertificate": "N2IzZDk3OWNhODMzMGE5NGZhN2U5ZTFiNDY2ZDhiOTllMGJjZGVhMWVjOTA1OTZjMGRjYzhkN2VmNmI0MzAwYw==" } diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListSignEkus.json b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListExtendedKeyUsages.json similarity index 81% rename from specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListSignEkus.json rename to specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListExtendedKeyUsages.json index f02e52c98d6e..cc918ae14676 100644 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListSignEkus.json +++ b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListExtendedKeyUsages.json @@ -1,5 +1,5 @@ { - "operationId": "CertificateProfileOperations_ListSignEkus", + "operationId": "CertificateProfileOperations_ListExtendedKeyUsages", "title": "Gets a list of extended key usage object identifiers that are allowed.", "parameters": { "codeSigningAccountName": "YourAccountName", @@ -9,7 +9,7 @@ "responses": { "200": { "body": { - "ekus": [ + "eku": [ "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 index 1d8643356d05..095c3e8319ee 100644 --- a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_Sign.json +++ b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_Sign.json @@ -22,16 +22,12 @@ "responses": { "202": { "headers": { - "azure-async-operation": "http://localhost:8080/operations/76f60a30-d088-42e0-b16d-b76b88d3cbe1" + "operation-location": "https://localhost:5001/codesigningaccount/account/certificateprofile/profile/sign/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" + "status": "In Progress", + "result": { } } } diff --git a/specification/codesigning/CodeSigning/main.tsp b/specification/codesigning/CodeSigning/main.tsp index 5de3acc20400..af5e1e1cdbe4 100644 --- a/specification/codesigning/CodeSigning/main.tsp +++ b/specification/codesigning/CodeSigning/main.tsp @@ -17,20 +17,20 @@ using Azure.Core; ]> ) @service({ - title: "Azure CodeSigning", - summary: "Azure CodeSigning is a service that provides managed code signing for all.", + title: "Azure Developer Signing", + summary: "Azure Developer Signing is a service that provides managed artifact signing for all.", }) -@versioned(Azure.CodeSigning.Versions) +@versioned(Azure.Developer.Signing.Versions) @server( "https://{region}.codesigning.azure.net/", - "CodeSign and retrieve relevant information pertaining signing process.", + "Sign 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("Azure Developer Signing is a service that provides managed artifact signing for all.") +namespace Azure.Developer.Signing; @doc("Versions info.") enum Versions { @@ -41,35 +41,35 @@ enum Versions { 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.") + @summary("Gets the status of a signing 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 + @route("/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign") + getSigningStatus is Foundations.GetOperationStatus< + SigningOptions, + SignResult >; #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.") + @summary("Gets the signing 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") + @route("/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign/rootcert") getSignRootCertificate is RpcOperation< - CodeSigningOptions, + SigningOptions, 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; + @doc("The list of extended key usages are used to determine the purpose of the certificate usage as part of the signing operation.") + listExtendedKeyUsages 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) + @summary("Submit a sign operation.") + @doc("Submit a sign operation under the created account and profile name provided.") + @pollingOperation(CertificateProfileOperations.getSigningStatus) sign is StandardResourceOperations.LongRunningResourceAction< - CertificateProfile, - CodeSigningSubmissionOptions, - CodeSignOperationStatus + CertificateProfileName, + SigningPayloadOptions, + SignResult >; } @@ -106,31 +106,31 @@ enum SignatureAlgorithm { ES256K, } -@doc("Azure CodeSigning customer account created upon registration on the service.") +@doc("Azure Developer Signing customer account created upon registration on the service.") @resource("codesigningaccounts") -model CodeSigningAccount { - @key("codeSigningAccountName") +model SigningAccount { + @key("accountName") @visibility("read", "update") - @doc("Azure CodeSigning account name.") - codeSigningAccountName: string; + @doc("Azure Developer Signing account name.") + accountName: string; } -@doc("Azure CodeSigning certificate profile configured on a codesign account.") +@doc("Azure Developer Signing certificate profile configured on an account.") @resource("certificateprofiles") -@parentResource(CodeSigningAccount) -model CertificateProfile { - @key("certificateProfileName") +@parentResource(SigningAccount) +model CertificateProfileName { + @key("certificateProfile") @visibility("read", "update") - @doc("Azure Codesigning certificate profile name under a codesign account.") - certificateProfileName: string; + @doc("Azure Developer Signing certificate profile name under an account.") + certificateProfile: string; } -@doc("The codesign request information to be signed by the service.") -model CodeSigningSubmissionOptions { +@doc("The artifact request information to be signed by the service.") +model SigningPayloadOptions { @doc("The supported signature algorithm identifiers.") signatureAlgorithm: SignatureAlgorithm; - @doc("Content digest to codesign.") + @doc("Content digest to sign.") digest: bytes; @doc("List of full file digital signatures.") @@ -140,49 +140,38 @@ model CodeSigningSubmissionOptions { 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; +model SignResult { @doc("Digital signature of the requested content digest.") signature?: bytes; @doc(""" -Signing certificate corresponding to the private key used to codesign the requested +Signing certificate corresponding to the private key used to sign the requested digest. """) signingCertificate?: bytes; } -@doc("Codesigning option parameters corresponding to the account and certificate profile name.") -model CodeSigningOptions { - @doc("CodeSigning account name.") +@doc("Signing option parameters corresponding to the account and certificate profile name.") +model SigningOptions { + @doc("Signing account name.") @path - codeSigningAccountName: string; + accountName: string; - @doc("Certificate profile name.") + @doc("Signing Certificate profile name.") @path - certificateProfileName: string; + certificateProfile: string; } -@doc("Extended key usage object identifier that are allowed.") +@doc("Extended key usage object identifier that are allowable.") @resource("sign/eku") -@parentResource(CertificateProfile) +@parentResource(CertificateProfileName) model ExtendedKeyUsage { - @key("ekus") - @visibility("read", "update") - @doc("An element of ekus.") - ekus: string[]; + @key("eku") + @visibility("read") + @doc("An oid string that represents an eku.") + eku: string; } @doc("Public root certificate from the certificate chain.") diff --git a/specification/codesigning/CodeSigning/tspconfig.yaml b/specification/codesigning/CodeSigning/tspconfig.yaml index 9c9521757e51..4bb1435b9401 100644 --- a/specification/codesigning/CodeSigning/tspconfig.yaml +++ b/specification/codesigning/CodeSigning/tspconfig.yaml @@ -11,22 +11,22 @@ options: 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" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azure.developer.signing.json" "@azure-tools/typespec-python": - package-dir: "azure-codesigning" + package-dir: "azure-developer-signing" package-name: "{package-dir}" "@azure-tools/typespec-csharp": clear-output-folder: true - package-dir: "Azure.CodeSigning" + package-dir: "Azure.Developer.Signing" model-namespace: false namespace: "{package-dir}" "@azure-tools/typespec-ts": - package-dir: "azurecodesigning-rest" + package-dir: "azure-developer-signing-rest" generateMetadata: true generateTest: true packageDetails: - name: "@azure-rest/azure-codesigning-rest" - description: "Azure Codesigning Service" + name: "@azure-rest/developer-signing" + description: "Azure developer signing service" "@azure-tools/typespec-java": - package-dir: "azure-codesigning" - namespace: com.azure.codesigning + package-dir: "com.azure.developer.signing" + namespace: Azure.Developer.Signing diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json similarity index 80% rename from specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json rename to specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json index 493dd4b0ae3e..8dfa3f303760 100644 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json +++ b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json @@ -1,9 +1,9 @@ { "swagger": "2.0", "info": { - "title": "Azure CodeSigning", + "title": "Azure Developer Signing", "version": "2023-06-15-preview", - "description": "Azure CodeSigning is a service that provides managed code signing for all.", + "description": "Azure Developer Signing is a service that provides managed artifact signing for all.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" @@ -51,26 +51,26 @@ }, "tags": [], "paths": { - "/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}:sign": { + "/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}:sign": { "post": { "operationId": "CertificateProfileOperations_Sign", - "summary": "Submit a codesign operation.", - "description": "Submit a codesign operation under the created codesign account and profile name provided.", + "summary": "Submit a sign operation.", + "description": "Submit a sign operation under the created account and profile name provided.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "codeSigningAccountName", + "name": "accountName", "in": "path", - "description": "Azure CodeSigning account name.", + "description": "Azure Developer Signing account name.", "required": true, "type": "string" }, { - "name": "certificateProfileName", + "name": "certificateProfile", "in": "path", - "description": "Azure Codesigning certificate profile name under a codesign account.", + "description": "Azure Developer Signing certificate profile name under an account.", "required": true, "type": "string" }, @@ -79,7 +79,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CodeSigningSubmissionOptions" + "$ref": "#/definitions/SigningPayloadOptions" } } ], @@ -103,7 +103,7 @@ "description": "Error object that describes the error when status is \"Failed\"." }, "result": { - "$ref": "#/definitions/CodeSignOperationStatus", + "$ref": "#/definitions/SignResult", "description": "The result of the operation." } }, @@ -141,10 +141,10 @@ "x-ms-long-running-operation": true } }, - "/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}/sign/{operationId}": { + "/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign/{operationId}": { "get": { - "operationId": "CertificateProfileOperations_GetCodeSigningStatus", - "summary": "Gets the status of a codesigning operation.", + "operationId": "CertificateProfileOperations_GetSigningStatus", + "summary": "Gets the status of a signing operation.", "description": "This status operation requires that a Sign request has been submitted and the operationId is known.", "parameters": [ { @@ -158,10 +158,10 @@ "type": "string" }, { - "$ref": "#/parameters/CodeSigningOptions.codeSigningAccountName" + "$ref": "#/parameters/SigningOptions.accountName" }, { - "$ref": "#/parameters/CodeSigningOptions.certificateProfileName" + "$ref": "#/parameters/SigningOptions.certificateProfile" } ], "responses": { @@ -184,7 +184,7 @@ "description": "Error object that describes the error when status is \"Failed\"." }, "result": { - "$ref": "#/definitions/CodeSignResult", + "$ref": "#/definitions/SignResult", "description": "The result of the operation." } }, @@ -209,31 +209,31 @@ }, "x-ms-examples": { "Gets the status of a codesign operation.": { - "$ref": "./examples/CertificateProfileOperations_GetCodeSigningStatus.json" + "$ref": "./examples/CertificateProfileOperations_GetSigningStatus.json" } } } }, - "/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}/sign/eku": { + "/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign/eku": { "get": { - "operationId": "CertificateProfileOperations_ListSignEkus", + "operationId": "CertificateProfileOperations_ListExtendedKeyUsages", "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.", + "description": "The list of extended key usages are used to determine the purpose of the certificate usage as part of the signing operation.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "codeSigningAccountName", + "name": "accountName", "in": "path", - "description": "Azure CodeSigning account name.", + "description": "Azure Developer Signing account name.", "required": true, "type": "string" }, { - "name": "certificateProfileName", + "name": "certificateProfile", "in": "path", - "description": "Azure Codesigning certificate profile name under a codesign account.", + "description": "Azure Developer Signing certificate profile name under an account.", "required": true, "type": "string" } @@ -260,7 +260,7 @@ }, "x-ms-examples": { "Gets a list of extended key usage object identifiers that are allowed.": { - "$ref": "./examples/CertificateProfileOperations_ListSignEkus.json" + "$ref": "./examples/CertificateProfileOperations_ListExtendedKeyUsages.json" } }, "x-ms-pageable": { @@ -268,10 +268,10 @@ } } }, - "/codesigningaccounts/{codeSigningAccountName}/certificateprofiles/{certificateProfileName}/sign/rootcert": { + "/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign/rootcert": { "get": { "operationId": "CertificateProfileOperations_GetSignRootCertificate", - "summary": "Gets the codesigning root certificate on the certificate chain for that account and profile name.", + "summary": "Gets the signing 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", @@ -282,10 +282,10 @@ "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/CodeSigningOptions.codeSigningAccountName" + "$ref": "#/parameters/SigningOptions.accountName" }, { - "$ref": "#/parameters/CodeSigningOptions.certificateProfileName" + "$ref": "#/parameters/SigningOptions.certificateProfile" } ], "responses": { @@ -414,13 +414,13 @@ ] } }, - "CertificateProfile": { + "CertificateProfileName": { "type": "object", - "description": "Azure CodeSigning certificate profile configured on a codesign account.", + "description": "Azure Developer Signing certificate profile configured on an account.", "properties": { - "certificateProfileName": { + "certificateProfile": { "type": "string", - "description": "Azure Codesigning certificate profile name under a codesign account.", + "description": "Azure Developer Signing certificate profile name under an account.", "x-ms-mutability": [ "read", "update" @@ -428,119 +428,21 @@ } }, "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" + "certificateProfile" ] }, "ExtendedKeyUsage": { "type": "object", - "description": "Extended key usage object identifier that are allowed.", + "description": "Extended key usage object identifier that are allowable.", "properties": { - "ekus": { - "type": "array", - "description": "An element of ekus.", - "items": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "update" - ] + "eku": { + "type": "string", + "description": "An oid string that represents an eku.", + "readOnly": true } }, "required": [ - "ekus" + "eku" ] }, "PagedExtendedKeyUsage": { @@ -565,6 +467,22 @@ "value" ] }, + "SignResult": { + "type": "object", + "description": "The sign status model.", + "properties": { + "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 sign the requested \ndigest." + } + } + }, "SignatureAlgorithm": { "type": "string", "description": "Algorithms supported for signing.", @@ -637,6 +555,58 @@ ] } }, + "SigningAccount": { + "type": "object", + "description": "Azure Developer Signing customer account created upon registration on the service.", + "properties": { + "accountName": { + "type": "string", + "description": "Azure Developer Signing account name.", + "x-ms-mutability": [ + "read", + "update" + ] + } + }, + "required": [ + "accountName" + ] + }, + "SigningPayloadOptions": { + "type": "object", + "description": "The artifact 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 sign." + }, + "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" + ] + }, "Versions": { "type": "string", "description": "Versions info.", @@ -667,18 +637,18 @@ "x-ms-parameter-location": "method", "x-ms-client-name": "apiVersion" }, - "CodeSigningOptions.certificateProfileName": { - "name": "certificateProfileName", + "SigningOptions.accountName": { + "name": "accountName", "in": "path", - "description": "Certificate profile name.", + "description": "Signing account name.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, - "CodeSigningOptions.codeSigningAccountName": { - "name": "codeSigningAccountName", + "SigningOptions.certificateProfile": { + "name": "certificateProfile", "in": "path", - "description": "CodeSigning account name.", + "description": "Signing Certificate profile 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_GetSignRootCertificate.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json similarity index 100% rename from specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json rename to specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json diff --git a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetCodeSigningStatus.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json similarity index 84% rename from specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetCodeSigningStatus.json rename to specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json index 575d9f8e835d..2e8b7044483b 100644 --- a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_GetCodeSigningStatus.json +++ b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json @@ -1,5 +1,5 @@ { - "operationId": "CertificateProfileOperations_GetCodeSigningStatus", + "operationId": "CertificateProfileOperations_GetSigningStatus", "title": "Gets the status of a codesign operation.", "parameters": { "codeSigningAccountName": "YourAccountName", @@ -11,10 +11,10 @@ "200": { "body": { "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", + "status": "Succeeded", "signStatus": { "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", + "status": "Succeeded", "signature": "OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4MjJjZDE1ZDZjMTViMGYwMGEwOA==", "signingCertificate": "N2IzZDk3OWNhODMzMGE5NGZhN2U5ZTFiNDY2ZDhiOTllMGJjZGVhMWVjOTA1OTZjMGRjYzhkN2VmNmI0MzAwYw==" } diff --git a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListSignEkus.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json similarity index 85% rename from specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListSignEkus.json rename to specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json index f02e52c98d6e..56faa9fd5b47 100644 --- a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_ListSignEkus.json +++ b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json @@ -1,5 +1,5 @@ { - "operationId": "CertificateProfileOperations_ListSignEkus", + "operationId": "CertificateProfileOperations_ListExtendedKeyUsages", "title": "Gets a list of extended key usage object identifiers that are allowed.", "parameters": { "codeSigningAccountName": "YourAccountName", diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json similarity index 74% rename from specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json rename to specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json index 1d8643356d05..b99bb9deaa36 100644 --- a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json +++ b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json @@ -22,16 +22,14 @@ "responses": { "202": { "headers": { - "azure-async-operation": "http://localhost:8080/operations/76f60a30-d088-42e0-b16d-b76b88d3cbe1" + "operation-location": "https://localhost:5001/codesigningaccount/account/certificateprofile/profile/sign/76f60a30-d088-42e0-b16d-b76b88d3cbe1" }, "body": { "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", + "status": "In Progress", "signStatus": { "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "InProgress", - "signature": "cXVpcyBub3N0cnVkIGV4ZXJjaXRhdGlvbiB1bGxhbWNvIGxhYm9yaXM=", - "signingCertificate": "bmlzaSB1dCBhbGlxdWlwIGV4IGVhIGNvbW1vZG8gY29uc2VxdWF0" + "status": "In Progress" } } } From 870d7a47b8282cd72636a0da04a913b77fc96390 Mon Sep 17 00:00:00 2001 From: Jaxel Rojas Lopez Date: Thu, 12 Oct 2023 11:28:02 -0400 Subject: [PATCH 2/6] docs: update readme.md to reflect doc change --- specification/codesigning/data-plane/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/codesigning/data-plane/readme.md b/specification/codesigning/data-plane/readme.md index 1a43e8691a4b..a15529e60ea6 100644 --- a/specification/codesigning/data-plane/readme.md +++ b/specification/codesigning/data-plane/readme.md @@ -1,8 +1,8 @@ -# Azure.CodeSigning +# Azure.Developer.Signing > see https://aka.ms/autorest -This is the AutoRest configuration file for Azure.CodeSigning. +This is the AutoRest configuration file for Azure.Developer.Signing. ## Getting Started @@ -22,7 +22,7 @@ For other options on installation see [Installing AutoRest](https://aka.ms/autor ### Basic Information -These are the global settings for the Azure.CodeSigning. +These are the global settings for the Azure.Developer.Signing. ```yaml openapi-type: data-plane @@ -35,7 +35,7 @@ These settings apply only when `--tag=2023-06-15-preview` is specified on the co ```yaml $(tag) == '2023-06-15-preview' input-file: - - Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json + - Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json ``` --- From 486dfe7db9282718849c22d497f8e503dad0fbb7 Mon Sep 17 00:00:00 2001 From: Jaxel Rojas Lopez Date: Thu, 12 Oct 2023 12:06:56 -0400 Subject: [PATCH 3/6] style: prettier fix --- .../2023-06-15-preview/CertificateProfileOperations_Sign.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 index 095c3e8319ee..92629887cf02 100644 --- a/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_Sign.json +++ b/specification/codesigning/CodeSigning/examples/2023-06-15-preview/CertificateProfileOperations_Sign.json @@ -27,8 +27,7 @@ "body": { "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", "status": "In Progress", - "result": { - } + "result": {} } } } From f6782f3be31ca2124dfc0b922f61d0f30a86afda Mon Sep 17 00:00:00 2001 From: Jaxel Rojas Lopez Date: Thu, 12 Oct 2023 12:17:31 -0400 Subject: [PATCH 4/6] fix: temporarily adding the azure.codesigning.json file to get ci build to generate sdks --- .../2023-06-15-preview/azure.codesigning.json | 657 ++++++++++++++++++ ...fileOperations_GetSignRootCertificate.json | 14 + ...ateProfileOperations_GetSigningStatus.json | 24 + ...ofileOperations_ListExtendedKeyUsages.json | 19 + .../CertificateProfileOperations_Sign.json | 37 + 5 files changed, 751 insertions(+) create mode 100644 specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json create mode 100644 specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json create mode 100644 specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json create mode 100644 specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json create mode 100644 specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json 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 new file mode 100644 index 000000000000..8dfa3f303760 --- /dev/null +++ b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json @@ -0,0 +1,657 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Developer Signing", + "version": "2023-06-15-preview", + "description": "Azure Developer Signing is a service that provides managed artifact 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/{accountName}/certificateprofiles/{certificateProfile}:sign": { + "post": { + "operationId": "CertificateProfileOperations_Sign", + "summary": "Submit a sign operation.", + "description": "Submit a sign operation under the created account and profile name provided.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "Azure Developer Signing account name.", + "required": true, + "type": "string" + }, + { + "name": "certificateProfile", + "in": "path", + "description": "Azure Developer Signing certificate profile name under an account.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SigningPayloadOptions" + } + } + ], + "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/SignResult", + "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/{accountName}/certificateprofiles/{certificateProfile}/sign/{operationId}": { + "get": { + "operationId": "CertificateProfileOperations_GetSigningStatus", + "summary": "Gets the status of a signing 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" + }, + { + "name": "operationId", + "in": "path", + "description": "The unique ID of the operation.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SigningOptions.accountName" + }, + { + "$ref": "#/parameters/SigningOptions.certificateProfile" + } + ], + "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/SignResult", + "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_GetSigningStatus.json" + } + } + } + }, + "/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign/eku": { + "get": { + "operationId": "CertificateProfileOperations_ListExtendedKeyUsages", + "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 signing operation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "Azure Developer Signing account name.", + "required": true, + "type": "string" + }, + { + "name": "certificateProfile", + "in": "path", + "description": "Azure Developer Signing certificate profile name under an 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_ListExtendedKeyUsages.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign/rootcert": { + "get": { + "operationId": "CertificateProfileOperations_GetSignRootCertificate", + "summary": "Gets the signing 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/SigningOptions.accountName" + }, + { + "$ref": "#/parameters/SigningOptions.certificateProfile" + } + ], + "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": [ + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "OperationState", + "modelAsString": true, + "values": [ + { + "name": "InProgress", + "value": "InProgress", + "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." + } + ] + } + }, + "CertificateProfileName": { + "type": "object", + "description": "Azure Developer Signing certificate profile configured on an account.", + "properties": { + "certificateProfile": { + "type": "string", + "description": "Azure Developer Signing certificate profile name under an account.", + "x-ms-mutability": [ + "read", + "update" + ] + } + }, + "required": [ + "certificateProfile" + ] + }, + "ExtendedKeyUsage": { + "type": "object", + "description": "Extended key usage object identifier that are allowable.", + "properties": { + "eku": { + "type": "string", + "description": "An oid string that represents an eku.", + "readOnly": true + } + }, + "required": [ + "eku" + ] + }, + "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" + ] + }, + "SignResult": { + "type": "object", + "description": "The sign status model.", + "properties": { + "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 sign the requested \ndigest." + } + } + }, + "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." + } + ] + } + }, + "SigningAccount": { + "type": "object", + "description": "Azure Developer Signing customer account created upon registration on the service.", + "properties": { + "accountName": { + "type": "string", + "description": "Azure Developer Signing account name.", + "x-ms-mutability": [ + "read", + "update" + ] + } + }, + "required": [ + "accountName" + ] + }, + "SigningPayloadOptions": { + "type": "object", + "description": "The artifact 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 sign." + }, + "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" + ] + }, + "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" + }, + "SigningOptions.accountName": { + "name": "accountName", + "in": "path", + "description": "Signing account name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SigningOptions.certificateProfile": { + "name": "certificateProfile", + "in": "path", + "description": "Signing Certificate profile 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_GetSignRootCertificate.json b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json new file mode 100644 index 000000000000..a30586b44a55 --- /dev/null +++ b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json @@ -0,0 +1,14 @@ +{ + "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_GetSigningStatus.json b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json new file mode 100644 index 000000000000..2e8b7044483b --- /dev/null +++ b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json @@ -0,0 +1,24 @@ +{ + "operationId": "CertificateProfileOperations_GetSigningStatus", + "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": "Succeeded", + "signStatus": { + "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", + "status": "Succeeded", + "signature": "OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4MjJjZDE1ZDZjMTViMGYwMGEwOA==", + "signingCertificate": "N2IzZDk3OWNhODMzMGE5NGZhN2U5ZTFiNDY2ZDhiOTllMGJjZGVhMWVjOTA1OTZjMGRjYzhkN2VmNmI0MzAwYw==" + } + } + } + } +} diff --git a/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json new file mode 100644 index 000000000000..56faa9fd5b47 --- /dev/null +++ b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json @@ -0,0 +1,19 @@ +{ + "operationId": "CertificateProfileOperations_ListExtendedKeyUsages", + "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 new file mode 100644 index 000000000000..b99bb9deaa36 --- /dev/null +++ b/specification/codesigning/data-plane/Azure.CodeSigning/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json @@ -0,0 +1,37 @@ +{ + "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": { + "operation-location": "https://localhost:5001/codesigningaccount/account/certificateprofile/profile/sign/76f60a30-d088-42e0-b16d-b76b88d3cbe1" + }, + "body": { + "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", + "status": "In Progress", + "signStatus": { + "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", + "status": "In Progress" + } + } + } + } +} From 2907447b556ec6fe260ddb1cd7745cfd50149d50 Mon Sep 17 00:00:00 2001 From: Jaxel Rojas Lopez Date: Thu, 12 Oct 2023 12:40:37 -0400 Subject: [PATCH 5/6] Revert "docs: update readme.md to reflect doc change" This reverts commit 870d7a47b8282cd72636a0da04a913b77fc96390. --- specification/codesigning/data-plane/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/codesigning/data-plane/readme.md b/specification/codesigning/data-plane/readme.md index a15529e60ea6..1a43e8691a4b 100644 --- a/specification/codesigning/data-plane/readme.md +++ b/specification/codesigning/data-plane/readme.md @@ -1,8 +1,8 @@ -# Azure.Developer.Signing +# Azure.CodeSigning > see https://aka.ms/autorest -This is the AutoRest configuration file for Azure.Developer.Signing. +This is the AutoRest configuration file for Azure.CodeSigning. ## Getting Started @@ -22,7 +22,7 @@ For other options on installation see [Installing AutoRest](https://aka.ms/autor ### Basic Information -These are the global settings for the Azure.Developer.Signing. +These are the global settings for the Azure.CodeSigning. ```yaml openapi-type: data-plane @@ -35,7 +35,7 @@ These settings apply only when `--tag=2023-06-15-preview` is specified on the co ```yaml $(tag) == '2023-06-15-preview' input-file: - - Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json + - Azure.CodeSigning/preview/2023-06-15-preview/azure.codesigning.json ``` --- From 646dfc20708c7a926239bb42a50e42947d0cc7fc Mon Sep 17 00:00:00 2001 From: Jaxel Rojas Lopez Date: Thu, 12 Oct 2023 12:48:32 -0400 Subject: [PATCH 6/6] Removing new packages in favor of the old ones to see if we can generate typespec sdk --- .../azure.developer.signing.json | 657 ------------------ ...fileOperations_GetSignRootCertificate.json | 14 - ...ateProfileOperations_GetSigningStatus.json | 24 - ...ofileOperations_ListExtendedKeyUsages.json | 19 - .../CertificateProfileOperations_Sign.json | 37 - 5 files changed, 751 deletions(-) delete mode 100644 specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json delete mode 100644 specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json delete mode 100644 specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json delete mode 100644 specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json delete mode 100644 specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json diff --git a/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json deleted file mode 100644 index 8dfa3f303760..000000000000 --- a/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/azure.developer.signing.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Developer Signing", - "version": "2023-06-15-preview", - "description": "Azure Developer Signing is a service that provides managed artifact 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/{accountName}/certificateprofiles/{certificateProfile}:sign": { - "post": { - "operationId": "CertificateProfileOperations_Sign", - "summary": "Submit a sign operation.", - "description": "Submit a sign operation under the created account and profile name provided.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "accountName", - "in": "path", - "description": "Azure Developer Signing account name.", - "required": true, - "type": "string" - }, - { - "name": "certificateProfile", - "in": "path", - "description": "Azure Developer Signing certificate profile name under an account.", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SigningPayloadOptions" - } - } - ], - "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/SignResult", - "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/{accountName}/certificateprofiles/{certificateProfile}/sign/{operationId}": { - "get": { - "operationId": "CertificateProfileOperations_GetSigningStatus", - "summary": "Gets the status of a signing 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" - }, - { - "name": "operationId", - "in": "path", - "description": "The unique ID of the operation.", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/SigningOptions.accountName" - }, - { - "$ref": "#/parameters/SigningOptions.certificateProfile" - } - ], - "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/SignResult", - "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_GetSigningStatus.json" - } - } - } - }, - "/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign/eku": { - "get": { - "operationId": "CertificateProfileOperations_ListExtendedKeyUsages", - "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 signing operation.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "accountName", - "in": "path", - "description": "Azure Developer Signing account name.", - "required": true, - "type": "string" - }, - { - "name": "certificateProfile", - "in": "path", - "description": "Azure Developer Signing certificate profile name under an 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_ListExtendedKeyUsages.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/codesigningaccounts/{accountName}/certificateprofiles/{certificateProfile}/sign/rootcert": { - "get": { - "operationId": "CertificateProfileOperations_GetSignRootCertificate", - "summary": "Gets the signing 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/SigningOptions.accountName" - }, - { - "$ref": "#/parameters/SigningOptions.certificateProfile" - } - ], - "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": [ - "InProgress", - "Succeeded", - "Failed", - "Canceled" - ], - "x-ms-enum": { - "name": "OperationState", - "modelAsString": true, - "values": [ - { - "name": "InProgress", - "value": "InProgress", - "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." - } - ] - } - }, - "CertificateProfileName": { - "type": "object", - "description": "Azure Developer Signing certificate profile configured on an account.", - "properties": { - "certificateProfile": { - "type": "string", - "description": "Azure Developer Signing certificate profile name under an account.", - "x-ms-mutability": [ - "read", - "update" - ] - } - }, - "required": [ - "certificateProfile" - ] - }, - "ExtendedKeyUsage": { - "type": "object", - "description": "Extended key usage object identifier that are allowable.", - "properties": { - "eku": { - "type": "string", - "description": "An oid string that represents an eku.", - "readOnly": true - } - }, - "required": [ - "eku" - ] - }, - "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" - ] - }, - "SignResult": { - "type": "object", - "description": "The sign status model.", - "properties": { - "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 sign the requested \ndigest." - } - } - }, - "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." - } - ] - } - }, - "SigningAccount": { - "type": "object", - "description": "Azure Developer Signing customer account created upon registration on the service.", - "properties": { - "accountName": { - "type": "string", - "description": "Azure Developer Signing account name.", - "x-ms-mutability": [ - "read", - "update" - ] - } - }, - "required": [ - "accountName" - ] - }, - "SigningPayloadOptions": { - "type": "object", - "description": "The artifact 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 sign." - }, - "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" - ] - }, - "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" - }, - "SigningOptions.accountName": { - "name": "accountName", - "in": "path", - "description": "Signing account name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "SigningOptions.certificateProfile": { - "name": "certificateProfile", - "in": "path", - "description": "Signing Certificate profile name.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSignRootCertificate.json deleted file mode 100644 index a30586b44a55..000000000000 --- a/specification/codesigning/data-plane/Azure.Developer.Signing/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.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json deleted file mode 100644 index 2e8b7044483b..000000000000 --- a/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_GetSigningStatus.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_GetSigningStatus", - "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": "Succeeded", - "signStatus": { - "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "Succeeded", - "signature": "OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4MjJjZDE1ZDZjMTViMGYwMGEwOA==", - "signingCertificate": "N2IzZDk3OWNhODMzMGE5NGZhN2U5ZTFiNDY2ZDhiOTllMGJjZGVhMWVjOTA1OTZjMGRjYzhkN2VmNmI0MzAwYw==" - } - } - } - } -} diff --git a/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json deleted file mode 100644 index 56faa9fd5b47..000000000000 --- a/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_ListExtendedKeyUsages.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "operationId": "CertificateProfileOperations_ListExtendedKeyUsages", - "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.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json b/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json deleted file mode 100644 index b99bb9deaa36..000000000000 --- a/specification/codesigning/data-plane/Azure.Developer.Signing/preview/2023-06-15-preview/examples/CertificateProfileOperations_Sign.json +++ /dev/null @@ -1,37 +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": { - "operation-location": "https://localhost:5001/codesigningaccount/account/certificateprofile/profile/sign/76f60a30-d088-42e0-b16d-b76b88d3cbe1" - }, - "body": { - "id": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "In Progress", - "signStatus": { - "operationId": "76f60a30-d088-42e0-b16d-b76b88d3cbe1", - "status": "In Progress" - } - } - } - } -}