diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/common.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/common.json new file mode 100644 index 000000000000..c362b6d05aec --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/common.json @@ -0,0 +1,47 @@ +{ + "swagger": "2.0", + "info": { + "version": "2024-01-26-preview", + "title": "ConfidentialLedgerClient", + "description": "The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service." + }, + "paths": {}, + "definitions": { + "ConfidentialLedgerError": { + "description": "An error response from Confidential Ledger.", + "properties": { + "error": { + "readOnly": true, + "$ref": "#/definitions/ConfidentialLedgerErrorBody" + } + }, + "type": "object" + }, + "ConfidentialLedgerErrorBody": { + "description": "An error response from Confidential Ledger.", + "properties": { + "code": { + "type": "string", + "readOnly": true, + "description": "The error code." + }, + "message": { + "type": "string", + "readOnly": true, + "description": "The error message." + } + }, + "x-nullable": true, + "type": "object" + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to be used with the HTTP request." + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/confidentialledger.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/confidentialledger.json new file mode 100644 index 000000000000..7ccdab62c73d --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/confidentialledger.json @@ -0,0 +1,1122 @@ +{ + "swagger": "2.0", + "info": { + "version": "2024-01-26-preview", + "title": "ConfidentialLedgerClient", + "description": "The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service." + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "positionInOperation": "first", + "parameters": [ + { + "name": "endpoint", + "description": "The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com", + "required": true, + "type": "string", + "in": "path", + "format": "url", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + ] + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/app/governance/constitution": { + "get": { + "operationId": "GetConstitution", + "x-ms-examples": { + "GetConstitution": { + "$ref": "./examples/ledger/GetConstitution.json" + } + }, + "summary": "Gets the constitution used for governance.", + "description": "The constitution is a script that assesses and applies proposals from consortium members.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The constitution.", + "schema": { + "$ref": "#/definitions/Constitution" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/governance/members": { + "get": { + "operationId": "ListConsortiumMembers", + "x-ms-examples": { + "ListConsortiumMembers": { + "$ref": "./examples/ledger/ListConsortiumMembers.json" + } + }, + "x-ms-pageable": { + "itemName": "members", + "nextLinkName": "nextLink" + }, + "summary": "Lists the consortium members.", + "description": "Consortium members can manage the Confidential Ledger.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List of consortium members.", + "schema": { + "$ref": "#/definitions/Consortium" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/enclaveQuotes": { + "get": { + "operationId": "GetEnclaveQuotes", + "x-ms-examples": { + "GetEnclaveQuotes": { + "$ref": "./examples/ledger/GetEnclaveQuotes.json" + } + }, + "summary": "Gets quotes for all nodes of the Confidential Ledger.", + "description": "A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Response containing enclave quotes.", + "schema": { + "$ref": "#/definitions/ConfidentialLedgerEnclaves" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/collections": { + "get": { + "operationId": "ListCollections", + "x-ms-examples": { + "GetCollectionIds": { + "$ref": "./examples/ledger/ListCollections.json" + } + }, + "x-ms-pageable": { + "itemName": "collections", + "nextLinkName": "nextLink" + }, + "summary": "Retrieves a list of collection ids present in the Confidential Ledger", + "description": "Collection ids are user-created collections of ledger entries", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List of collections", + "schema": { + "$ref": "#/definitions/PagedCollections" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/transactions": { + "get": { + "operationId": "ListLedgerEntries", + "x-ms-examples": { + "ListLedgerEntries": { + "$ref": "./examples/ledger/ListLedgerEntries.json" + } + }, + "x-ms-pageable": { + "itemName": "entries", + "nextLinkName": "nextLink" + }, + "summary": "Gets ledger entries from a collection corresponding to a range.", + "description": "A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CollectionIdParameter" + }, + { + "$ref": "#/parameters/TransactionIdFromParameter" + }, + { + "$ref": "#/parameters/TransactionIdToParameter" + } + ], + "responses": { + "200": { + "description": "Ledger entries in the specified range.", + "schema": { + "$ref": "#/definitions/PagedLedgerEntries" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + }, + "post": { + "operationId": "CreateLedgerEntry", + "x-ms-examples": { + "CreateLedgerEntry": { + "$ref": "./examples/ledger/CreateLedgerEntry.json" + } + }, + "summary": "Writes a ledger entry.", + "description": "A collection id may optionally be specified.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CollectionIdParameter" + }, + { + "in": "body", + "name": "entry", + "description": "Ledger entry.", + "required": true, + "schema": { + "$ref": "#/definitions/LedgerEntry" + } + } + ], + "responses": { + "200": { + "description": "Returns the transaction id at which the write will be durably stored.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string", + "description": "The transaction id at which this write will become durable." + } + }, + "schema": { + "$ref": "#/definitions/LedgerWriteResult" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/transactions/{transactionId}": { + "get": { + "operationId": "GetLedgerEntry", + "x-ms-examples": { + "GetLedgerEntry": { + "$ref": "./examples/ledger/GetLedgerEntry.json" + } + }, + "summary": "Gets the ledger entry at the specified transaction id. A collection id may optionally be specified to indicate the collection from which to fetch the value.", + "description": "To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CollectionIdParameter" + }, + { + "$ref": "#/parameters/TransactionIdParameter" + } + ], + "responses": { + "200": { + "description": "The result of querying the Confidential Ledger.", + "schema": { + "$ref": "#/definitions/LedgerQueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/transactions/{transactionId}/receipt": { + "get": { + "operationId": "GetReceipt", + "x-ms-examples": { + "GetReceipt": { + "$ref": "./examples/ledger/GetReceipt.json" + } + }, + "summary": "Gets a receipt certifying ledger contents at a particular transaction id.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TransactionIdParameter" + } + ], + "responses": { + "200": { + "description": "The receipt for the write occurring at the transaction id.", + "schema": { + "$ref": "#/definitions/TransactionReceipt" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/transactions/{transactionId}/status": { + "get": { + "operationId": "GetTransactionStatus", + "x-ms-examples": { + "GetTransactionStatus": { + "$ref": "./examples/ledger/GetTransactionStatus.json" + } + }, + "summary": "Gets the status of an entry identified by a transaction id.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TransactionIdParameter" + } + ], + "responses": { + "200": { + "description": "The status of the entry recorded at the specified transaction id.", + "schema": { + "$ref": "#/definitions/TransactionStatus" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/transactions/current": { + "get": { + "operationId": "GetCurrentLedgerEntry", + "x-ms-examples": { + "GetCurrentLedgerEntry": { + "$ref": "./examples/ledger/GetCurrentLedgerEntry.json" + } + }, + "summary": "Gets the current value available in the ledger.", + "description": "A collection id may optionally be specified.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CollectionIdParameter" + } + ], + "responses": { + "200": { + "description": "The current ledger entry available on the receiving node. Non-primary nodes may return older values.", + "schema": { + "$ref": "#/definitions/LedgerEntry" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/users": { + "get": { + "operationId": "ListUsers", + "x-ms-examples": { + "ListUserEntries": { + "$ref": "./examples/ledger/ListUsers.json" + } + }, + "x-ms-pageable": { + "itemName": "users", + "nextLinkName": "nextLink" + }, + "summary": "Gets details on a list of users.", + "description": "All users' object IDs and roles will be returned.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Users in the paged specified range.", + "schema": { + "$ref": "#/definitions/PagedUsers" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + }, + "/app/users/{userId}": { + "delete": { + "operationId": "DeleteUser", + "x-ms-examples": { + "DeleteUser": { + "$ref": "./examples/ledger/DeleteUser.json" + } + }, + "summary": "Deletes a user from the Confidential Ledger.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/UserIdParameter" + } + ], + "responses": { + "204": { + "description": "The specified user is deleted." + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + }, + "get": { + "operationId": "GetUser", + "x-ms-examples": { + "GetUser": { + "$ref": "./examples/ledger/GetUser.json" + } + }, + "summary": "Gets a user.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/UserIdParameter" + } + ], + "responses": { + "200": { + "description": "Details about the specified user.", + "schema": { + "$ref": "#/definitions/LedgerUser" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + }, + "patch": { + "operationId": "CreateOrUpdateUser", + "x-ms-examples": { + "CreateOrUpdateUser": { + "$ref": "./examples/ledger/CreateOrUpdateUser.json" + } + }, + "summary": "Adds a user or updates a user's fields.", + "description": "A JSON merge patch is applied for existing users", + "consumes": [ + "application/merge-patch+json" + ], + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/UserIdParameter" + }, + { + "$ref": "#/parameters/UserDetailsParameter" + } + ], + "responses": { + "200": { + "description": "User created or updated successfully.", + "schema": { + "$ref": "#/definitions/LedgerUser" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + } + }, + "definitions": { + "ApplicationClaims": { + "description": "List of application claims.", + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationClaim" + } + }, + "ApplicationClaim": { + "description": "A claim of a ledger application.", + "required": [ + "kind" + ], + "properties": { + "digest": { + "$ref": "#/definitions/ClaimDigest" + }, + "kind": { + "$ref": "#/definitions/ApplicationClaimKind" + }, + "ledgerEntry": { + "$ref": "#/definitions/LedgerEntryClaim" + } + }, + "type": "object" + }, + "ApplicationClaimKind": { + "type": "string", + "description": "Represents the kind of an application claim.", + "enum": [ + "LedgerEntry", + "ClaimDigest" + ], + "x-ms-enum": { + "name": "ApplicationClaimKind", + "modelAsString": true + } + }, + "ApplicationClaimProtocol": { + "type": "string", + "description": "Represents the protocol to be used to compute the digest of a claim from the given claim data.", + "enum": [ + "LedgerEntryV1" + ], + "x-ms-enum": { + "name": "ApplicationClaimProtocol", + "modelAsString": true + } + }, + "ClaimDigest": { + "description": "An application claim in digested form.", + "required": [ + "protocol" + ], + "properties": { + "value": { + "type": "string", + "description": "The digest of the application claim, in hexadecimal form." + }, + "protocol": { + "$ref": "#/definitions/ApplicationClaimProtocol" + } + }, + "type": "object" + }, + "LedgerEntryClaim": { + "description": "An application claim derived from ledger entry data.", + "required": [ + "protocol" + ], + "properties": { + "collectionId": { + "description": "Identifier of a collection.", + "type": "string" + }, + "contents": { + "description": "Contents of a ledger entry.", + "type": "string" + }, + "secretKey": { + "type": "string", + "description": "Base64-encoded secret key." + }, + "protocol": { + "$ref": "#/definitions/ApplicationClaimProtocol" + } + }, + "type": "object" + }, + "ConfidentialLedgerEnclaves": { + "description": "Information about the enclaves running the Confidential Ledger.", + "required": [ + "currentNodeId", + "enclaveQuotes" + ], + "properties": { + "currentNodeId": { + "description": "Id of the Confidential Ledger node responding to the request.", + "$ref": "#/definitions/EntityId" + }, + "enclaveQuotes": { + "$ref": "#/definitions/EnclaveQuotes" + } + }, + "type": "object" + }, + "Consortium": { + "description": "List of members in the consortium.", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsortiumMember" + } + }, + "nextLink": { + "description": "Path from which to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ConsortiumMember": { + "description": "Describes a member of the consortium.", + "required": [ + "certificate", + "id" + ], + "properties": { + "certificate": { + "type": "string", + "description": "PEM-encoded certificate associated with the member." + }, + "id": { + "description": "Identifier assigned to the member.", + "$ref": "#/definitions/EntityId" + } + }, + "type": "object" + }, + "Constitution": { + "description": "The governance script for the application.", + "required": [ + "digest", + "script" + ], + "properties": { + "digest": { + "description": "SHA256 digest of the constitution script.", + "type": "string" + }, + "script": { + "description": "Contents of the constitution.", + "type": "string" + } + }, + "type": "object" + }, + "EnclaveQuote": { + "description": "Contains the enclave quote.", + "required": [ + "nodeId", + "quoteVersion", + "raw" + ], + "properties": { + "nodeId": { + "description": "ID assigned to this node.", + "$ref": "#/definitions/EntityId" + }, + "mrenclave": { + "description": "MRENCLAVE value of the code running in the enclave.", + "type": "string" + }, + "quoteVersion": { + "description": "Version of the quote presented.", + "type": "string" + }, + "raw": { + "description": "Raw SGX quote, parsable by tools like Open Enclave's oeverify.", + "type": "string" + } + }, + "type": "object" + }, + "EnclaveQuotes": { + "description": "Dictionary of enclave quotes, indexed by node id.", + "additionalProperties": { + "$ref": "#/definitions/EnclaveQuote" + }, + "type": "object" + }, + "EntityId": { + "description": "Identifier for an entity.", + "type": "string" + }, + "LedgerEntries": { + "description": "Array of ledger entries.", + "type": "array", + "items": { + "$ref": "#/definitions/LedgerEntry" + } + }, + "LedgerEntry": { + "description": "An entry in the ledger.", + "required": [ + "contents" + ], + "properties": { + "contents": { + "type": "string", + "description": "Contents of the ledger entry." + }, + "collectionId": { + "type": "string", + "readOnly": true + }, + "transactionId": { + "$ref": "#/definitions/TransactionId", + "readOnly": true + } + }, + "type": "object" + }, + "LedgerQueryResult": { + "description": "The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready.", + "required": [ + "state" + ], + "properties": { + "state": { + "$ref": "#/definitions/LedgerQueryState" + }, + "entry": { + "description": "The ledger entry found as a result of the query. This is only available if the query is in Ready state.", + "$ref": "#/definitions/LedgerEntry" + } + }, + "type": "object" + }, + "LedgerQueryState": { + "description": "State of a ledger query.", + "type": "string", + "enum": [ + "Loading", + "Ready" + ], + "x-ms-enum": { + "name": "ConfidentialLedgerQueryState", + "modelAsString": true + } + }, + "LedgerUser": { + "description": "Details about a Confidential Ledger user.", + "required": [ + "assignedRole" + ], + "properties": { + "assignedRole": { + "$ref": "#/definitions/LedgerUserRole" + }, + "userId": { + "$ref": "#/definitions/UserId", + "readOnly": true + } + }, + "type": "object" + }, + "LedgerUserRole": { + "type": "string", + "description": "Represents an assignable role.", + "enum": [ + "Administrator", + "Contributor", + "Reader" + ], + "x-ms-enum": { + "name": "ConfidentialLedgerUserRoleName", + "modelAsString": true + } + }, + "LedgerWriteResult": { + "description": "Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable.", + "required": [ + "collectionId" + ], + "properties": { + "collectionId": { + "type": "string" + } + }, + "type": "object" + }, + "MerkleProof": { + "description": "The Merkle proof verifying a transaction.", + "type": "array", + "items": { + "$ref": "#/definitions/MerkleProofElement" + } + }, + "MerkleProofElement": { + "description": "An item in the Merkle proof.", + "type": "object", + "properties": { + "left": { + "type": "string" + }, + "right": { + "type": "string" + } + } + }, + "PagedLedgerEntries": { + "description": "Paginated ledger entries returned in response to a query.", + "type": "object", + "required": [ + "state", + "entries" + ], + "properties": { + "state": { + "$ref": "#/definitions/LedgerQueryState" + }, + "nextLink": { + "description": "Path from which to retrieve the next page of results.", + "type": "string" + }, + "entries": { + "$ref": "#/definitions/LedgerEntries" + } + } + }, + "Pem": { + "type": "string" + }, + "PemArray": { + "items": { + "$ref": "#/definitions/Pem" + }, + "type": "array" + }, + "ReceiptContents": { + "properties": { + "cert": { + "type": "string" + }, + "leaf": { + "type": "string" + }, + "leafComponents": { + "$ref": "#/definitions/ReceiptLeafComponents" + }, + "nodeId": { + "type": "string" + }, + "proof": { + "$ref": "#/definitions/ReceiptElementArray" + }, + "root": { + "type": "string" + }, + "serviceEndorsements": { + "$ref": "#/definitions/PemArray" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "signature", + "proof", + "nodeId" + ], + "type": "object" + }, + "ReceiptElement": { + "properties": { + "left": { + "type": "string" + }, + "right": { + "type": "string" + } + }, + "type": "object" + }, + "ReceiptElementArray": { + "items": { + "$ref": "#/definitions/ReceiptElement" + }, + "type": "array" + }, + "ReceiptLeafComponents": { + "properties": { + "claimsDigest": { + "type": "string" + }, + "commitEvidence": { + "type": "string" + }, + "writeSetDigest": { + "type": "string" + } + }, + "type": "object" + }, + "RoleAssignment": { + "description": "Object for assigning a role to a user.", + "required": [ + "roleName" + ], + "properties": { + "roleName": { + "$ref": "#/definitions/LedgerUserRole" + }, + "description": { + "description": "Description of the role.", + "type": "string" + } + }, + "type": "object" + }, + "Collection": { + "description": "Identifier for collections.", + "required": [ + "collectionId" + ], + "properties": { + "collectionId": { + "type": "string" + } + }, + "type": "object" + }, + "PagedCollections": { + "description": "Paginated collections returned in response to a query.", + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "items": { + "$ref": "#/definitions/Collection" + }, + "type": "array" + }, + "nextLink": { + "description": "Path from which to retrieve the next page of results.", + "type": "string" + } + } + }, + "PagedUsers": { + "description": "Paginated users returned in response to a query.", + "type": "object", + "properties": { + "ledgerUsers": { + "items": { + "$ref": "#/definitions/LedgerUser" + }, + "type": "array" + }, + "nextLink": { + "description": "Path from which to retrieve the next page of results.", + "type": "string" + } + } + }, + "TransactionId": { + "description": "A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read.", + "type": "string" + }, + "TransactionReceipt": { + "description": "A receipt certifying the transaction at the specified id.", + "required": [ + "state", + "transactionId" + ], + "properties": { + "applicationClaims": { + "$ref": "#/definitions/ApplicationClaims" + }, + "receipt": { + "$ref": "#/definitions/ReceiptContents" + }, + "state": { + "$ref": "#/definitions/LedgerQueryState" + }, + "transactionId": { + "$ref": "#/definitions/TransactionId" + } + }, + "type": "object" + }, + "TransactionState": { + "type": "string", + "description": "Represents the state of the transaction.", + "enum": [ + "Committed", + "Pending" + ], + "x-ms-enum": { + "name": "TransactionState", + "modelAsString": true + } + }, + "TransactionStatus": { + "description": "Response returned to a query for the transaction status", + "required": [ + "state", + "transactionId" + ], + "properties": { + "state": { + "$ref": "#/definitions/TransactionState" + }, + "transactionId": { + "$ref": "#/definitions/TransactionId" + } + }, + "type": "object" + }, + "UserId": { + "description": "Identifier for the user. This must either be an AAD object id or a certificate fingerprint.", + "type": "string" + } + }, + "parameters": { + "CommitParameter": { + "name": "commit", + "in": "query", + "required": true, + "x-ms-parameter-location": "method", + "maximum": 9007199254740991, + "minimum": -9007199254740991, + "type": "integer", + "format": "int64", + "description": "The commit in the consensus protocol." + }, + "CollectionIdParameter": { + "name": "collectionId", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "description": "The collection id.", + "type": "string" + }, + "TransactionIdParameter": { + "name": "transactionId", + "in": "path", + "required": true, + "x-ms-parameter-location": "method", + "description": "Identifies a write transaction.", + "type": "string" + }, + "TransactionIdFromParameter": { + "name": "fromTransactionId", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "description": "Specify the first transaction ID in a range.", + "type": "string" + }, + "TransactionIdToParameter": { + "name": "toTransactionId", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "description": "Specify the last transaction ID in a range.", + "type": "string" + }, + "UserDetailsParameter": { + "name": "userDetails", + "description": "Details about a Confidential Ledger user.", + "in": "body", + "required": true, + "x-ms-parameter-location": "method", + "schema": { + "$ref": "#/definitions/LedgerUser" + } + }, + "UserIdParameter": { + "name": "userId", + "in": "path", + "required": true, + "description": "The user id, either an AAD object ID or certificate fingerprint.", + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/identity/GetLedgerIdentity.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/identity/GetLedgerIdentity.json new file mode 100644 index 000000000000..559cdbd33ee3 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/identity/GetLedgerIdentity.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerId": "contoso-ledger-12345", + "certificateEndpoint": "identity.confidential-ledger.core.azure.com" + }, + "responses": { + "200": { + "body": { + "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBvjCCAUKgAwIBAgIQVL+0VqZp3VzMyFKqD4Cs8zAMBggqhkjOPQQDAwUAMBYx\nFDASBgNVBAMMC0NDRiBOZXR3b3JrMB4XDTE5MTEwMTAwMDAwMFoXDTIxMTIzMTIz\nNTk1OVowFjEUMBIGA1UEAwwLQ0NGIE5ldHdvcmswdjAQBgcqhkjOPQIBBgUrgQQA\nIgNiAATBm4jNV4Kyj6bc/iMKDEXTCyU6P6U1KWAiDodl+Jd8aDJsBwLimtg4QCug\n1mpHnVPmcbPAbNM11+xrLHuFEfuZlS3DI+CCX8FUB2VvDVT3SfWLDVmr1xLStTDH\nuN4YjBOjUzBRMA8GA1UdEwQIMAYBAf8CAQAwHQYDVR0OBBYEFGSdsThwxrTOEQxb\nZ2NsslNvJRYkMB8GA1UdIwQYMBaAFGSdsThwxrTOEQxbZ2NsslNvJRYkMAwGCCqG\nSM49BAMDBQADaAAwZQIwJLLWllNZ83ym/HQuvtGGSdF/RCZwUoh+yhad/vUfVnhE\n2dYLDDEJOORpxpEIVfXgAjEA/CLcRwSZxzEmLDYe1y4puXKuSDCUiu+bKYgdvRLj\nRQJgTygutcTdI64sSweqPveK\n-----END CERTIFICATE-----\n\u0000" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/CreateLedgerEntry.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/CreateLedgerEntry.json new file mode 100644 index 000000000000..fb1215aafa1d --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/CreateLedgerEntry.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com", + "entry": { + "contents": "New ledger entry contents." + } + }, + "responses": { + "200": { + "headers": { + "x-ms-ccf-transaction-id": "2.15" + }, + "body": { + "collectionId": "subledger:0" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/CreateOrUpdateUser.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/CreateOrUpdateUser.json new file mode 100644 index 000000000000..a4ec367e1599 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/CreateOrUpdateUser.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com", + "userId": "AAD object id", + "userDetails": { + "assignedRole": "Reader" + } + }, + "responses": { + "200": { + "body": { + "assignedRole": "Reader", + "userId": "AAD object id" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/DeleteUser.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/DeleteUser.json new file mode 100644 index 000000000000..9176b23c4ef7 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/DeleteUser.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com", + "userId": "AAD object id" + }, + "responses": { + "204": {} + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetConstitution.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetConstitution.json new file mode 100644 index 000000000000..ac4c70a3aad9 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetConstitution.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com" + }, + "responses": { + "200": { + "body": { + "digest": "cd04f484d93a13df44eab4235c14df37e20907b3216c5a37b9e484a363a76c8e", + "script": "" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetCurrentLedgerEntry.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetCurrentLedgerEntry.json new file mode 100644 index 000000000000..8e856c8255b2 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetCurrentLedgerEntry.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com" + }, + "responses": { + "200": { + "body": { + "contents": "Current ledger entry contents.", + "collectionId": "subledger:0", + "transactionId": "2.15" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetEnclaveQuotes.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetEnclaveQuotes.json new file mode 100644 index 000000000000..e315e493770b --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetEnclaveQuotes.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com" + }, + "responses": { + "200": { + "body": { + "currentNodeId": "0", + "enclaveQuotes": { + "0": { + "mrenclave": "9b4b6890a5fff10854e3ca4fa5af5801dae57a46bfef3f23749bf47a61a1b1d7", + "nodeId": "0", + "raw": "0100000002000000e811000000000000030002000000000005000a00939a7233f79c4ca9940a0db3957f06074b17f6b893ef49abff5c9b689576dc08000000000f0f0305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000007000000000000009b4b6890a5fff10854e3ca4fa5af5801dae57a46bfef3f23749bf47a61a1b1d700000000000000000000000000000000000000000000000000000000000000005bebf77a60c142b06ec46417957f4374b42102092d2ac7465daa3af9a62fcd7f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a7c7f007fe7242cb20ad7d6eda114b47dfd92b1f615ae728a777852ce1377e2000000000000000000000000000000000000000000000000000000000000000034100000014d855131f932a590d06f9d6d6e0f2ade47054c7a9c5de61d38ccc2f35f4c00aa83ec2b3c3642af9aa050555a23c1272c1cdb0563a4e4264552a6a8514f5671378f81f331f54a8a2965275d64c061246d64c18df5b3383a498d3b5a4e997734bb35a09b0e8374bb039889dc168523251a90d8d96d921f697efb342a6534333c0f0f0305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000cdcadfb7db22ada5fd603455cde1bf9fa258fa5f284dcd6e0c63392f633a110500000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004cb3dda245424884c47313c09366c2103703cbdef3a75f20316a2796d9243e6b0000000000000000000000000000000000000000000000000000000000000000326e8be8be9b1e8f3fb3a44d8743ca30d4cde23750294f51f282401adf08334ff280afdb1b6d912b39e2c7931837f2ac91f17689ca9cb943f5a491d60bb314332000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d494945674443434243616741774942416749555576735257764147614b502b724b36424449515776477948656a6777436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449774d4459784f4441774d5449304f466f58445449334d4459784f4441774d5449300a4f466f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414154570a663645447136324762714844326677574564656538645853645179694e665039493945594a59472b3770475a586b326173775370374f3876456d58425a52345a0a6b713075452f65687233435935793774323246786f3449436d7a434341706377487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077587759445652306642466777566a42556f464b6755495a4f6148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d6939775932746a636d772f593245390a63484a765932567a633239794d4230474131556444675157424253334b5969495a66795a7449432b4f4b7a4c365142446c5465384144414f42674e56485138420a4166384542414d434273417744415944565230544151482f42414977414443434164514743537147534962345451454e4151534341635577676748424d4234470a43697147534962345451454e415145454547462f622f39427666662b6c75427a75747a6d646d34776767466b42676f71686b69472b453042445145434d4949420a5644415142677371686b69472b4530424451454341514942447a415142677371686b69472b4530424451454341674942447a415142677371686b69472b4530420a4451454341774942416a415142677371686b69472b45304244514543424149424244415142677371686b69472b453042445145434251494241544152426773710a686b69472b4530424451454342674943414941774541594c4b6f5a496876684e4151304241676343415159774541594c4b6f5a496876684e41513042416767430a415141774541594c4b6f5a496876684e4151304241676b43415141774541594c4b6f5a496876684e4151304241676f43415141774541594c4b6f5a496876684e0a4151304241677343415141774541594c4b6f5a496876684e4151304241677743415141774541594c4b6f5a496876684e4151304241673043415141774541594c0a4b6f5a496876684e4151304241673443415141774541594c4b6f5a496876684e4151304241673843415141774541594c4b6f5a496876684e41513042416841430a415141774541594c4b6f5a496876684e415130424168454341516f774877594c4b6f5a496876684e4151304241684945454138504167514267415941414141410a41414141414141774541594b4b6f5a496876684e4151304241775143414141774641594b4b6f5a496876684e4151304242415147414a4275315141414d4138470a43697147534962345451454e4151554b41514177436759494b6f5a497a6a3045417749445341417752514968414b582b324343704b525652654d2b4d7543366a0a7477634d502b2b4645396667365a4f696d55464a55474478416941684d6a743258323651662b4247344965456f665547537070364f792b68494e704d48626d7a0a4f4a596279513d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a00", + "quoteVersion": "sgx-quote-1" + }, + "1": { + "mrenclave": "9b4b6890a5fff10854e3ca4fa5af5801dae57a46bfef3f23749bf47a61a1b1d7", + "nodeId": "1", + "raw": "0100000002000000e811000000000000030002000000000005000a00939a7233f79c4ca9940a0db3957f06074b17f6b893ef49abff5c9b689576dc08000000000f0f0305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000007000000000000009b4b6890a5fff10854e3ca4fa5af5801dae57a46bfef3f23749bf47a61a1b1d700000000000000000000000000000000000000000000000000000000000000005bebf77a60c142b06ec46417957f4374b42102092d2ac7465daa3af9a62fcd7f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a7c7f007fe7242cb20ad7d6eda114b47dfd92b1f615ae728a777852ce1377e2000000000000000000000000000000000000000000000000000000000000000034100000014d855131f932a590d06f9d6d6e0f2ade47054c7a9c5de61d38ccc2f35f4c00aa83ec2b3c3642af9aa050555a23c1272c1cdb0563a4e4264552a6a8514f5671378f81f331f54a8a2965275d64c061246d64c18df5b3383a498d3b5a4e997734bb35a09b0e8374bb039889dc168523251a90d8d96d921f697efb342a6534333c0f0f0305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000cdcadfb7db22ada5fd603455cde1bf9fa258fa5f284dcd6e0c63392f633a110500000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004cb3dda245424884c47313c09366c2103703cbdef3a75f20316a2796d9243e6b0000000000000000000000000000000000000000000000000000000000000000326e8be8be9b1e8f3fb3a44d8743ca30d4cde23750294f51f282401adf08334ff280afdb1b6d912b39e2c7931837f2ac91f17689ca9cb943f5a491d60bb314332000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d494945674443434243616741774942416749555576735257764147614b502b724b36424449515776477948656a6777436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449774d4459784f4441774d5449304f466f58445449334d4459784f4441774d5449300a4f466f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414154570a663645447136324762714844326677574564656538645853645179694e665039493945594a59472b3770475a586b326173775370374f3876456d58425a52345a0a6b713075452f65687233435935793774323246786f3449436d7a434341706377487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077587759445652306642466777566a42556f464b6755495a4f6148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d6939775932746a636d772f593245390a63484a765932567a633239794d4230474131556444675157424253334b5969495a66795a7449432b4f4b7a4c365142446c5465384144414f42674e56485138420a4166384542414d434273417744415944565230544151482f42414977414443434164514743537147534962345451454e4151534341635577676748424d4234470a43697147534962345451454e415145454547462f622f39427666662b6c75427a75747a6d646d34776767466b42676f71686b69472b453042445145434d4949420a5644415142677371686b69472b4530424451454341514942447a415142677371686b69472b4530424451454341674942447a415142677371686b69472b4530420a4451454341774942416a415142677371686b69472b45304244514543424149424244415142677371686b69472b453042445145434251494241544152426773710a686b69472b4530424451454342674943414941774541594c4b6f5a496876684e4151304241676343415159774541594c4b6f5a496876684e41513042416767430a415141774541594c4b6f5a496876684e4151304241676b43415141774541594c4b6f5a496876684e4151304241676f43415141774541594c4b6f5a496876684e0a4151304241677343415141774541594c4b6f5a496876684e4151304241677743415141774541594c4b6f5a496876684e4151304241673043415141774541594c0a4b6f5a496876684e4151304241673443415141774541594c4b6f5a496876684e4151304241673843415141774541594c4b6f5a496876684e41513042416841430a415141774541594c4b6f5a496876684e415130424168454341516f774877594c4b6f5a496876684e4151304241684945454138504167514267415941414141410a41414141414141774541594b4b6f5a496876684e4151304241775143414141774641594b4b6f5a496876684e4151304242415147414a4275315141414d4138470a43697147534962345451454e4151554b41514177436759494b6f5a497a6a3045417749445341417752514968414b582b324343704b525652654d2b4d7543366a0a7477634d502b2b4645396667365a4f696d55464a55474478416941684d6a743258323651662b4247344965456f665547537070364f792b68494e704d48626d7a0a4f4a596279513d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a00", + "quoteVersion": "sgx-quote-1" + } + } + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetLedgerEntry.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetLedgerEntry.json new file mode 100644 index 000000000000..976d93369a7a --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetLedgerEntry.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "transactionId": "2.15", + "ledgerUri": "myledger.confidentialledger.azure.com" + }, + "responses": { + "200": { + "body": { + "state": "Ready", + "entry": { + "contents": "Ledger entry contents at transaction id 2.15.", + "collectionId": "subledger:0", + "transactionId": "2.15" + } + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetReceipt.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetReceipt.json new file mode 100644 index 000000000000..20389644865a --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetReceipt.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com", + "transactionId": "2.15" + }, + "responses": { + "200": { + "body": { + "applicationClaims": [ + { + "kind": "LedgerEntry", + "ledgerEntry": { + "protocol": "LedgerEntryV1", + "collectionId": "subledger:0", + "contents": "Ledger entry contents at transaction id 2.15", + "secretKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + } + } + ], + "receipt": { + "cert": "-----BEGIN CERTIFICATE-----\nMIIBwzCCAUmgAwIBAgIRAMRXRsojcLOzbz90rSp67xQwCgYIKoZIzj0EAwMwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjIxMTI1MTE1NzM1WhcNMjMwMjIzMTE1\nNzM0WjATMREwDwYDVQQDDAhDQ0YgTm9kZTB2MBAGByqGSM49AgEGBSuBBAAiA2IA\nBFjnt5PbiuXlBDdWWJvR1d0niMIzx6hxRCs06d8MUwG49UvdqRc8aY2eeCuoGupG\n9uWA3WBaZoe3QcqUr0+S+WLYXP0TYRx0xQncbKZgSWa3bcFNqaosw1KnjbLaSIRR\nJKNeMFwwCQYDVR0TBAIwADAdBgNVHQ4EFgQUHOauq1jxw2NJMh0UrzkrWi/Vuxkw\nHwYDVR0jBBgwFoAUSyn9seKhGp3n74by4boUVRXOpvcwDwYDVR0RBAgwBocEfwAA\nATAKBggqhkjOPQQDAwNoADBlAjBuhyVaon0EVXKUnO59acJVcfN8fYbz8keieiov\nOHqVqSCc60mdNGugn1kUmCKtHWYCMQDDMnOFtyeTfHPCo4n48nyoCHdaTVyS/XIF\n83P94iQITIiCX9ZDxf/eqc8rcEvm63A=\n-----END CERTIFICATE-----\n", + "leafComponents": { + "commitEvidence": "ce:2.15:3cc2bfd0e14c9fb8b3d4838d3dce19704ca83fa04720e044512f25581fc9b0a7", + "writeSetDigest": "f71b60aa93a6ae36bfcadaf852b2eb43e7f868bd95053c84dd4b67d11c05d516" + }, + "nodeId": "ff9bf39b7150510ad437977d7010aa733e718b407df755b52b961e4c3b2708fd", + "proof": [ + { + "left": "65e4256d7e7cbff2723de58dc1d8931e4683a328e720ba7c784a82b65d027b4a" + }, + { + "left": "ef24f237b9208cfa51cdfa56b84927adce7074f3b5502abc0a6111bbd1317438" + }, + { + "left": "067d74a552d2f96d236e8fe94ed40ffd8ae665f890d6b8721783a7795a1b3dec" + }, + { + "left": "1a64045485d3e9137978cb4de06a422a76738d36489d8efa829bbf7bdd262ac1" + } + ], + "serviceEndorsements": [], + "signature": "MGYCMQCYbEjjClnK63cpkb+LBM4XFugq99zPM8KLN9yKvXwV576mXd3fyUOrF84HJbAbO6gCMQCiebUALQkaSixwh4q3l3v+rd9pgBnH2HZpnby6vvJLGkYBDUAdR0kyYV5OEJva6N0=" + }, + "state": "Ready", + "transactionId": "2.15" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetTransactionStatus.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetTransactionStatus.json new file mode 100644 index 000000000000..fd690d7059c1 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetTransactionStatus.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com", + "transactionId": "4.2" + }, + "responses": { + "200": { + "body": { + "state": "Committed", + "transactionId": "4.2" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetUser.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetUser.json new file mode 100644 index 000000000000..797e4d119436 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/GetUser.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com", + "userId": "AAD object id" + }, + "responses": { + "200": { + "body": { + "assignedRole": "Administrator", + "userId": "AAD object id" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListCollections.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListCollections.json new file mode 100644 index 000000000000..c01e74f05826 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListCollections.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com" + }, + "responses": { + "200": { + "body": { + "collections": [ + { + "collectionId": "first" + }, + { + "collectionId": "second" + } + ] + }, + "nextLink": "" + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListConsortiumMembers.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListConsortiumMembers.json new file mode 100644 index 000000000000..43adb242112e --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListConsortiumMembers.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com" + }, + "responses": { + "200": { + "body": { + "members": [ + { + "certificate": "", + "id": "0" + } + ], + "nextLink": "" + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListLedgerEntries.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListLedgerEntries.json new file mode 100644 index 000000000000..0a430512c64a --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListLedgerEntries.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "fromTransactionId": "2.15", + "toTransactionId": "2.20", + "ledgerUri": "myledger.confidentialledger.azure.com" + }, + "responses": { + "200": { + "body": { + "state": "Ready", + "nextLink": "/app/transactions?fromTransactionId=3.15&toTransactionId=3.42&collectionId=0&api-version=0.1-preview", + "entries": [ + { + "contents": "Ledger entry contents at transaction id 2.15.", + "collectionId": "subledger:0", + "transactionId": "2.15" + } + ] + } + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListUsers.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListUsers.json new file mode 100644 index 000000000000..148f665a3caa --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/examples/ledger/ListUsers.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2024-01-26-preview", + "ledgerUri": "myledger.confidentialledger.azure.com" + }, + "responses": { + "200": { + "body": { + "ledgerUsers": [ + { + "assignedRole": "Administrator", + "userId": "Certificate object id 1" + }, + { + "assignedRole": "Contributor", + "userId": "AAD object id 2" + }, + { + "assignedRole": "Reader", + "userId": "AAD object id 3" + } + ] + }, + "nextLink": "" + } + } +} diff --git a/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/identityservice.json b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/identityservice.json new file mode 100644 index 000000000000..12f8362e23a0 --- /dev/null +++ b/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/identityservice.json @@ -0,0 +1,90 @@ +{ + "swagger": "2.0", + "info": { + "version": "2024-01-26-preview", + "title": "ConfidentialLedgerCertificateClient", + "description": "The ConfidentialLedgerCertificateClient is used to retrieve the TLS certificate required for connecting to a Confidential Ledger." + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "positionInOperation": "first", + "parameters": [ + { + "name": "endpoint", + "description": "The certificate endpoint (or \"Identity Service Endpoint\" in the Azure portal), for example https://identity.confidential-ledger.core.azure.com", + "required": true, + "type": "string", + "in": "path", + "format": "url", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + ] + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/ledgerIdentity/{ledgerId}": { + "get": { + "operationId": "GetLedgerIdentity", + "x-ms-examples": { + "GetLedgerIdentity": { + "$ref": "./examples/identity/GetLedgerIdentity.json" + } + }, + "summary": "Gets identity information for a Confidential Ledger instance.", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "in": "path", + "name": "ledgerId", + "description": "Id of the Confidential Ledger instance to get information for", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Returns ledger information.", + "schema": { + "$ref": "#/definitions/LedgerIdentityInformation" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "common.json#/definitions/ConfidentialLedgerError" + } + } + } + } + } + }, + "definitions": { + "LedgerIdentityInformation": { + "description": "Contains the information about a Confidential Ledger.", + "required": [ + "ledgerTlsCertificate" + ], + "properties": { + "ledgerId": { + "description": "Id for the ledger.", + "type": "string", + "readOnly": true + }, + "ledgerTlsCertificate": { + "description": "PEM-encoded certificate used for TLS by the Confidential Ledger.", + "type": "string" + } + }, + "type": "object" + } + } +} diff --git a/specification/confidentialledger/data-plane/readme.md b/specification/confidentialledger/data-plane/readme.md index 1ad7ae2674f2..e97f24cebc38 100644 --- a/specification/confidentialledger/data-plane/readme.md +++ b/specification/confidentialledger/data-plane/readme.md @@ -12,7 +12,7 @@ Please look to the files `Microsoft.ConfidentialLedger/preview/2023-01-18-previe > see https://aka.ms/autorest ``` yaml -tag: package-2023-01-18-preview-identity +tag: package-2024-01-26-preview-identity openapi-type: data-plane ``` @@ -122,4 +122,21 @@ suppressions: - code: EnumInsteadOfBoolean from: cts.json reason: Defined as in the RFC -``` \ No newline at end of file +``` + +### Tag: package-2024-01-26-preview-ledger + +These settings apply only when `--tag=package-2024-01-26-preview-ledger` is specified on the command line. + +```yaml $(tag) == 'package-2024-01-26-preview-ledger' +input-file: + - Microsoft.ConfidentialLedger/preview/2024-01-26-preview/confidentialledger.json +``` + +### Tag: package-2024-01-26-preview-identity + +These settings apply only when `--tag=package-2024-01-26-preview-identity` is specified on the command line. + +```yaml $(tag) == 'package-2024-01-26-preview-identity' +input-file: + - Microsoft.ConfidentialLedger/preview/2024-01-26-preview/identityservice.json \ No newline at end of file