diff --git a/sdk/containerregistry/container-registry/CHANGELOG.md b/sdk/containerregistry/container-registry/CHANGELOG.md index cfe403d20291..8a2c3cb7814a 100644 --- a/sdk/containerregistry/container-registry/CHANGELOG.md +++ b/sdk/containerregistry/container-registry/CHANGELOG.md @@ -10,6 +10,12 @@ ### Other Changes +## 1.1.0-beta.1 (2022-04-05) + +### Features Added + +- Add a new `ContainerRegistryBlobClient` to allow upload and download of OCI blobs and manifests. [PR #20529](https://github.com/Azure/azure-sdk-for-js/pull/20529) + ## 1.0.0 (2022-01-11) This release marks the general availability release of Azure Container Registry client SDK library. diff --git a/sdk/containerregistry/container-registry/package.json b/sdk/containerregistry/container-registry/package.json index 3781622b66c1..1caf5173bf4a 100644 --- a/sdk/containerregistry/container-registry/package.json +++ b/sdk/containerregistry/container-registry/package.json @@ -1,6 +1,6 @@ { "name": "@azure/container-registry", - "version": "1.0.1", + "version": "1.1.0-beta.1", "description": "An isomorphic client library for the Azure Container Registry service.", "sdk-type": "client", "main": "dist/index.js", @@ -25,27 +25,27 @@ }, "scripts": { "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:browser": "tsc -p . && dev-tool run bundle", - "build:node": "tsc -p . && dev-tool run bundle", + "build:browser": "echo \"Browser is not supported\" && exit 0", + "build:node": "tsc -p . && dev-tool run bundle --browser-test=false", "build:samples": "echo Obsolete.", - "build:test": "tsc -p . && dev-tool run bundle", - "build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local", + "build:test": "tsc -p . && dev-tool run bundle --browser-test=false", + "build": "npm run clean && tsc -p . && dev-tool run bundle --browser-test=false && api-extractor run --local", "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", "clean": "rimraf dist dist-* temp types *.tgz *.log", "execute:samples": "dev-tool samples run samples-dev", "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", "generate:client": "autorest --typescript ./swagger/README.md", - "integration-test:browser": "dev-tool run test:browser", + "integration-test:browser": "echo skipped", "integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 --full-trace \"dist-esm/test/**/*.spec.js\"", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts", "pack": "npm pack 2>&1", - "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:browser": "echo skipped", "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", "test": "npm run build:test && npm run unit-test && npm run integration-test", - "unit-test:browser": "dev-tool run test:browser", + "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 --full-trace \"test/**/*.spec.ts\"", "unit-test": "npm run unit-test:node && npm run unit-test:browser" }, @@ -76,7 +76,7 @@ "dependencies": { "@azure/core-auth": "^1.3.0", "@azure/core-client": "^1.0.0", - "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-rest-pipeline": "^1.8.0", "@azure/core-paging": "^1.1.1", "@azure/core-tracing": "1.0.0-preview.13", "@azure/logger": "^1.0.0", diff --git a/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_blob.json b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_blob.json new file mode 100644 index 000000000000..40a16cd58cd2 --- /dev/null +++ b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_blob.json @@ -0,0 +1,516 @@ +{ + "Entries": [ + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "860b8b8d-c072-428c-b929-3de338251916" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:33 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:push,pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "4d3683b5-f387-4563-9c6d-403ee1259d4a" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/exchange?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "84", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "963f8191-1759-4925-9bce-6422ef24dd40" + }, + "RequestBody": "grant_type=access_token\u0026service=myregistry.azurecr.io\u0026access_token=SecretPlaceholder", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:34 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "00850732-faf9-4607-9fbf-613541b889e1" + }, + "ResponseBody": { + "refresh_token": "sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "0a7ff8ad-b197-431e-ab2d-ad1ea93fe1fb" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apush%2Cpull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:34 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "6f748c22-f70a-4f6e-980f-c46a42bb93df" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "860b8b8d-c072-428c-b929-3de338251916" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Fri, 25 Mar 2022 22:41:34 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "682c0fb7-43ba-49cc-a725-32c83878e5dc", + "Location": "/v2/oci-artifact/blobs/uploads/682c0fb7-43ba-49cc-a725-32c83878e5dc?_nouploadcache=false\u0026_state=L2OD8a1u8oJOYTAbKtU4IdhDteMfOSSroUI4wylNerJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNjgyYzBmYjctNDNiYS00OWNjLWE3MjUtMzJjODM4NzhlNWRjIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI1VDIyOjQxOjM0Ljc0ODk4OTk0OVoifQ%3D%3D", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "860b8b8d-c072-428c-b929-3de338251916", + "X-Ms-Correlation-Request-Id": "67b82f50-e991-446a-8d14-d34753ce8790", + "X-Ms-Request-Id": "554fad5f-c5dc-4404-994c-d5bfa4916445" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/682c0fb7-43ba-49cc-a725-32c83878e5dc?_nouploadcache=false\u0026_state=L2OD8a1u8oJOYTAbKtU4IdhDteMfOSSroUI4wylNerJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNjgyYzBmYjctNDNiYS00OWNjLWE3MjUtMzJjODM4NzhlNWRjIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI1VDIyOjQxOjM0Ljc0ODk4OTk0OVoifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "1e2c6e72-00e3-4a9f-97dd-816f12000865" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:35 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:push,pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "e0298f6f-9bf7-4132-8e2e-3a850eae93c6" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "c6200d62-7b8a-4d68-8a4f-9e19fe4e36ba" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apush%2Cpull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:35 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "24969797-0a75-490a-b787-89c210f10d59" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/682c0fb7-43ba-49cc-a725-32c83878e5dc?_nouploadcache=false\u0026_state=L2OD8a1u8oJOYTAbKtU4IdhDteMfOSSroUI4wylNerJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNjgyYzBmYjctNDNiYS00OWNjLWE3MjUtMzJjODM4NzhlNWRjIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI1VDIyOjQxOjM0Ljc0ODk4OTk0OVoifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "1e2c6e72-00e3-4a9f-97dd-816f12000865" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Fri, 25 Mar 2022 22:41:35 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "682c0fb7-43ba-49cc-a725-32c83878e5dc", + "Location": "/v2/oci-artifact/blobs/uploads/682c0fb7-43ba-49cc-a725-32c83878e5dc?_nouploadcache=false\u0026_state=lhJJ72a_u153msY6ARDtGuUPz-m6oMryRLHT9apfaRh7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNjgyYzBmYjctNDNiYS00OWNjLWE3MjUtMzJjODM4NzhlNWRjIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yNVQyMjo0MTozNFoifQ%3D%3D", + "Range": "0-27", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "1e2c6e72-00e3-4a9f-97dd-816f12000865", + "X-Ms-Correlation-Request-Id": "d788bcf1-f7c7-4fe7-b548-24f26d28e910", + "X-Ms-Request-Id": "0ce98fbc-2b26-44c9-9a2c-050f88a6969c" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/682c0fb7-43ba-49cc-a725-32c83878e5dc?_nouploadcache=false\u0026_state=lhJJ72a_u153msY6ARDtGuUPz-m6oMryRLHT9apfaRh7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNjgyYzBmYjctNDNiYS00OWNjLWE3MjUtMzJjODM4NzhlNWRjIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yNVQyMjo0MTozNFoifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "68f29414-6587-4170-9e85-1bd9f5629119" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:35 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:push,pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "640be214-4cd0-47ed-9ac6-57cd575c33f3" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "006b3d0c-9cb3-4695-9e22-681d2cd14477" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apush%2Cpull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:36 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "7d1a202a-02a4-4262-afa2-9d65fad7953a" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/682c0fb7-43ba-49cc-a725-32c83878e5dc?_nouploadcache=false\u0026_state=lhJJ72a_u153msY6ARDtGuUPz-m6oMryRLHT9apfaRh7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNjgyYzBmYjctNDNiYS00OWNjLWE3MjUtMzJjODM4NzhlNWRjIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yNVQyMjo0MTozNFoifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "68f29414-6587-4170-9e85-1bd9f5629119" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Fri, 25 Mar 2022 22:41:36 GMT", + "Docker-Content-Digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "68f29414-6587-4170-9e85-1bd9f5629119", + "X-Ms-Correlation-Request-Id": "16c3efcb-d3b4-4b55-85b9-278aaa3189d7", + "X-Ms-Request-Id": "9db40e77-0720-4f4e-bbb9-5a5add03ff9d" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/octet-stream", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "0e6c5a7c-0ec2-4236-8ff0-a74340436d31" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "206", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:36 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "691348fe-34bf-48cf-aa0c-6e39564e675d" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "156", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "a62bd35e-ffc5-4f3e-a5d0-9ae7a481fa09" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 25 Mar 2022 22:41:36 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "31a9868b-9c39-4090-b50c-8793480117d8" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/octet-stream", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.2 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "0e6c5a7c-0ec2-4236-8ff0-a74340436d31" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Accept-Ranges": "bytes", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "Date": "Fri, 25 Mar 2022 22:41:37 GMT", + "ETag": "\u00220x8DA0B6CB9DEB2E7\u0022", + "Last-Modified": "Mon, 21 Mar 2022 18:58:02 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-blob-committed-block-count": "1", + "x-ms-blob-type": "AppendBlob", + "x-ms-copy-completion-time": "Mon, 21 Mar 2022 18:58:02 GMT", + "x-ms-copy-id": "390b34fa-1770-4be5-9e89-ab8984393a36", + "x-ms-copy-progress": "28/28", + "x-ms-copy-source": "https://eusmanaged44.blob.core.windows.net/3bed0a4a849e4153a900c52adffdf79b-qab7p90gsb//docker/registry/v2/blobs/sha256/65/654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed/data?sv=2018-03-28\u0026sr=b\u0026se=2022-03-28T18%3A58%3A02Z\u0026sp=r\u0026api-version=2018-03-28", + "x-ms-copy-status": "success", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "09556f4d-c01e-0006-7e99-40b399000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2016-05-31" + }, + "ResponseBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==" + } + ], + "Variables": {} +} diff --git a/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest.json b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest.json new file mode 100644 index 000000000000..28506b6fb2cc --- /dev/null +++ b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest.json @@ -0,0 +1,1171 @@ +{ + "Entries": [ + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "f5c3bb7c-7ef0-4a77-bae7-5b61f65739b4" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:44 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "8b1cb1f9-608b-436c-b8ac-40cedc446dd6" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/exchange?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "84", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "0bf9a33e-c673-4ebc-bb48-2263db1f80a2" + }, + "RequestBody": "grant_type=access_token\u0026service=myregistry.azurecr.io\u0026access_token=SecretPlaceholder", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:45 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "27c7e455-544f-4bf4-96eb-88aff64916b9" + }, + "ResponseBody": { + "refresh_token": "sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "0c8b4567-c38f-45ae-b86c-4a5df5f2ebde" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:45 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "f1c6650e-9420-4827-861e-6581781b8f12" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "f5c3bb7c-7ef0-4a77-bae7-5b61f65739b4" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:45 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "0f25c2ba-de96-4d26-8b6f-37ec435c6224", + "Location": "/v2/oci-artifact/blobs/uploads/0f25c2ba-de96-4d26-8b6f-37ec435c6224?_nouploadcache=false\u0026_state=5m5ZJOrO8qMAxF4k5VC4sbnoHdhE1nyolkE4tgH4GHF7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMGYyNWMyYmEtZGU5Ni00ZDI2LThiNmYtMzdlYzQzNWM2MjI0IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjQ1LjY0NjIyMDkyMloifQ%3D%3D", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "f5c3bb7c-7ef0-4a77-bae7-5b61f65739b4", + "X-Ms-Correlation-Request-Id": "e697492b-1915-4f3f-bc53-5325d9b9e2ae", + "X-Ms-Request-Id": "839b8110-be3f-4c63-921e-37a132d05f19" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/0f25c2ba-de96-4d26-8b6f-37ec435c6224?_nouploadcache=false\u0026_state=5m5ZJOrO8qMAxF4k5VC4sbnoHdhE1nyolkE4tgH4GHF7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMGYyNWMyYmEtZGU5Ni00ZDI2LThiNmYtMzdlYzQzNWM2MjI0IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjQ1LjY0NjIyMDkyMloifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "aef15e45-c09e-4035-a484-65c78200d3c6" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:45 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "7e6f8ae5-8b8e-447d-b7c6-d5d9339e62b9" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "9160c245-830f-4eef-955e-96d2f7aeac89" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:45 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "c6aec7cc-8067-432f-a138-eccb18f822e6" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/0f25c2ba-de96-4d26-8b6f-37ec435c6224?_nouploadcache=false\u0026_state=5m5ZJOrO8qMAxF4k5VC4sbnoHdhE1nyolkE4tgH4GHF7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMGYyNWMyYmEtZGU5Ni00ZDI2LThiNmYtMzdlYzQzNWM2MjI0IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjQ1LjY0NjIyMDkyMloifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "aef15e45-c09e-4035-a484-65c78200d3c6" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:46 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "0f25c2ba-de96-4d26-8b6f-37ec435c6224", + "Location": "/v2/oci-artifact/blobs/uploads/0f25c2ba-de96-4d26-8b6f-37ec435c6224?_nouploadcache=false\u0026_state=Oilh-Sgz1pAw76dtQiYS0z-bRN6Qp4JOSyYMWJRkjW57Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMGYyNWMyYmEtZGU5Ni00ZDI2LThiNmYtMzdlYzQzNWM2MjI0IiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yOVQxODoyMjo0NVoifQ%3D%3D", + "Range": "0-27", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "aef15e45-c09e-4035-a484-65c78200d3c6", + "X-Ms-Correlation-Request-Id": "27596f1c-b934-4d09-b4b3-01aab9142248", + "X-Ms-Request-Id": "e7677cfe-634c-4f57-90aa-dd986b8cc24f" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/0f25c2ba-de96-4d26-8b6f-37ec435c6224?_nouploadcache=false\u0026_state=Oilh-Sgz1pAw76dtQiYS0z-bRN6Qp4JOSyYMWJRkjW57Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMGYyNWMyYmEtZGU5Ni00ZDI2LThiNmYtMzdlYzQzNWM2MjI0IiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yOVQxODoyMjo0NVoifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "4060d200-1263-457b-9dae-e7db68216027" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:46 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "e324f17e-b12e-4631-9c52-d490244e0aef" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "7174ca3a-fa0e-431c-b652-5d5b14c26f91" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:46 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "39e75e07-bcbc-4a60-aae6-776e1b490a81" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/0f25c2ba-de96-4d26-8b6f-37ec435c6224?_nouploadcache=false\u0026_state=Oilh-Sgz1pAw76dtQiYS0z-bRN6Qp4JOSyYMWJRkjW57Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMGYyNWMyYmEtZGU5Ni00ZDI2LThiNmYtMzdlYzQzNWM2MjI0IiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yOVQxODoyMjo0NVoifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "4060d200-1263-457b-9dae-e7db68216027" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:46 GMT", + "Docker-Content-Digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "4060d200-1263-457b-9dae-e7db68216027", + "X-Ms-Correlation-Request-Id": "382d022d-d029-4431-913f-6701f5899617", + "X-Ms-Request-Id": "a1e04c12-cb8b-4d0d-9b5c-0db874b3b0fd" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "ce6b7021-84b9-4956-87d8-b0a4409377ae" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:46 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "5a933721-da3e-4fed-926a-64198c3fadb3" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "98182ef6-134e-4d34-bdb7-f41b684b71d8" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:46 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "6609ff8f-3d97-4d3a-beb0-5b7a1d8d86d1" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "ce6b7021-84b9-4956-87d8-b0a4409377ae" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:46 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "02807ad3-a9aa-4fbe-86b3-9c2eff379011", + "Location": "/v2/oci-artifact/blobs/uploads/02807ad3-a9aa-4fbe-86b3-9c2eff379011?_nouploadcache=false\u0026_state=wVn_Z2DPm43cdEFUllUprE_ZHV1KngpXEYR-8JNRNmJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDI4MDdhZDMtYTlhYS00ZmJlLTg2YjMtOWMyZWZmMzc5MDExIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjQ2Ljc4NzUzNDk3WiJ9", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "ce6b7021-84b9-4956-87d8-b0a4409377ae", + "X-Ms-Correlation-Request-Id": "9814a90b-3333-4f55-a729-7f414b466cb3", + "X-Ms-Request-Id": "e82d237a-5235-437a-97e5-8c27db3f1293" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/02807ad3-a9aa-4fbe-86b3-9c2eff379011?_nouploadcache=false\u0026_state=wVn_Z2DPm43cdEFUllUprE_ZHV1KngpXEYR-8JNRNmJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDI4MDdhZDMtYTlhYS00ZmJlLTg2YjMtOWMyZWZmMzc5MDExIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjQ2Ljc4NzUzNDk3WiJ9", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "171", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "9aac6ff2-26b7-4d67-9edd-e3ce5aaf79df" + }, + "RequestBody": "H4sIAAAAAAAA/\u002BzRwcrCMBAE4Dn/8L9DD551tulmn6dUq4VioUb06VUsORU8aRQx32VzSjYzi2bYt90WKZGkmU2T5HxOZ6lo6lTNPCjUUlFo0q2i4yHUI8hn75l/7kvE/lf1GLq2bsIynMOr37jn4b1/3L\u002BrYv9lWYkDxYkoireE\u002BOP9Xy87bNCjx4ACJwwY0WONf/x9erUsy7IsoVsAAAD//yO/fykACgAA", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:46 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:push,pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "ab2c34ad-7d87-45a3-9266-ed81f68ff356" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "dd441293-13de-4e4d-b30f-a08c793e7735" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apush%2Cpull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:47 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "d45e8c1b-d1c3-48bc-8b1d-b171f574a8d1" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/02807ad3-a9aa-4fbe-86b3-9c2eff379011?_nouploadcache=false\u0026_state=wVn_Z2DPm43cdEFUllUprE_ZHV1KngpXEYR-8JNRNmJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDI4MDdhZDMtYTlhYS00ZmJlLTg2YjMtOWMyZWZmMzc5MDExIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjQ2Ljc4NzUzNDk3WiJ9", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "171", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "9aac6ff2-26b7-4d67-9edd-e3ce5aaf79df" + }, + "RequestBody": "H4sIAAAAAAAA/\u002BzRwcrCMBAE4Dn/8L9DD551tulmn6dUq4VioUb06VUsORU8aRQx32VzSjYzi2bYt90WKZGkmU2T5HxOZ6lo6lTNPCjUUlFo0q2i4yHUI8hn75l/7kvE/lf1GLq2bsIynMOr37jn4b1/3L\u002BrYv9lWYkDxYkoireE\u002BOP9Xy87bNCjx4ACJwwY0WONf/x9erUsy7IsoVsAAAD//yO/fykACgAA", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:47 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "02807ad3-a9aa-4fbe-86b3-9c2eff379011", + "Location": "/v2/oci-artifact/blobs/uploads/02807ad3-a9aa-4fbe-86b3-9c2eff379011?_nouploadcache=false\u0026_state=JfRiodJJXSKfW23wonpBLQBesLmNhFovW1EcPWm6b1B7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDI4MDdhZDMtYTlhYS00ZmJlLTg2YjMtOWMyZWZmMzc5MDExIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjlUMTg6MjI6NDZaIn0%3D", + "Range": "0-170", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "9aac6ff2-26b7-4d67-9edd-e3ce5aaf79df", + "X-Ms-Correlation-Request-Id": "5fb955f0-9443-4a9c-ab67-a01ed449865a", + "X-Ms-Request-Id": "996835cc-fa81-4f26-9c10-47b8d3339416" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/02807ad3-a9aa-4fbe-86b3-9c2eff379011?_nouploadcache=false\u0026_state=JfRiodJJXSKfW23wonpBLQBesLmNhFovW1EcPWm6b1B7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDI4MDdhZDMtYTlhYS00ZmJlLTg2YjMtOWMyZWZmMzc5MDExIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjlUMTg6MjI6NDZaIn0%3D\u0026digest=sha256%3Ad25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "5bc8473b-6554-4652-8c9d-eaab00f7d6c8" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:47 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "986e0e39-df86-444d-bb6f-7dbdc680ef65" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "884f7568-8af2-4dc8-9472-f73728ab8fb8" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:47 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "ca927de6-eb31-4298-af8b-165142eca627" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/02807ad3-a9aa-4fbe-86b3-9c2eff379011?_nouploadcache=false\u0026_state=JfRiodJJXSKfW23wonpBLQBesLmNhFovW1EcPWm6b1B7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDI4MDdhZDMtYTlhYS00ZmJlLTg2YjMtOWMyZWZmMzc5MDExIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjlUMTg6MjI6NDZaIn0%3D\u0026digest=sha256%3Ad25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "5bc8473b-6554-4652-8c9d-eaab00f7d6c8" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:47 GMT", + "Docker-Content-Digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "5bc8473b-6554-4652-8c9d-eaab00f7d6c8", + "X-Ms-Correlation-Request-Id": "cc8defe7-2702-4331-b3aa-61fb4b75485e", + "X-Ms-Request-Id": "108f5be3-12ee-40dd-9657-aed850abda08" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3A8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "402", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "34195b6a-844b-4866-a9fe-dcfcae2d68cd" + }, + "RequestBody": { + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + }, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:47 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "fc4e13c0-36bd-4fd2-9936-14f3d53934f7" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "7bd7944e-9ee4-4a46-b4df-f43446548bd8" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:47 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "709759a5-aa2b-4d50-89ec-3ff8ab36c026" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3A8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "402", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "34195b6a-844b-4866-a9fe-dcfcae2d68cd" + }, + "RequestBody": { + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + }, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:48 GMT", + "Docker-Content-Digest": "sha256:8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/manifests/sha256:8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "34195b6a-844b-4866-a9fe-dcfcae2d68cd", + "X-Ms-Correlation-Request-Id": "949e16bd-e195-4a57-b1e9-e8b01d974827", + "X-Ms-Request-Id": "88f3cc81-4f8f-4e8c-bb65-080fa4959a5e" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3A8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "1d44087b-91e4-47bb-9386-ccc53eef0597" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "206", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:48 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "d00eed1f-670c-42d4-8077-ce6844acc4c8" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "156", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "075f5d13-45a5-4b2d-9cd0-c1372f3efe3a" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:48 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "6a41e166-85db-4f77-857a-e364f6d1817c" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3A8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "1d44087b-91e4-47bb-9386-ccc53eef0597" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "402", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Date": "Tue, 29 Mar 2022 18:22:48 GMT", + "Docker-Content-Digest": "sha256:8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "Docker-Distribution-Api-Version": "registry/2.0", + "ETag": "\u0022sha256:8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243\u0022", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "1d44087b-91e4-47bb-9386-ccc53eef0597", + "X-Ms-Correlation-Request-Id": "f5ac9ea2-9cd5-4772-b6f1-713dcab2014f", + "X-Ms-Request-Id": "d5d4e698-c2e9-45ad-b91a-3c262adef5fb" + }, + "ResponseBody": { + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3A8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "bca94c6d-5fbb-4c5c-84ae-a56ec4531a8c" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "208", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:48 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:delete\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "569207d7-31bc-4878-81a6-5152aba475b5" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "delete" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "158", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "ce8e17ce-6cb1-44bd-9822-8f547b0731d0" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Adelete\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:48 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "c0fc39d3-38cc-4903-a264-f82b81e1c64e" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3A8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "bca94c6d-5fbb-4c5c-84ae-a56ec4531a8c" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:49 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "bca94c6d-5fbb-4c5c-84ae-a56ec4531a8c", + "X-Ms-Correlation-Request-Id": "1f865146-a10d-49b9-b238-e5d57a0d3bc3", + "X-Ms-Request-Id": "ac97115f-0cfd-4a53-b341-74ae732de31e" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_from_stream.json b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_from_stream.json new file mode 100644 index 000000000000..ebcd6af31a59 --- /dev/null +++ b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_from_stream.json @@ -0,0 +1,1171 @@ +{ + "Entries": [ + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "7cc37c5c-e9c1-4f8d-b845-5f5e43ea2572" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:31 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "eca1f8a3-844a-4fe0-a334-4c027e13de8c" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/exchange?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "84", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "b68ec81e-11d4-4574-963b-f8bddbcaa2b8" + }, + "RequestBody": "grant_type=access_token\u0026service=myregistry.azurecr.io\u0026access_token=SecretPlaceholder", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:32 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "a9d3e736-2acb-42fb-afcf-5b16dc5f8e96" + }, + "ResponseBody": { + "refresh_token": "sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "7c454128-f1c5-4d76-90aa-910d1794486a" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:32 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "630532d8-1760-4ddf-ba6b-7e4d841545dc" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "7cc37c5c-e9c1-4f8d-b845-5f5e43ea2572" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:32 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "013d4303-5479-45e3-aad8-d3fdddf24d03", + "Location": "/v2/oci-artifact/blobs/uploads/013d4303-5479-45e3-aad8-d3fdddf24d03?_nouploadcache=false\u0026_state=IrjEnaxvLVpqsTf4O7rq6yirZRXTAR_XTvZFp4ZgqBt7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDEzZDQzMDMtNTQ3OS00NWUzLWFhZDgtZDNmZGRkZjI0ZDAzIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjMyLjkzMDIwOTU1NFoifQ%3D%3D", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "7cc37c5c-e9c1-4f8d-b845-5f5e43ea2572", + "X-Ms-Correlation-Request-Id": "ff9c1d0f-3bfd-4ffd-8a01-eba317332a75", + "X-Ms-Request-Id": "1fa87856-5323-44a1-855d-2f9274166899" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/013d4303-5479-45e3-aad8-d3fdddf24d03?_nouploadcache=false\u0026_state=IrjEnaxvLVpqsTf4O7rq6yirZRXTAR_XTvZFp4ZgqBt7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDEzZDQzMDMtNTQ3OS00NWUzLWFhZDgtZDNmZGRkZjI0ZDAzIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjMyLjkzMDIwOTU1NFoifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "6bdf1ec4-0363-4dab-a061-24b5f86fe228" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:33 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "5f525dc6-1f6f-4587-a21d-6b2b20c9e41c" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "d72ad9ba-59ff-472f-9bb4-8201a8355b87" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:33 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "2b169332-be32-4ad7-9fd5-b1030cac6c19" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/013d4303-5479-45e3-aad8-d3fdddf24d03?_nouploadcache=false\u0026_state=IrjEnaxvLVpqsTf4O7rq6yirZRXTAR_XTvZFp4ZgqBt7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDEzZDQzMDMtNTQ3OS00NWUzLWFhZDgtZDNmZGRkZjI0ZDAzIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjMyLjkzMDIwOTU1NFoifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "6bdf1ec4-0363-4dab-a061-24b5f86fe228" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:33 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "013d4303-5479-45e3-aad8-d3fdddf24d03", + "Location": "/v2/oci-artifact/blobs/uploads/013d4303-5479-45e3-aad8-d3fdddf24d03?_nouploadcache=false\u0026_state=38GrJ_1PNtJDefwG2TB4RaUkLNyXNwvLTNKGNm2gcyt7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDEzZDQzMDMtNTQ3OS00NWUzLWFhZDgtZDNmZGRkZjI0ZDAzIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yM1QyMzowNjozMloifQ%3D%3D", + "Range": "0-27", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "6bdf1ec4-0363-4dab-a061-24b5f86fe228", + "X-Ms-Correlation-Request-Id": "7a0b5039-7b56-4181-8d5a-e9e29ba449e1", + "X-Ms-Request-Id": "47ead137-79f8-409d-8b4c-7d3ca951d179" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/013d4303-5479-45e3-aad8-d3fdddf24d03?_nouploadcache=false\u0026_state=38GrJ_1PNtJDefwG2TB4RaUkLNyXNwvLTNKGNm2gcyt7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDEzZDQzMDMtNTQ3OS00NWUzLWFhZDgtZDNmZGRkZjI0ZDAzIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yM1QyMzowNjozMloifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "377d401d-f185-4ac8-99e5-0919e22bbee3" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:33 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "a037e185-57c2-45c8-9549-b458b7dea8fe" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "0b845756-9ee2-4bfc-93ce-10314031ece0" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:33 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "e1c14cf9-0e74-4c39-be65-0210f459917f" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/013d4303-5479-45e3-aad8-d3fdddf24d03?_nouploadcache=false\u0026_state=38GrJ_1PNtJDefwG2TB4RaUkLNyXNwvLTNKGNm2gcyt7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMDEzZDQzMDMtNTQ3OS00NWUzLWFhZDgtZDNmZGRkZjI0ZDAzIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yM1QyMzowNjozMloifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "377d401d-f185-4ac8-99e5-0919e22bbee3" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:34 GMT", + "Docker-Content-Digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "377d401d-f185-4ac8-99e5-0919e22bbee3", + "X-Ms-Correlation-Request-Id": "35892a91-c133-41d1-978d-85c04dfeffa0", + "X-Ms-Request-Id": "f74df9fb-a5aa-4a92-ba4a-91d28fa13fa4" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "e42fca86-8c13-481e-8f30-3ed255436af3" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:34 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "ad6f794f-8cc7-4c77-8658-7490a8876967" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "6e268d83-4049-4265-9f8c-18731219dc0f" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:34 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "39eb33d6-d27f-40e1-a46e-8ae13218ae90" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "e42fca86-8c13-481e-8f30-3ed255436af3" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "25d285ed-bfd7-4ead-b1fd-dba2a2f8323f", + "Location": "/v2/oci-artifact/blobs/uploads/25d285ed-bfd7-4ead-b1fd-dba2a2f8323f?_nouploadcache=false\u0026_state=mwokQNbxlYbQIubxW7MgA4-uf02z4LLF03YUgtUZEJ57Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMjVkMjg1ZWQtYmZkNy00ZWFkLWIxZmQtZGJhMmEyZjgzMjNmIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM0Ljk4NDk0NzkzM1oifQ%3D%3D", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "e42fca86-8c13-481e-8f30-3ed255436af3", + "X-Ms-Correlation-Request-Id": "c526e855-83fd-45c3-b563-078223c04d3b", + "X-Ms-Request-Id": "7c027448-b7f4-4265-bf42-340ae06e1911" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/25d285ed-bfd7-4ead-b1fd-dba2a2f8323f?_nouploadcache=false\u0026_state=mwokQNbxlYbQIubxW7MgA4-uf02z4LLF03YUgtUZEJ57Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMjVkMjg1ZWQtYmZkNy00ZWFkLWIxZmQtZGJhMmEyZjgzMjNmIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM0Ljk4NDk0NzkzM1oifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "171", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "2527daa2-4906-46a8-9532-cca7ea0edf33" + }, + "RequestBody": "H4sIAAAAAAAA/\u002BzRwcrCMBAE4Dn/8L9DD551tulmn6dUq4VioUb06VUsORU8aRQx32VzSjYzi2bYt90WKZGkmU2T5HxOZ6lo6lTNPCjUUlFo0q2i4yHUI8hn75l/7kvE/lf1GLq2bsIynMOr37jn4b1/3L\u002BrYv9lWYkDxYkoireE\u002BOP9Xy87bNCjx4ACJwwY0WONf/x9erUsy7IsoVsAAAD//yO/fykACgAA", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "9e3a8139-d68d-451c-b4ef-9cb5084314b5" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "b8d57516-ca26-410c-9f7a-55292d1b28db" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "9da6e299-7c6f-4977-8a86-d22c63e3cebd" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/25d285ed-bfd7-4ead-b1fd-dba2a2f8323f?_nouploadcache=false\u0026_state=mwokQNbxlYbQIubxW7MgA4-uf02z4LLF03YUgtUZEJ57Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMjVkMjg1ZWQtYmZkNy00ZWFkLWIxZmQtZGJhMmEyZjgzMjNmIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM0Ljk4NDk0NzkzM1oifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "171", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "2527daa2-4906-46a8-9532-cca7ea0edf33" + }, + "RequestBody": "H4sIAAAAAAAA/\u002BzRwcrCMBAE4Dn/8L9DD551tulmn6dUq4VioUb06VUsORU8aRQx32VzSjYzi2bYt90WKZGkmU2T5HxOZ6lo6lTNPCjUUlFo0q2i4yHUI8hn75l/7kvE/lf1GLq2bsIynMOr37jn4b1/3L\u002BrYv9lWYkDxYkoireE\u002BOP9Xy87bNCjx4ACJwwY0WONf/x9erUsy7IsoVsAAAD//yO/fykACgAA", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "25d285ed-bfd7-4ead-b1fd-dba2a2f8323f", + "Location": "/v2/oci-artifact/blobs/uploads/25d285ed-bfd7-4ead-b1fd-dba2a2f8323f?_nouploadcache=false\u0026_state=rVwFuY9HEaxbqDRjEB2Z6RoRA1TcyfySp94ZPCKKEwF7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMjVkMjg1ZWQtYmZkNy00ZWFkLWIxZmQtZGJhMmEyZjgzMjNmIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjNUMjM6MDY6MzRaIn0%3D", + "Range": "0-170", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "2527daa2-4906-46a8-9532-cca7ea0edf33", + "X-Ms-Correlation-Request-Id": "d059ac32-3c37-42b7-8a5d-b23ea7a932d9", + "X-Ms-Request-Id": "52c0247c-9e69-4322-8c15-d91aebebdbb8" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/25d285ed-bfd7-4ead-b1fd-dba2a2f8323f?_nouploadcache=false\u0026_state=rVwFuY9HEaxbqDRjEB2Z6RoRA1TcyfySp94ZPCKKEwF7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMjVkMjg1ZWQtYmZkNy00ZWFkLWIxZmQtZGJhMmEyZjgzMjNmIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjNUMjM6MDY6MzRaIn0%3D\u0026digest=sha256%3Ad25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "52fd5cc6-6a52-4b62-ac0b-20f4a43be4bc" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "6f489b9d-b025-4e41-af31-5eac10e0f056" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "43a18589-b11c-46c2-9d28-c58f288000e8" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "a98d5f1a-a067-4ae6-8a2c-ca2bf0bf0e14" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/25d285ed-bfd7-4ead-b1fd-dba2a2f8323f?_nouploadcache=false\u0026_state=rVwFuY9HEaxbqDRjEB2Z6RoRA1TcyfySp94ZPCKKEwF7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMjVkMjg1ZWQtYmZkNy00ZWFkLWIxZmQtZGJhMmEyZjgzMjNmIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjNUMjM6MDY6MzRaIn0%3D\u0026digest=sha256%3Ad25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "52fd5cc6-6a52-4b62-ac0b-20f4a43be4bc" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Docker-Content-Digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "52fd5cc6-6a52-4b62-ac0b-20f4a43be4bc", + "X-Ms-Correlation-Request-Id": "9d64d977-7385-4586-ab08-bfa3447ce8e2", + "X-Ms-Request-Id": "db882784-1bfb-44cc-94d5-c7c64870c807" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3Ad5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "585", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "101a6d62-a7f0-48b8-967b-99a971bb8239" + }, + "RequestBody": { + "schemaVersion": 2, + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "size": 171 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "size": 28, + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ] + }, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "b3ee331c-e74a-45a4-b46b-e962e7ba1ed7" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "3755d1b3-694d-45ca-ade2-a7cb5afa06ac" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:35 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "92b0fbae-30dd-4b81-8d5b-2e172d0d46cf" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3Ad5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "585", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "101a6d62-a7f0-48b8-967b-99a971bb8239" + }, + "RequestBody": { + "schemaVersion": 2, + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "size": 171 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "size": 28, + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:36 GMT", + "Docker-Content-Digest": "sha256:d5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/manifests/sha256:d5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "101a6d62-a7f0-48b8-967b-99a971bb8239", + "X-Ms-Correlation-Request-Id": "7b4b7e25-28f2-47e4-8aa5-c030a91f599c", + "X-Ms-Request-Id": "fc958996-918c-4773-a8e5-2b48b666e6aa" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3Ad5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "1883f6ed-2c30-40d8-a72b-7663ec50cecc" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "206", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:36 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "ea4e7db5-420b-4eff-9f0a-d37ebe90235d" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "156", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "79565445-b709-4071-b9f2-9263b5641ce5" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:36 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "e2206a7a-e986-49d0-8f31-fd51d29dd538" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3Ad5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "1883f6ed-2c30-40d8-a72b-7663ec50cecc" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "585", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Date": "Wed, 23 Mar 2022 23:06:36 GMT", + "Docker-Content-Digest": "sha256:d5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "Docker-Distribution-Api-Version": "registry/2.0", + "ETag": "\u0022sha256:d5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4\u0022", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "1883f6ed-2c30-40d8-a72b-7663ec50cecc", + "X-Ms-Correlation-Request-Id": "874b70ff-2880-471b-b50c-79a1972ef0c9", + "X-Ms-Request-Id": "668f4f5a-a475-4fc8-bb7f-8c882e261c68" + }, + "ResponseBody": { + "schemaVersion": 2, + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "size": 171 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "size": 28, + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3Ad5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "bf39c930-cd9e-4449-b8b4-455270f19923" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "208", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:36 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:delete\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "3d0aa80f-b695-4fda-832a-5848be540db7" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "delete" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "158", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "d55f56bd-146b-4fd6-9cd6-d273d40a9ae0" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Adelete\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:36 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "6d67cc08-cbbb-4eab-9f4a-1e125f862259" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3Ad5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "bf39c930-cd9e-4449-b8b4-455270f19923" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:36 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "bf39c930-cd9e-4449-b8b4-455270f19923", + "X-Ms-Correlation-Request-Id": "8cad896a-decc-4319-8edf-48c469136c74", + "X-Ms-Request-Id": "f88b620d-2096-4624-808d-2dffb7c01caf" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_stream_with_tag.json b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_stream_with_tag.json new file mode 100644 index 000000000000..0896c642c825 --- /dev/null +++ b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_stream_with_tag.json @@ -0,0 +1,1171 @@ +{ + "Entries": [ + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "3b4d9674-ee4a-4870-8937-6f65382727f0" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:37 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "d8133992-1f26-48a3-8caa-23346b28533a" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/exchange?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "84", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "a0a1cc38-ae41-45cc-b3a7-b933bca7dace" + }, + "RequestBody": "grant_type=access_token\u0026service=myregistry.azurecr.io\u0026access_token=SecretPlaceholder", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:37 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "fc986567-9ff4-44e4-927b-def5b6635a4b" + }, + "ResponseBody": { + "refresh_token": "sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "3526d290-baf3-4717-aada-a93c91ed3a49" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "fed767c7-22e7-45a5-a69b-17e3057b1fca" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "3b4d9674-ee4a-4870-8937-6f65382727f0" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "78ea7553-d62a-457b-8f3d-c05d3e2b8ef8", + "Location": "/v2/oci-artifact/blobs/uploads/78ea7553-d62a-457b-8f3d-c05d3e2b8ef8?_nouploadcache=false\u0026_state=t0WkqkaPamkH0L3nJYjdsCKE2vSgPposz-D8vilSKxp7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNzhlYTc1NTMtZDYyYS00NTdiLThmM2QtYzA1ZDNlMmI4ZWY4IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM4LjEyNjUzOTUxOVoifQ%3D%3D", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "3b4d9674-ee4a-4870-8937-6f65382727f0", + "X-Ms-Correlation-Request-Id": "e20f5bc8-4a33-4b07-84fa-06755e5d50ea", + "X-Ms-Request-Id": "1e3cd3f8-b004-4bd9-88b8-0d8792563162" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/78ea7553-d62a-457b-8f3d-c05d3e2b8ef8?_nouploadcache=false\u0026_state=t0WkqkaPamkH0L3nJYjdsCKE2vSgPposz-D8vilSKxp7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNzhlYTc1NTMtZDYyYS00NTdiLThmM2QtYzA1ZDNlMmI4ZWY4IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM4LjEyNjUzOTUxOVoifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "39cb42d3-6041-4836-bbf7-cbb5d5fadb0e" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:push,pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "d2e97b51-a468-4bc5-94a8-12f2c0fdce73" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "b88983d2-28d5-4bce-93e1-5a6601a730ad" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apush%2Cpull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "2c954053-ee12-49e4-922e-63d67936c6ec" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/78ea7553-d62a-457b-8f3d-c05d3e2b8ef8?_nouploadcache=false\u0026_state=t0WkqkaPamkH0L3nJYjdsCKE2vSgPposz-D8vilSKxp7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNzhlYTc1NTMtZDYyYS00NTdiLThmM2QtYzA1ZDNlMmI4ZWY4IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM4LjEyNjUzOTUxOVoifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "39cb42d3-6041-4836-bbf7-cbb5d5fadb0e" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "78ea7553-d62a-457b-8f3d-c05d3e2b8ef8", + "Location": "/v2/oci-artifact/blobs/uploads/78ea7553-d62a-457b-8f3d-c05d3e2b8ef8?_nouploadcache=false\u0026_state=a7Br2c3Igr_yXcWgbvwTTd4rEqLnWMJ1cqjnzAYJq2F7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNzhlYTc1NTMtZDYyYS00NTdiLThmM2QtYzA1ZDNlMmI4ZWY4IiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yM1QyMzowNjozOFoifQ%3D%3D", + "Range": "0-27", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "39cb42d3-6041-4836-bbf7-cbb5d5fadb0e", + "X-Ms-Correlation-Request-Id": "7d23f54a-0715-451d-85bf-5efe0b9c3887", + "X-Ms-Request-Id": "61d2074c-d105-47f7-8beb-c40546a59918" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/78ea7553-d62a-457b-8f3d-c05d3e2b8ef8?_nouploadcache=false\u0026_state=a7Br2c3Igr_yXcWgbvwTTd4rEqLnWMJ1cqjnzAYJq2F7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNzhlYTc1NTMtZDYyYS00NTdiLThmM2QtYzA1ZDNlMmI4ZWY4IiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yM1QyMzowNjozOFoifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "64ae1beb-4e25-4c8d-8848-ab7d1219cf2d" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "334ce410-b3bb-4d0c-8dc6-3584f09ab23d" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "96677498-49f0-4206-a6a5-ddc594e974d8" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "02ec4193-b377-402d-83a0-674033b92734" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/78ea7553-d62a-457b-8f3d-c05d3e2b8ef8?_nouploadcache=false\u0026_state=a7Br2c3Igr_yXcWgbvwTTd4rEqLnWMJ1cqjnzAYJq2F7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNzhlYTc1NTMtZDYyYS00NTdiLThmM2QtYzA1ZDNlMmI4ZWY4IiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yM1QyMzowNjozOFoifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "64ae1beb-4e25-4c8d-8848-ab7d1219cf2d" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Docker-Content-Digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "64ae1beb-4e25-4c8d-8848-ab7d1219cf2d", + "X-Ms-Correlation-Request-Id": "8dd00a89-fd0a-4536-9612-6c7e84e62404", + "X-Ms-Request-Id": "2d6c4e29-74f1-4a9f-8867-cd787e8643c6" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "5e73e4ed-b2b4-4bb9-89fb-a2891e525399" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:38 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "180b58a7-f3f5-4648-aa31-8ceea22f1132" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "32daa407-9d66-44e2-b331-4b17fbe0d666" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "e25869d6-dd98-433e-a582-caaafab65b15" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "5e73e4ed-b2b4-4bb9-89fb-a2891e525399" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "e354b4a6-f7ed-4cf9-851d-b0eb0d6c7d21", + "Location": "/v2/oci-artifact/blobs/uploads/e354b4a6-f7ed-4cf9-851d-b0eb0d6c7d21?_nouploadcache=false\u0026_state=KnztcvyBTw5LEWi0V8LPKy3Cz--Q53eG2b8Lc2l3Dk17Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZTM1NGI0YTYtZjdlZC00Y2Y5LTg1MWQtYjBlYjBkNmM3ZDIxIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM5LjEzNjgxNDMwM1oifQ%3D%3D", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "5e73e4ed-b2b4-4bb9-89fb-a2891e525399", + "X-Ms-Correlation-Request-Id": "5b490094-25d1-46cc-9568-3c0969b867e4", + "X-Ms-Request-Id": "0ad2bdbd-57b6-4681-a697-1c7a8f016829" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/e354b4a6-f7ed-4cf9-851d-b0eb0d6c7d21?_nouploadcache=false\u0026_state=KnztcvyBTw5LEWi0V8LPKy3Cz--Q53eG2b8Lc2l3Dk17Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZTM1NGI0YTYtZjdlZC00Y2Y5LTg1MWQtYjBlYjBkNmM3ZDIxIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM5LjEzNjgxNDMwM1oifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "171", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "3b4c7e68-1f4e-498b-a1ca-075db49fd4c2" + }, + "RequestBody": "H4sIAAAAAAAA/\u002BzRwcrCMBAE4Dn/8L9DD551tulmn6dUq4VioUb06VUsORU8aRQx32VzSjYzi2bYt90WKZGkmU2T5HxOZ6lo6lTNPCjUUlFo0q2i4yHUI8hn75l/7kvE/lf1GLq2bsIynMOr37jn4b1/3L\u002BrYv9lWYkDxYkoireE\u002BOP9Xy87bNCjx4ACJwwY0WONf/x9erUsy7IsoVsAAAD//yO/fykACgAA", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:push,pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "c4cec937-09de-4e21-9e42-14c38bcbc159" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "19650b36-484d-4541-949a-e2fea62d03e0" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apush%2Cpull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "8692b2e2-5cc7-43c2-b21a-bfeafb71ebfa" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/e354b4a6-f7ed-4cf9-851d-b0eb0d6c7d21?_nouploadcache=false\u0026_state=KnztcvyBTw5LEWi0V8LPKy3Cz--Q53eG2b8Lc2l3Dk17Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZTM1NGI0YTYtZjdlZC00Y2Y5LTg1MWQtYjBlYjBkNmM3ZDIxIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTIzVDIzOjA2OjM5LjEzNjgxNDMwM1oifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "171", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "3b4c7e68-1f4e-498b-a1ca-075db49fd4c2" + }, + "RequestBody": "H4sIAAAAAAAA/\u002BzRwcrCMBAE4Dn/8L9DD551tulmn6dUq4VioUb06VUsORU8aRQx32VzSjYzi2bYt90WKZGkmU2T5HxOZ6lo6lTNPCjUUlFo0q2i4yHUI8hn75l/7kvE/lf1GLq2bsIynMOr37jn4b1/3L\u002BrYv9lWYkDxYkoireE\u002BOP9Xy87bNCjx4ACJwwY0WONf/x9erUsy7IsoVsAAAD//yO/fykACgAA", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "e354b4a6-f7ed-4cf9-851d-b0eb0d6c7d21", + "Location": "/v2/oci-artifact/blobs/uploads/e354b4a6-f7ed-4cf9-851d-b0eb0d6c7d21?_nouploadcache=false\u0026_state=J-QnxEW2qBuGX-cT6G7jQCpkobXhbyw_ByGXseskifR7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZTM1NGI0YTYtZjdlZC00Y2Y5LTg1MWQtYjBlYjBkNmM3ZDIxIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjNUMjM6MDY6MzlaIn0%3D", + "Range": "0-170", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "3b4c7e68-1f4e-498b-a1ca-075db49fd4c2", + "X-Ms-Correlation-Request-Id": "b539e7cb-91ad-4689-9056-6c6253d11be3", + "X-Ms-Request-Id": "9aa82dab-51b9-42ca-a48a-693d8f68b8fa" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/e354b4a6-f7ed-4cf9-851d-b0eb0d6c7d21?_nouploadcache=false\u0026_state=J-QnxEW2qBuGX-cT6G7jQCpkobXhbyw_ByGXseskifR7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZTM1NGI0YTYtZjdlZC00Y2Y5LTg1MWQtYjBlYjBkNmM3ZDIxIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjNUMjM6MDY6MzlaIn0%3D\u0026digest=sha256%3Ad25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "8762a801-0459-487a-b35c-e0beb5e2a2e1" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "790ed765-d5e5-4475-9c18-2bd0bdb3c32d" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "d1e7d451-3686-410d-9743-15ba6b1b518e" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "f68ebb38-555c-4d8f-b947-88ec3d6bf805" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/e354b4a6-f7ed-4cf9-851d-b0eb0d6c7d21?_nouploadcache=false\u0026_state=J-QnxEW2qBuGX-cT6G7jQCpkobXhbyw_ByGXseskifR7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZTM1NGI0YTYtZjdlZC00Y2Y5LTg1MWQtYjBlYjBkNmM3ZDIxIiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjNUMjM6MDY6MzlaIn0%3D\u0026digest=sha256%3Ad25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "8762a801-0459-487a-b35c-e0beb5e2a2e1" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Docker-Content-Digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "8762a801-0459-487a-b35c-e0beb5e2a2e1", + "X-Ms-Correlation-Request-Id": "074791b4-8d66-4200-9c6d-b9658ab2564f", + "X-Ms-Request-Id": "d20a62bc-3f0b-4606-a953-620e10b4698f" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/my_artifact", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "585", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "6bf5a594-e824-4026-869f-e94c0813c516" + }, + "RequestBody": { + "schemaVersion": 2, + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "size": 171 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "size": 28, + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ] + }, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "92899fa6-ccd4-4955-8a43-fef0ce9033b9" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "e3737e6e-bc3c-40fe-93f7-3938909760b5" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:39 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "c812f282-1b80-446e-9475-5d418e7fd98e" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/my_artifact", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "585", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "6bf5a594-e824-4026-869f-e94c0813c516" + }, + "RequestBody": { + "schemaVersion": 2, + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "size": 171 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "size": 28, + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:40 GMT", + "Docker-Content-Digest": "sha256:d5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/manifests/sha256:d5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "6bf5a594-e824-4026-869f-e94c0813c516", + "X-Ms-Correlation-Request-Id": "6ab6aa67-3eac-4439-8b46-51f13cbffe08", + "X-Ms-Request-Id": "c0b2bf5d-3138-4d77-9f64-34bf107a3489" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/my_artifact", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "2a57f8c2-8578-4e1d-bed0-b9d415021128" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "206", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:40 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "bef0fc29-2f11-4282-ac90-f235e8c0096c" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "156", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "cf1eb01f-e863-45a0-9111-589d59bcb423" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:40 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "522ef818-88d4-408b-a9a8-a30d92d3bab4" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/my_artifact", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "2a57f8c2-8578-4e1d-bed0-b9d415021128" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "585", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Date": "Wed, 23 Mar 2022 23:06:40 GMT", + "Docker-Content-Digest": "sha256:d5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "Docker-Distribution-Api-Version": "registry/2.0", + "ETag": "\u0022sha256:d5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4\u0022", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "2a57f8c2-8578-4e1d-bed0-b9d415021128", + "X-Ms-Correlation-Request-Id": "b038ef6b-e56a-47c9-b1a2-2245ac7ad408", + "X-Ms-Request-Id": "a7f11a43-56d8-4609-82ea-6602f5df7e44" + }, + "ResponseBody": { + "schemaVersion": 2, + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "size": 171 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "size": 28, + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3Ad5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "fb46f101-a788-4c22-8262-49339846a640" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "208", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:40 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:delete\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "51843a04-aff1-4cb7-92f9-565f59af73a3" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "delete" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "158", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "6c6e4060-18c5-4818-b26a-77f5e1999c23" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Adelete\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 23 Mar 2022 23:06:40 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "acbcd623-26a9-436d-8932-ac4b69c9d527" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3Ad5dd4479d4b658f68b10a47e51815472f3313dc7886ec17a1744deb21dc186f4", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.5.1 Node/v16.13.0 OS/(x64-Linux-5.10.60.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "fb46f101-a788-4c22-8262-49339846a640" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 23 Mar 2022 23:06:41 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "fb46f101-a788-4c22-8262-49339846a640", + "X-Ms-Correlation-Request-Id": "acc43388-8b08-4f2d-a2d9-5248348d6083", + "X-Ms-Request-Id": "70fa97d4-82f5-4282-b286-499719a4dfc0" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_with_tag.json b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_with_tag.json new file mode 100644 index 000000000000..3679cb09aa9a --- /dev/null +++ b/sdk/containerregistry/container-registry/recordings/node/containerregistryblobclient/recording_can_upload_oci_manifest_with_tag.json @@ -0,0 +1,1171 @@ +{ + "Entries": [ + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "c5938d93-2737-4371-bf46-43ba7b750894" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:49 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "9088ec09-50c1-4794-992b-d728dbb2bba5" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/exchange?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "84", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "3ffbe212-24b7-45d5-a4e2-50ceea44d9f2" + }, + "RequestBody": "grant_type=access_token\u0026service=myregistry.azurecr.io\u0026access_token=SecretPlaceholder", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:49 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "70affad8-3765-4ef5-afbb-8ba847fd9da4" + }, + "ResponseBody": { + "refresh_token": "sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "67b2c047-9164-4d47-b450-6779ad2f7983" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:49 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "7fb788d1-73cb-4f49-9e39-1d1b0d2c60b2" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "c5938d93-2737-4371-bf46-43ba7b750894" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "6e73a156-10b0-439d-8dfd-2ee959a17832", + "Location": "/v2/oci-artifact/blobs/uploads/6e73a156-10b0-439d-8dfd-2ee959a17832?_nouploadcache=false\u0026_state=okZRVjDGxe3dpFc4y1cZjJlgYU9OIOOBuOyHdNw4SC97Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNmU3M2ExNTYtMTBiMC00MzlkLThkZmQtMmVlOTU5YTE3ODMyIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjUwLjAyNDYzMzdaIn0%3D", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "c5938d93-2737-4371-bf46-43ba7b750894", + "X-Ms-Correlation-Request-Id": "bb26ef1d-0e51-4677-bf99-23ab52a868e9", + "X-Ms-Request-Id": "883906b3-6a89-44a7-8524-4a4cd723ba98" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/6e73a156-10b0-439d-8dfd-2ee959a17832?_nouploadcache=false\u0026_state=okZRVjDGxe3dpFc4y1cZjJlgYU9OIOOBuOyHdNw4SC97Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNmU3M2ExNTYtMTBiMC00MzlkLThkZmQtMmVlOTU5YTE3ODMyIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjUwLjAyNDYzMzdaIn0%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "1048e11f-f0fd-4230-8004-d8c89e34f79e" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "21d211f0-a054-492f-8cb0-f1672cfb03a4" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "0d23e9d1-4a30-4da8-a5c2-a9b2360721f5" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "e00f8301-c7b2-40f0-af25-acf7ffb624b4" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/6e73a156-10b0-439d-8dfd-2ee959a17832?_nouploadcache=false\u0026_state=okZRVjDGxe3dpFc4y1cZjJlgYU9OIOOBuOyHdNw4SC97Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNmU3M2ExNTYtMTBiMC00MzlkLThkZmQtMmVlOTU5YTE3ODMyIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjUwLjAyNDYzMzdaIn0%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "28", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "1048e11f-f0fd-4230-8004-d8c89e34f79e" + }, + "RequestBody": "//5oAGUAbABsAG8AIAB3AG8AcgBsAGQADQAKAA==", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "6e73a156-10b0-439d-8dfd-2ee959a17832", + "Location": "/v2/oci-artifact/blobs/uploads/6e73a156-10b0-439d-8dfd-2ee959a17832?_nouploadcache=false\u0026_state=ngXONIT3lG_VGCGN8WtT7EIAItSnbn70w3fFXMPtb2x7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNmU3M2ExNTYtMTBiMC00MzlkLThkZmQtMmVlOTU5YTE3ODMyIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yOVQxODoyMjo1MFoifQ%3D%3D", + "Range": "0-27", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "1048e11f-f0fd-4230-8004-d8c89e34f79e", + "X-Ms-Correlation-Request-Id": "9f2d648c-afd7-4b3f-8d79-3e57b254be3b", + "X-Ms-Request-Id": "9bbf5d7a-499e-4850-8483-ea9dedd02304" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/6e73a156-10b0-439d-8dfd-2ee959a17832?_nouploadcache=false\u0026_state=ngXONIT3lG_VGCGN8WtT7EIAItSnbn70w3fFXMPtb2x7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNmU3M2ExNTYtMTBiMC00MzlkLThkZmQtMmVlOTU5YTE3ODMyIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yOVQxODoyMjo1MFoifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "a39fb0bb-5bce-41f6-9cb6-b6f703a35552" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "db89d0bc-a024-4207-94a4-c54ea1e515ec" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "d12af8f7-7b52-4a04-b86f-bc1da07101a9" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "9cc5374f-e28f-4426-a261-4f62eab916ef" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/6e73a156-10b0-439d-8dfd-2ee959a17832?_nouploadcache=false\u0026_state=ngXONIT3lG_VGCGN8WtT7EIAItSnbn70w3fFXMPtb2x7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNmU3M2ExNTYtMTBiMC00MzlkLThkZmQtMmVlOTU5YTE3ODMyIiwiT2Zmc2V0IjoyOCwiU3RhcnRlZEF0IjoiMjAyMi0wMy0yOVQxODoyMjo1MFoifQ%3D%3D\u0026digest=sha256%3A654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "a39fb0bb-5bce-41f6-9cb6-b6f703a35552" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Docker-Content-Digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "a39fb0bb-5bce-41f6-9cb6-b6f703a35552", + "X-Ms-Correlation-Request-Id": "57434d57-831b-462b-99c5-ddd1d24681bb", + "X-Ms-Request-Id": "701f204c-0ef8-4bb6-a092-b14a6d6f7738" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "e1b04840-5692-42e4-93e9-73c53d865ee8" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "d8c68c3b-9018-4022-8162-66d6a574f6f8" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "e87f05d1-d983-49ae-b58d-ffdd915b00a2" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:50 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "02253df3-e502-4937-852b-a8b3d679ed02" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "e1b04840-5692-42e4-93e9-73c53d865ee8" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:51 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "fc8b3764-fad4-40e6-98a2-aac036c15769", + "Location": "/v2/oci-artifact/blobs/uploads/fc8b3764-fad4-40e6-98a2-aac036c15769?_nouploadcache=false\u0026_state=tlIobr-ksnZ_Z_V5zjtwFiDaaDbyESAlAUBYEJ0yW817Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZmM4YjM3NjQtZmFkNC00MGU2LTk4YTItYWFjMDM2YzE1NzY5IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjUxLjExNjU3MzgxNFoifQ%3D%3D", + "Range": "0-0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "e1b04840-5692-42e4-93e9-73c53d865ee8", + "X-Ms-Correlation-Request-Id": "28727a14-9ad9-48ed-9c95-f795657a3db3", + "X-Ms-Request-Id": "c38a9c14-eb17-4220-a8ae-f3f3e349f400" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/fc8b3764-fad4-40e6-98a2-aac036c15769?_nouploadcache=false\u0026_state=tlIobr-ksnZ_Z_V5zjtwFiDaaDbyESAlAUBYEJ0yW817Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZmM4YjM3NjQtZmFkNC00MGU2LTk4YTItYWFjMDM2YzE1NzY5IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjUxLjExNjU3MzgxNFoifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "171", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "d26becb1-122d-435d-a66b-940e9c6b6dce" + }, + "RequestBody": "H4sIAAAAAAAA/\u002BzRwcrCMBAE4Dn/8L9DD551tulmn6dUq4VioUb06VUsORU8aRQx32VzSjYzi2bYt90WKZGkmU2T5HxOZ6lo6lTNPCjUUlFo0q2i4yHUI8hn75l/7kvE/lf1GLq2bsIynMOr37jn4b1/3L\u002BrYv9lWYkDxYkoireE\u002BOP9Xy87bNCjx4ACJwwY0WONf/x9erUsy7IsoVsAAAD//yO/fykACgAA", + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:51 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "19fc43a6-0858-4316-81d7-81980ac1eafd" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "2953f5d1-58be-4925-b783-1aa927be0304" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:51 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "ed2f6e6a-278d-4227-a713-5746a872afbf" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/fc8b3764-fad4-40e6-98a2-aac036c15769?_nouploadcache=false\u0026_state=tlIobr-ksnZ_Z_V5zjtwFiDaaDbyESAlAUBYEJ0yW817Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZmM4YjM3NjQtZmFkNC00MGU2LTk4YTItYWFjMDM2YzE1NzY5IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIyLTAzLTI5VDE4OjIyOjUxLjExNjU3MzgxNFoifQ%3D%3D", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "171", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "d26becb1-122d-435d-a66b-940e9c6b6dce" + }, + "RequestBody": "H4sIAAAAAAAA/\u002BzRwcrCMBAE4Dn/8L9DD551tulmn6dUq4VioUb06VUsORU8aRQx32VzSjYzi2bYt90WKZGkmU2T5HxOZ6lo6lTNPCjUUlFo0q2i4yHUI8hn75l/7kvE/lf1GLq2bsIynMOr37jn4b1/3L\u002BrYv9lWYkDxYkoireE\u002BOP9Xy87bNCjx4ACJwwY0WONf/x9erUsy7IsoVsAAAD//yO/fykACgAA", + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:51 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Docker-Upload-Uuid": "fc8b3764-fad4-40e6-98a2-aac036c15769", + "Location": "/v2/oci-artifact/blobs/uploads/fc8b3764-fad4-40e6-98a2-aac036c15769?_nouploadcache=false\u0026_state=pOjMhVfVp2uq8CEpj0J5NCUW-ZSj910P8_oIJ2loviJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZmM4YjM3NjQtZmFkNC00MGU2LTk4YTItYWFjMDM2YzE1NzY5IiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjlUMTg6MjI6NTFaIn0%3D", + "Range": "0-170", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "d26becb1-122d-435d-a66b-940e9c6b6dce", + "X-Ms-Correlation-Request-Id": "0380894b-8fee-41f3-81b9-ec74153b098c", + "X-Ms-Request-Id": "65f0d6c3-0df0-4849-bd3f-d488e62c5e3d" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/fc8b3764-fad4-40e6-98a2-aac036c15769?_nouploadcache=false\u0026_state=pOjMhVfVp2uq8CEpj0J5NCUW-ZSj910P8_oIJ2loviJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZmM4YjM3NjQtZmFkNC00MGU2LTk4YTItYWFjMDM2YzE1NzY5IiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjlUMTg6MjI6NTFaIn0%3D\u0026digest=sha256%3Ad25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "e7c80b5b-a3cf-444d-a7c0-1f9f72d14309" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:51 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "9e2d8046-1b23-476b-8d44-ec333ad7067c" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "b63220a0-bc80-4d90-ab98-a85d40225975" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:51 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "1334c420-f3d5-44fc-95c6-8ab014ce1489" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/blobs/uploads/fc8b3764-fad4-40e6-98a2-aac036c15769?_nouploadcache=false\u0026_state=pOjMhVfVp2uq8CEpj0J5NCUW-ZSj910P8_oIJ2loviJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiZmM4YjM3NjQtZmFkNC00MGU2LTk4YTItYWFjMDM2YzE1NzY5IiwiT2Zmc2V0IjoxNzEsIlN0YXJ0ZWRBdCI6IjIwMjItMDMtMjlUMTg6MjI6NTFaIn0%3D\u0026digest=sha256%3Ad25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/octet-stream", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "e7c80b5b-a3cf-444d-a7c0-1f9f72d14309" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:51 GMT", + "Docker-Content-Digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/blobs/sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "e7c80b5b-a3cf-444d-a7c0-1f9f72d14309", + "X-Ms-Correlation-Request-Id": "9b0a4168-ef92-41fa-92d0-647c163d613e", + "X-Ms-Request-Id": "75f07980-fa9b-49a6-9dbd-e188d5d21b6d" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/my_artifact", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "402", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "d2e7d9eb-20e8-4a5f-a8af-3e6552f74c84" + }, + "RequestBody": { + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + }, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "266", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:52 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull,push\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "e1134a14-d0bf-4ae6-ab3a-f405781b21fd" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + }, + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "push" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "163", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "6fc30deb-d166-4085-9652-c76cb3961364" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull%2Cpush\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:52 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "8a2272e1-1647-4197-9b74-68d041762388" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/my_artifact", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "402", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "d2e7d9eb-20e8-4a5f-a8af-3e6552f74c84" + }, + "RequestBody": { + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + }, + "StatusCode": 201, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:52 GMT", + "Docker-Content-Digest": "sha256:8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "Docker-Distribution-Api-Version": "registry/2.0", + "Location": "/v2/oci-artifact/manifests/sha256:8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "d2e7d9eb-20e8-4a5f-a8af-3e6552f74c84", + "X-Ms-Correlation-Request-Id": "8d8e3b4e-272d-44ed-a6f7-1829bcb62d33", + "X-Ms-Request-Id": "e4bfa265-3a4d-407c-93b0-645cfe0d287f" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/my_artifact", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "21322ed6-f9fc-42f4-a37d-04d15e493428" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "206", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:52 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:pull\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "3a5d6796-b09b-4c93-8fd5-c6ea0dbf9443" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "pull" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "156", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "723a5b75-9b5d-4c83-9f92-458eddfe0212" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Apull\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:52 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "8fde7a25-f467-4cbb-b4d6-fce732d275fb" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/my_artifact", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "21322ed6-f9fc-42f4-a37d-04d15e493428" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "402", + "Content-Type": "application/vnd.oci.image.manifest.v1\u002Bjson", + "Date": "Tue, 29 Mar 2022 18:22:52 GMT", + "Docker-Content-Digest": "sha256:8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "Docker-Distribution-Api-Version": "registry/2.0", + "ETag": "\u0022sha256:8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243\u0022", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "21322ed6-f9fc-42f4-a37d-04d15e493428", + "X-Ms-Correlation-Request-Id": "8b1266d5-e655-4729-9d81-111a62a02595", + "X-Ms-Request-Id": "762ae11a-a4aa-4c0d-bc44-d397abd2acb1" + }, + "ResponseBody": { + "config": { + "mediaType": "application/vnd.oci.image.config.v1\u002Bjson", + "size": 171, + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8" + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "size": 28, + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ], + "schemaVersion": 2 + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3A8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "327a70f4-8a6c-4ded-9119-f8259e156bbf" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "208", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:52 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "WWW-Authenticate": "Bearer realm=\u0022https://myregistry.azurecr.io/oauth2/token\u0022,service=\u0022myregistry.azurecr.io\u0022,scope=\u0022repository:oci-artifact:delete\u0022", + "X-Content-Type-Options": "nosniff", + "X-Ms-Correlation-Request-Id": "b9ade27e-ab36-497d-a82d-9dffadb8358a" + }, + "ResponseBody": { + "errors": [ + { + "code": "UNAUTHORIZED", + "message": "authentication required, visit https://aka.ms/acr/authorization for more information.", + "detail": [ + { + "Type": "repository", + "Name": "oci-artifact", + "Action": "delete" + } + ] + } + ] + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/oauth2/token?api-version=2021-07-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Connection": "keep-alive", + "Content-Length": "158", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "b03545ca-7951-4bb5-a113-67a092cdb6c3" + }, + "RequestBody": "service=myregistry.azurecr.io\u0026scope=repository%3Aoci-artifact%3Adelete\u0026refresh_token=sanitized.eyJleHAiOjg2NDAwMDAwMDAwMDB9.sanitized\u0026grant_type=refresh_token", + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 29 Mar 2022 18:22:53 GMT", + "Server": "openresty", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Ms-Correlation-Request-Id": "fd56f0e2-9a6e-4fec-8f03-872ac0b0932c" + }, + "ResponseBody": { + "access_token": "Sanitized" + } + }, + { + "RequestUri": "https://myregistry.azurecr.io/v2/oci-artifact/manifests/sha256%3A8e37b7384b05202eeeeeb0db538dbb0d1f81c42c97e4080b6e80363e14941243", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-container-registry/1.0.1 core-rest-pipeline/1.8.0 Node/v16.13.0 OS/(x64-Linux-5.10.102.1-microsoft-standard-WSL2)", + "x-ms-client-request-id": "327a70f4-8a6c-4ded-9119-f8259e156bbf" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Tue, 29 Mar 2022 18:22:53 GMT", + "Docker-Distribution-Api-Version": "registry/2.0", + "Server": "openresty", + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": "nosniff", + "X-Ms-Client-Request-Id": "327a70f4-8a6c-4ded-9119-f8259e156bbf", + "X-Ms-Correlation-Request-Id": "10741417-e912-4fb8-b491-1d3acb855d69", + "X-Ms-Request-Id": "e9e78a19-4eab-44a8-9814-2d8ccad92200" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/containerregistry/container-registry/review/container-registry.api.md b/sdk/containerregistry/container-registry/review/container-registry.api.md index bdbcbbdb9ae3..3d264e003f61 100644 --- a/sdk/containerregistry/container-registry/review/container-registry.api.md +++ b/sdk/containerregistry/container-registry/review/container-registry.api.md @@ -57,6 +57,26 @@ export interface ArtifactTagProperties { readonly repositoryName: string; } +// @public +export class ContainerRegistryBlobClient { + constructor(endpoint: string, repositoryName: string, credential: TokenCredential, options: ContainerRegistryBlobClientOptions); + deleteBlob(digest: string, options?: DeleteBlobOptions): Promise; + deleteManifest(digest: string, options?: DeleteManifestOptions): Promise; + downloadBlob(digest: string, options?: DownloadBlobOptions): Promise; + downloadManifest(tagOrDigest: string, options?: DownloadManifestOptions): Promise; + readonly endpoint: string; + readonly repositoryName: string; + uploadBlob(blobStreamFactory: () => NodeJS.ReadableStream): Promise; + uploadBlob(blobStream: NodeJS.ReadableStream): Promise; + uploadManifest(manifest: (() => NodeJS.ReadableStream) | NodeJS.ReadableStream | OciManifest, options?: UploadManifestOptions): Promise; +} + +// @public +export interface ContainerRegistryBlobClientOptions extends CommonClientOptions { + audience: string; + serviceVersion?: "2021-07-01"; +} + // @public export class ContainerRegistryClient { constructor(endpoint: string, credential: TokenCredential, options?: ContainerRegistryClientOptions); @@ -103,6 +123,14 @@ export interface ContainerRepositoryProperties { export interface DeleteArtifactOptions extends OperationOptions { } +// @public +export interface DeleteBlobOptions extends OperationOptions { +} + +// @public +export interface DeleteManifestOptions extends OperationOptions { +} + // @public export interface DeleteRepositoryOptions extends OperationOptions { } @@ -111,6 +139,32 @@ export interface DeleteRepositoryOptions extends OperationOptions { export interface DeleteTagOptions extends OperationOptions { } +// @public +export class DigestMismatchError extends Error { + constructor(message: string); +} + +// @public +export interface DownloadBlobOptions extends OperationOptions { +} + +// @public +export interface DownloadBlobResult { + content: NodeJS.ReadableStream; + digest: string; +} + +// @public +export interface DownloadManifestOptions extends OperationOptions { +} + +// @public +export interface DownloadManifestResult { + digest: string; + manifest: OciManifest; + manifestStream: NodeJS.ReadableStream; +} + // @public export interface GetManifestPropertiesOptions extends OperationOptions { } @@ -185,6 +239,40 @@ export interface ManifestPageResponse extends Array continuationToken?: string; } +// @public +export interface OciAnnotations { + [additionalProperties: string]: unknown; + authors?: string; + createdOn?: Date; + description?: string; + documentation?: string; + licenses?: string; + name?: string; + revision?: string; + source?: string; + title?: string; + url?: string; + vendor?: string; + version?: string; +} + +// @public +export interface OciBlobDescriptor { + annotations?: OciAnnotations; + digest: string; + mediaType: string; + size: number; + urls?: string[]; +} + +// @public +export interface OciManifest { + annotations?: OciAnnotations; + config?: OciBlobDescriptor; + layers?: OciBlobDescriptor[]; + schemaVersion: number; +} + // @public export interface RegistryArtifact { delete(options?: DeleteArtifactOptions): Promise; @@ -233,6 +321,21 @@ export interface UpdateTagPropertiesOptions extends OperationOptions { canWrite?: boolean; } +// @public +export interface UploadBlobResult { + digest: string; +} + +// @public +export interface UploadManifestOptions extends OperationOptions { + tag: string; +} + +// @public +export interface UploadManifestResult { + digest: string; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/containerregistry/container-registry/samples-dev/index.ts b/sdk/containerregistry/container-registry/samples-dev/index.ts new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sdk/containerregistry/container-registry/src/blob/containerRegistryBlobClient.ts b/sdk/containerregistry/container-registry/src/blob/containerRegistryBlobClient.ts new file mode 100644 index 000000000000..ad74e24f9530 --- /dev/null +++ b/sdk/containerregistry/container-registry/src/blob/containerRegistryBlobClient.ts @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + InternalPipelineOptions, + bearerTokenAuthenticationPolicy, + RestError, +} from "@azure/core-rest-pipeline"; +import { TokenCredential } from "@azure/core-auth"; +import { GeneratedClient } from "../generated"; +import { ChallengeHandler } from "../containerRegistryChallengeHandler"; +import { ContainerRegistryRefreshTokenCredential } from "../containerRegistryTokenCredential"; +import { logger } from "../logger"; +import { calculateDigest } from "../utils/digest"; +import { + DeleteBlobOptions, + DeleteManifestOptions, + DownloadBlobOptions, + DownloadBlobResult, + DownloadManifestOptions, + DownloadManifestResult, + OciManifest, + UploadBlobResult, + UploadManifestOptions, + UploadManifestResult, +} from "./models"; +import * as Mappers from "../generated/models/mappers"; +import { CommonClientOptions, createSerializer } from "@azure/core-client"; +import { readStreamToEnd } from "../utils/helpers"; +import { Readable } from "stream"; +import { createSpan } from "../tracing"; +import { SpanStatusCode } from "@azure/core-tracing"; + +const LATEST_API_VERSION = "2021-07-01"; + +enum KnownManifestMediaType { + OciManifestMediaType = "application/vnd.oci.image.manifest.v1+json", +} + +function isReadableStream(body: any): body is NodeJS.ReadableStream { + return body && typeof body.pipe === "function"; +} + +function assertHasProperty( + obj: T, + property: U +): asserts obj is T & Required> { + if (!Object.prototype.hasOwnProperty.call(obj, property)) { + throw new RestError(`Expected property ${property} to be defined.`); + } +} + +/** + * Error thrown when the Docker content digest returned from the + * server does not match the digest calculated from the content. + */ +export class DigestMismatchError extends Error { + constructor(message: string) { + super(message); + this.name = "DigestMismatchError"; + } +} + +/** + * Client options used to configure Container Registry Blob API requests. + */ +export interface ContainerRegistryBlobClientOptions extends CommonClientOptions { + /** + * Gets or sets the audience to use for authentication with Azure Active Directory. + * The authentication scope will be set from this audience. + * See {@link KnownContainerRegistryAudience} for known audience values. + */ + audience: string; + /** + * The version of service API to make calls against. + */ + serviceVersion?: "2021-07-01"; +} + +const serializer = createSerializer(Mappers, /* isXML */ false); + +/** + * The Azure Container Registry blob client, responsible for uploading and downloading blobs and manifests, the building blocks of artifacts. + */ +export class ContainerRegistryBlobClient { + /** + * The Azure Container Registry endpoint. + */ + public readonly endpoint: string; + + /** + * The name of the repository that logically groups the artifact parts. + */ + public readonly repositoryName: string; + + private client: GeneratedClient; + + /** + * Creates an instance of a ContainerRegistryBlobClient for managing container images and artifacts. + * + * Example usage: + * ```ts + * import { ContainerRegistryBlobClient } from "@azure/container-registry"; + * import { DefaultAzureCredential} from "@azure/identity"; + * + * const client = new ContainerRegistryBlobClient( + * "", + * "", + * new DefaultAzureCredential() + * ); + * ``` + * @param endpoint - the URL endpoint of the container registry + * @param repositoryName - the name of the repository that logically groups the artifact parts + * @param credential - used to authenticate requests to the service + * @param options - optional configuration used to send requests to the service + */ + constructor( + endpoint: string, + repositoryName: string, + credential: TokenCredential, + options: ContainerRegistryBlobClientOptions + ) { + if (!endpoint) { + throw new Error("invalid endpoint"); + } + + this.endpoint = endpoint; + this.repositoryName = repositoryName; + + const internalPipelineOptions: InternalPipelineOptions = { + ...options, + loggingOptions: { + logger: logger.info, + // This array contains header names we want to log that are not already + // included as safe. Unknown/unsafe headers are logged as "". + additionalAllowedQueryParameters: [ + "last", + "n", + "orderby", + "digest", + "_nouploadcache", + "_state", + ], + }, + }; + + const defaultScope = `${options.audience}/.default`; + const serviceVersion = options.serviceVersion ?? LATEST_API_VERSION; + const authClient = new GeneratedClient(endpoint, serviceVersion, internalPipelineOptions); + this.client = new GeneratedClient(endpoint, serviceVersion, internalPipelineOptions); + this.client.pipeline.addPolicy( + bearerTokenAuthenticationPolicy({ + credential, + scopes: [defaultScope], + challengeCallbacks: new ChallengeHandler( + new ContainerRegistryRefreshTokenCredential(authClient, defaultScope, credential) + ), + }) + ); + } + + /** + * Delete a blob. + * @param digest - the digest of the blob to delete + * @param options - optional configuration used to send requests to the service + */ + public async deleteBlob(digest: string, options?: DeleteBlobOptions): Promise { + const { span, updatedOptions } = createSpan("ContainerRegistryBlobClient-deleteBlob", options); + + try { + await this.client.containerRegistryBlob.deleteBlob( + this.repositoryName, + digest, + updatedOptions + ); + } catch (e) { + span.setStatus({ code: SpanStatusCode.ERROR, message: e.message }); + } finally { + span.end(); + } + } + + /** + * Upload a manifest for an OCI artifact. + * + * @param manifest - the manifest to upload. If a resettable stream (a factory function that returns a stream) is provided, it may be called multiple times. Each time the function is called, a fresh stream should be returned. + */ + public async uploadManifest( + manifest: (() => NodeJS.ReadableStream) | NodeJS.ReadableStream | OciManifest, + options?: UploadManifestOptions + ): Promise { + const { span, updatedOptions } = createSpan( + "ContainerRegistryBlobClient-uploadManifest", + options + ); + + try { + let manifestBody: Buffer | NodeJS.ReadableStream; + + if (isReadableStream(manifest)) { + manifestBody = await readStreamToEnd(manifest); + } else if (typeof manifest === "function") { + manifestBody = await readStreamToEnd(manifest()); + } else { + const serialized = serializer.serialize(Mappers.OCIManifest, manifest); + manifestBody = Buffer.from(JSON.stringify(serialized)); + } + + const tagOrDigest = options?.tag ?? (await calculateDigest(manifestBody)); + + const createManifestResult = await this.client.containerRegistry.createManifest( + this.repositoryName, + tagOrDigest, + manifestBody, + { contentType: KnownManifestMediaType.OciManifestMediaType, ...updatedOptions } + ); + + assertHasProperty(createManifestResult, "dockerContentDigest"); + + return { digest: createManifestResult.dockerContentDigest }; + } catch (e) { + span.setStatus({ code: SpanStatusCode.ERROR, message: e.message }); + throw e; + } finally { + span.end(); + } + } + + /** + * Downloads the manifest for an OCI artifact + * + * @param tagOrDigest - a tag or digest that identifies the artifact + * @returns - the downloaded manifest + */ + public async downloadManifest( + tagOrDigest: string, + options?: DownloadManifestOptions + ): Promise { + const { span, updatedOptions } = createSpan( + "ContainerRegistryBlobClient-downloadManifest", + options + ); + + try { + const { dockerContentDigest, readableStreamBody } = + await this.client.containerRegistry.getManifest(this.repositoryName, tagOrDigest, { + accept: KnownManifestMediaType.OciManifestMediaType, + ...updatedOptions, + }); + + const bodyData = readableStreamBody + ? await readStreamToEnd(readableStreamBody) + : Buffer.alloc(0); + + const expectedDigest = await calculateDigest(bodyData); + + if (dockerContentDigest !== expectedDigest) { + throw new DigestMismatchError( + "Digest of blob to upload does not match the digest from the server." + ); + } + + const manifest = serializer.deserialize( + Mappers.OCIManifest, + JSON.parse(bodyData.toString()), + "OCIManifest" + ); + + return { + digest: dockerContentDigest, + manifest, + manifestStream: Readable.from(bodyData), + }; + } catch (e) { + span.setStatus({ code: SpanStatusCode.ERROR, message: e.message }); + throw e; + } finally { + span.end(); + } + } + + /** + * Delete a manifest. Doing so effectively deletes an artifact from the registry. + * + * @param digest - the digest of the manifest to delete + * @param options - optional configuration used to send requests to the service + */ + public async deleteManifest(digest: string, options?: DeleteManifestOptions): Promise { + const { span, updatedOptions } = createSpan( + "ContainerRegistryBlobClient-deleteManifest", + options + ); + + try { + await this.client.containerRegistry.deleteManifest( + this.repositoryName, + digest, + updatedOptions + ); + } catch (e) { + span.setStatus({ code: SpanStatusCode.ERROR, message: e.message }); + throw e; + } finally { + span.end(); + } + } + + /** + * Upload an artifact blob. + * + * @param blobStreamFactory - a factory which produces a stream containing the blob data. This function may be called multiple times; each time the function is called a fresh stream should be returned. + + */ + public async uploadBlob( + blobStreamFactory: () => NodeJS.ReadableStream + ): Promise; + + /** + * Upload an artifact blob. + * + * @param blobStream - the stream containing the blob data. + */ + public async uploadBlob(blobStream: NodeJS.ReadableStream): Promise; + + public async uploadBlob( + blobStreamOrFactory: (() => NodeJS.ReadableStream) | NodeJS.ReadableStream + ): Promise { + const { span } = createSpan("ContainerRegistryBlobClient-uploadBlob", undefined); + + try { + const startUploadResult = await this.client.containerRegistryBlob.startUpload( + this.repositoryName + ); + + assertHasProperty(startUploadResult, "location"); + + let requestBody: NodeJS.ReadableStream | Buffer; + let digest: string; + + if (typeof blobStreamOrFactory === "function") { + requestBody = blobStreamOrFactory(); + digest = await calculateDigest(blobStreamOrFactory()); + } else { + requestBody = await readStreamToEnd(blobStreamOrFactory); + digest = await calculateDigest(requestBody); + } + + const uploadChunkResult = await this.client.containerRegistryBlob.uploadChunk( + startUploadResult.location.substring(1), + requestBody + ); + + assertHasProperty(uploadChunkResult, "location"); + + const { dockerContentDigest: digestFromResponse } = + await this.client.containerRegistryBlob.completeUpload( + digest, + uploadChunkResult.location.substring(1) + ); + + if (digest !== digestFromResponse) { + throw new DigestMismatchError( + "Digest of blob to upload does not match the digest from the server." + ); + } + + return { digest }; + } catch (e) { + span.setStatus({ code: SpanStatusCode.ERROR, message: e.message }); + throw e; + } finally { + span.end(); + } + } + + /** + * Download a blob that is part of an artifact. + * + * @param digest - the digest of the blob to download + * @param options - optional configuration used to send requests to the service + * @returns - the downloaded blob + */ + public async downloadBlob( + digest: string, + options?: DownloadBlobOptions + ): Promise { + const { span, updatedOptions } = createSpan( + "ContainerRegistryBlobClient-downloadBlob", + options + ); + + try { + const { readableStreamBody } = await this.client.containerRegistryBlob.getBlob( + this.repositoryName, + digest, + updatedOptions + ); + + return { + digest, + content: readableStreamBody ?? Readable.from([]), + }; + } catch (e) { + span.setStatus({ code: SpanStatusCode.ERROR, message: e.message }); + throw e; + } finally { + span.end(); + } + } +} diff --git a/sdk/containerregistry/container-registry/src/blob/index.ts b/sdk/containerregistry/container-registry/src/blob/index.ts new file mode 100644 index 000000000000..a281a12060b8 --- /dev/null +++ b/sdk/containerregistry/container-registry/src/blob/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export * from "./models"; +export * from "./containerRegistryBlobClient"; diff --git a/sdk/containerregistry/container-registry/src/blob/models.ts b/sdk/containerregistry/container-registry/src/blob/models.ts new file mode 100644 index 000000000000..b41ff21a5f11 --- /dev/null +++ b/sdk/containerregistry/container-registry/src/blob/models.ts @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { OperationOptions } from "@azure/core-client"; + +/** + * Options for configuring the upload manifest operation. + */ +export interface UploadManifestOptions extends OperationOptions { + /** + * Tag to give the uploaded manifest + */ + tag: string; +} + +/** + * The result from uploading a blob to the registry. + */ +export interface UploadBlobResult { + /** + * The digest of the uploaded blob. + */ + digest: string; +} + +/** + * The result from downloading a manifest from the registry. + */ +export interface DownloadManifestResult { + /** + * The digest of the downloaded manifest as calculated by the registry. + */ + digest: string; + + /** + * The OCI manifest that was downloaded. + */ + manifest: OciManifest; + + /** + * The manifest stream that was downloaded. + */ + manifestStream: NodeJS.ReadableStream; +} + +/** + * The result from downloading a blob from the registry. + */ +export interface DownloadBlobResult { + /** + * The blob's digest, calculated by the resgistry. + */ + digest: string; + + /** + * The blob content. + */ + content: NodeJS.ReadableStream; +} + +/** + * The result from uploading a manifest to the registry. + */ +export interface UploadManifestResult { + /** + * The digest of the uploaded manifest, calculated by the registry. + */ + digest: string; +} + +/** Docker V2 image layer descriptor including config and layers. */ +export interface OciBlobDescriptor { + /** Layer media type */ + mediaType: string; + /** Layer size */ + size: number; + /** Layer digest */ + digest: string; + /** Specifies a list of URIs from which this object may be downloaded. */ + urls?: string[]; + /** Additional information provided through arbitrary metadata. */ + annotations?: OciAnnotations; +} + +/** Returns the requested OCI Manifest file. */ +export interface OciManifest { + /** Schema version */ + schemaVersion: number; + /** V2 image config descriptor */ + config?: OciBlobDescriptor; + /** List of V2 image layer information */ + layers?: OciBlobDescriptor[]; + /** Additional information provided through arbitrary metadata. */ + annotations?: OciAnnotations; +} + +/** Additional information provided through arbitrary metadata */ +export interface OciAnnotations { + /** Date and time on which the image was built (string, date-time as defined by https://tools.ietf.org/html/rfc3339#section-5.6) */ + createdOn?: Date; + /** Contact details of the people or organization responsible for the image. */ + authors?: string; + /** URL to find more information on the image. */ + url?: string; + /** URL to get documentation on the image. */ + documentation?: string; + /** URL to get source code for building the image. */ + source?: string; + /** Version of the packaged software. The version MAY match a label or tag in the source code repository, may also be Semantic versioning-compatible */ + version?: string; + /** Source control revision identifier for the packaged software. */ + revision?: string; + /** Name of the distributing entity, organization or individual. */ + vendor?: string; + /** License(s) under which contained software is distributed as an SPDX License Expression. */ + licenses?: string; + /** Name of the reference for a target. */ + name?: string; + /** Human-readable title of the image */ + title?: string; + /** Human-readable description of the software packaged in the image */ + description?: string; + /** Additional properties */ + [additionalProperties: string]: unknown; +} + +/** + * Options for confguring the delete blob operation. + */ +export interface DeleteBlobOptions extends OperationOptions {} + +/** + * Options for confguring the delete manifest operation. + */ +export interface DeleteManifestOptions extends OperationOptions {} + +/** + * Options for confguring the download blob operation. + */ +export interface DownloadBlobOptions extends OperationOptions {} + +/** + * Options for confguring the download manifest operation. + */ +export interface DownloadManifestOptions extends OperationOptions {} diff --git a/sdk/containerregistry/container-registry/src/generated/generatedClient.ts b/sdk/containerregistry/container-registry/src/generated/generatedClient.ts index af703009cedc..d8447f74c647 100644 --- a/sdk/containerregistry/container-registry/src/generated/generatedClient.ts +++ b/sdk/containerregistry/container-registry/src/generated/generatedClient.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import * as coreClient from "@azure/core-client"; import { ContainerRegistryImpl, ContainerRegistryBlobImpl, @@ -16,11 +17,13 @@ import { ContainerRegistryBlob, Authentication } from "./operationsInterfaces"; -import { GeneratedClientContext } from "./generatedClientContext"; -import { GeneratedClientOptionalParams, ApiVersion20210701 } from "./models"; +import { ApiVersion20210701, GeneratedClientOptionalParams } from "./models"; /** @internal */ -export class GeneratedClient extends GeneratedClientContext { +export class GeneratedClient extends coreClient.ServiceClient { + url: string; + apiVersion: ApiVersion20210701; + /** * Initializes a new instance of the GeneratedClient class. * @param url Registry login URL @@ -32,7 +35,39 @@ export class GeneratedClient extends GeneratedClientContext { apiVersion: ApiVersion20210701, options?: GeneratedClientOptionalParams ) { - super(url, apiVersion, options); + if (url === undefined) { + throw new Error("'url' cannot be null"); + } + if (apiVersion === undefined) { + throw new Error("'apiVersion' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: GeneratedClientOptionalParams = { + requestContentType: "application/json; charset=utf-8" + }; + + const packageDetails = `azsdk-js-container-registry/1.1.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint ?? options.baseUri ?? "{url}" + }; + super(optionsWithDefaults); + // Parameter assignments + this.url = url; + this.apiVersion = apiVersion; this.containerRegistry = new ContainerRegistryImpl(this); this.containerRegistryBlob = new ContainerRegistryBlobImpl(this); this.authentication = new AuthenticationImpl(this); diff --git a/sdk/containerregistry/container-registry/src/generated/generatedClientContext.ts b/sdk/containerregistry/container-registry/src/generated/generatedClientContext.ts index e4a9700b571b..662b828f4656 100644 --- a/sdk/containerregistry/container-registry/src/generated/generatedClientContext.ts +++ b/sdk/containerregistry/container-registry/src/generated/generatedClientContext.ts @@ -40,7 +40,7 @@ export class GeneratedClientContext extends coreClient.ServiceClient { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-container-registry/1.0.1`; + const packageDetails = `azsdk-js-container-registry/1.1.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/containerregistry/container-registry/src/generated/index.ts b/sdk/containerregistry/container-registry/src/generated/index.ts index 707d58f011e8..db5d703d07b8 100644 --- a/sdk/containerregistry/container-registry/src/generated/index.ts +++ b/sdk/containerregistry/container-registry/src/generated/index.ts @@ -8,5 +8,4 @@ export * from "./models"; export { GeneratedClient } from "./generatedClient"; -export { GeneratedClientContext } from "./generatedClientContext"; export * from "./operationsInterfaces"; diff --git a/sdk/containerregistry/container-registry/src/generated/models/index.ts b/sdk/containerregistry/container-registry/src/generated/models/index.ts index b7d86f124f82..e35123d30ebe 100644 --- a/sdk/containerregistry/container-registry/src/generated/models/index.ts +++ b/sdk/containerregistry/container-registry/src/generated/models/index.ts @@ -25,127 +25,6 @@ export interface AcrErrorInfo { detail?: Record; } -/** Returns the requested manifest file */ -export interface Manifest { - /** Schema version */ - schemaVersion?: number; -} - -export interface ManifestListAttributes { - /** The MIME type of the referenced object. This will generally be application/vnd.docker.image.manifest.v2+json, but it could also be application/vnd.docker.image.manifest.v1+json */ - mediaType?: string; - /** The size in bytes of the object */ - size?: number; - /** The digest of the content, as defined by the Registry V2 HTTP API Specification */ - digest?: string; - /** The platform object describes the platform which the image in the manifest runs on. A full list of valid operating system and architecture values are listed in the Go language documentation for $GOOS and $GOARCH */ - platform?: Platform; -} - -/** The platform object describes the platform which the image in the manifest runs on. A full list of valid operating system and architecture values are listed in the Go language documentation for $GOOS and $GOARCH */ -export interface Platform { - /** Specifies the CPU architecture, for example amd64 or ppc64le. */ - architecture?: string; - /** The os field specifies the operating system, for example linux or windows. */ - os?: string; - /** The optional os.version field specifies the operating system version, for example 10.0.10586. */ - osVersion?: string; - /** The optional os.features field specifies an array of strings, each listing a required OS feature (for example on Windows win32k */ - osFeatures?: string[]; - /** The optional variant field specifies a variant of the CPU, for example armv6l to specify a particular CPU variant of the ARM CPU. */ - variant?: string; - /** The optional features field specifies an array of strings, each listing a required CPU feature (for example sse4 or aes */ - features?: string[]; -} - -/** Docker V2 image layer descriptor including config and layers */ -export interface Descriptor { - /** Layer media type */ - mediaType?: string; - /** Layer size */ - size?: number; - /** Layer digest */ - digest?: string; - /** Specifies a list of URIs from which this object may be downloaded. */ - urls?: string[]; - /** Additional information provided through arbitrary metadata. */ - annotations?: Annotations; -} - -/** Additional information provided through arbitrary metadata. */ -export interface Annotations { - /** Describes unknown properties. The value of an unknown property can be of "any" type. */ - [property: string]: any; - /** Date and time on which the image was built (string, date-time as defined by https://tools.ietf.org/html/rfc3339#section-5.6) */ - created?: Date; - /** Contact details of the people or organization responsible for the image. */ - authors?: string; - /** URL to find more information on the image. */ - url?: string; - /** URL to get documentation on the image. */ - documentation?: string; - /** URL to get source code for building the image. */ - source?: string; - /** Version of the packaged software. The version MAY match a label or tag in the source code repository, may also be Semantic versioning-compatible */ - version?: string; - /** Source control revision identifier for the packaged software. */ - revision?: string; - /** Name of the distributing entity, organization or individual. */ - vendor?: string; - /** License(s) under which contained software is distributed as an SPDX License Expression. */ - licenses?: string; - /** Name of the reference for a target. */ - name?: string; - /** Human-readable title of the image */ - title?: string; - /** Human-readable description of the software packaged in the image */ - description?: string; -} - -/** Image layer information */ -export interface FsLayer { - /** SHA of an image layer */ - blobSum?: string; -} - -/** A list of unstructured historical data for v1 compatibility */ -export interface History { - /** The raw v1 compatibility information */ - v1Compatibility?: string; -} - -/** Signature of a signed manifest */ -export interface ImageSignature { - /** A JSON web signature */ - header?: Jwk; - /** A signature for the image manifest, signed by a libtrust private key */ - signature?: string; - /** The signed protected header */ - protected?: string; -} - -/** A JSON web signature */ -export interface Jwk { - /** JSON web key parameter */ - jwk?: JWKHeader; - /** The algorithm used to sign or encrypt the JWT */ - alg?: string; -} - -/** JSON web key parameter */ -export interface JWKHeader { - /** crv value */ - crv?: string; - /** kid value */ - kid?: string; - /** kty value */ - kty?: string; - /** x value */ - x?: string; - /** y value */ - y?: string; -} - /** List of repositories */ export interface Repositories { /** Repository names */ @@ -478,6 +357,44 @@ export interface RepositoryTags { tags?: string[]; } +/** Signature of a signed manifest */ +export interface ImageSignature { + /** A JSON web signature */ + header?: Jwk; + /** A signature for the image manifest, signed by a libtrust private key */ + signature?: string; + /** The signed protected header */ + protected?: string; +} + +/** A JSON web signature */ +export interface Jwk { + /** JSON web key parameter */ + jwk?: JWKHeader; + /** The algorithm used to sign or encrypt the JWT */ + alg?: string; +} + +/** JSON web key parameter */ +export interface JWKHeader { + /** crv value */ + crv?: string; + /** kid value */ + kid?: string; + /** kty value */ + kty?: string; + /** x value */ + x?: string; + /** y value */ + y?: string; +} + +/** A list of unstructured historical data for v1 compatibility */ +export interface History { + /** The raw v1 compatibility information */ + v1Compatibility?: string; +} + /** Deleted repository */ export interface DeleteRepositoryResult { /** @@ -492,6 +409,56 @@ export interface DeleteRepositoryResult { readonly deletedTags?: string[]; } +/** Image layer information */ +export interface FsLayer { + /** SHA of an image layer */ + blobSum?: string; +} + +/** Docker V2 image layer descriptor including config and layers */ +export interface Descriptor { + /** Layer media type */ + mediaType?: string; + /** Layer size */ + size?: number; + /** Layer digest */ + digest?: string; + /** Specifies a list of URIs from which this object may be downloaded. */ + urls?: string[]; + /** Additional information provided through arbitrary metadata. */ + annotations?: Annotations; +} + +/** Additional information provided through arbitrary metadata. */ +export interface Annotations { + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** Date and time on which the image was built (string, date-time as defined by https://tools.ietf.org/html/rfc3339#section-5.6) */ + createdOn?: Date; + /** Contact details of the people or organization responsible for the image. */ + authors?: string; + /** URL to find more information on the image. */ + url?: string; + /** URL to get documentation on the image. */ + documentation?: string; + /** URL to get source code for building the image. */ + source?: string; + /** Version of the packaged software. The version MAY match a label or tag in the source code repository, may also be Semantic versioning-compatible */ + version?: string; + /** Source control revision identifier for the packaged software. */ + revision?: string; + /** Name of the distributing entity, organization or individual. */ + vendor?: string; + /** License(s) under which contained software is distributed as an SPDX License Expression. */ + licenses?: string; + /** Name of the reference for a target. */ + name?: string; + /** Human-readable title of the image */ + title?: string; + /** Human-readable description of the software packaged in the image */ + description?: string; +} + /** Tag */ export interface TagAttributesTag { /** SignatureRecord value */ @@ -504,6 +471,51 @@ export interface ManifestAttributesManifest { references?: ArtifactManifestPlatform[]; } +/** Returns the requested manifest file */ +export interface Manifest { + /** Schema version */ + schemaVersion?: number; +} + +export interface ManifestListAttributes { + /** The MIME type of the referenced object. This will generally be application/vnd.docker.image.manifest.v2+json, but it could also be application/vnd.docker.image.manifest.v1+json */ + mediaType?: string; + /** The size in bytes of the object */ + size?: number; + /** The digest of the content, as defined by the Registry V2 HTTP API Specification */ + digest?: string; + /** The platform object describes the platform which the image in the manifest runs on. A full list of valid operating system and architecture values are listed in the Go language documentation for $GOOS and $GOARCH */ + platform?: Platform; +} + +/** The platform object describes the platform which the image in the manifest runs on. A full list of valid operating system and architecture values are listed in the Go language documentation for $GOOS and $GOARCH */ +export interface Platform { + /** Specifies the CPU architecture, for example amd64 or ppc64le. */ + architecture?: string; + /** The os field specifies the operating system, for example linux or windows. */ + os?: string; + /** The optional os.version field specifies the operating system version, for example 10.0.10586. */ + osVersion?: string; + /** The optional os.features field specifies an array of strings, each listing a required OS feature (for example on Windows win32k */ + osFeatures?: string[]; + /** The optional variant field specifies a variant of the CPU, for example armv6l to specify a particular CPU variant of the ARM CPU. */ + variant?: string; + /** The optional features field specifies an array of strings, each listing a required CPU feature (for example sse4 or aes */ + features?: string[]; +} + +/** Returns the requested OCI Manifest file */ +export interface OCIManifest { + /** V2 image config descriptor */ + config?: Descriptor; + /** List of V2 image layer information */ + layers?: Descriptor[]; + /** Additional information provided through arbitrary metadata. */ + annotations?: Annotations; + /** Schema version */ + schemaVersion?: number; +} + export interface Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema { /** Can take a value of access_token_refresh_token, or access_token, or refresh_token */ grantType: PostContentSchemaGrantType; @@ -572,16 +584,6 @@ export type V2Manifest = Manifest & { layers?: Descriptor[]; }; -/** Returns the requested OCI Manifest file */ -export type OCIManifest = Manifest & { - /** V2 image config descriptor */ - config?: Descriptor; - /** List of V2 image layer information */ - layers?: Descriptor[]; - /** Additional information provided through arbitrary metadata. */ - annotations?: Annotations; -}; - /** Returns the requested OCI index file */ export type OCIIndex = Manifest & { /** List of OCI image layer information */ @@ -606,6 +608,12 @@ export type V1Manifest = Manifest & { signatures?: ImageSignature[]; }; +/** Defines headers for ContainerRegistry_getManifest operation. */ +export interface ContainerRegistryGetManifestHeaders { + /** Identifies the docker upload uuid for the current request. */ + dockerContentDigest?: string; +} + /** Defines headers for ContainerRegistry_createManifest operation. */ export interface ContainerRegistryCreateManifestHeaders { /** Identifies the docker upload uuid for the current request. */ @@ -880,17 +888,32 @@ export interface ContainerRegistryGetManifestOptionalParams } /** Contains response data for the getManifest operation. */ -export type ContainerRegistryGetManifestResponse = ManifestWrapper; +export type ContainerRegistryGetManifestResponse = ContainerRegistryGetManifestHeaders & { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always `undefined` in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always `undefined` in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; +}; /** Optional parameters. */ export interface ContainerRegistryCreateManifestOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** The manifest's Content-Type. */ + contentType?: string; +} /** Contains response data for the createManifest operation. */ -export type ContainerRegistryCreateManifestResponse = ContainerRegistryCreateManifestHeaders & { - /** The parsed response body. */ - body: any; -}; +export type ContainerRegistryCreateManifestResponse = ContainerRegistryCreateManifestHeaders; /** Optional parameters. */ export interface ContainerRegistryDeleteManifestOptionalParams diff --git a/sdk/containerregistry/container-registry/src/generated/models/mappers.ts b/sdk/containerregistry/container-registry/src/generated/models/mappers.ts index 45bfcc9ba4ca..7a8b694abb31 100644 --- a/sdk/containerregistry/container-registry/src/generated/models/mappers.ts +++ b/sdk/containerregistry/container-registry/src/generated/models/mappers.ts @@ -57,368 +57,392 @@ export const AcrErrorInfo: coreClient.CompositeMapper = { } }; -export const Manifest: coreClient.CompositeMapper = { +export const Repositories: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Manifest", + className: "Repositories", modelProperties: { - schemaVersion: { - serializedName: "schemaVersion", + repositories: { + serializedName: "repositories", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + link: { + serializedName: "link", + type: { + name: "String" } } } } }; -export const ManifestListAttributes: coreClient.CompositeMapper = { +export const ContainerRepositoryProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManifestListAttributes", + className: "ContainerRepositoryProperties", modelProperties: { - mediaType: { - serializedName: "mediaType", + registryLoginServer: { + serializedName: "registry", + required: true, + readOnly: true, type: { name: "String" } }, - size: { - serializedName: "size", + name: { + serializedName: "imageName", + required: true, + readOnly: true, type: { - name: "Number" + name: "String" } }, - digest: { - serializedName: "digest", + createdOn: { + serializedName: "createdTime", + required: true, + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - platform: { - serializedName: "platform", + lastUpdatedOn: { + serializedName: "lastUpdateTime", + required: true, + readOnly: true, type: { - name: "Composite", - className: "Platform" + name: "DateTime" } - } - } - } -}; - -export const Platform: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Platform", - modelProperties: { - architecture: { - serializedName: "architecture", + }, + manifestCount: { + serializedName: "manifestCount", + required: true, + readOnly: true, type: { - name: "String" + name: "Number" } }, - os: { - serializedName: "os", + tagCount: { + serializedName: "tagCount", + required: true, + readOnly: true, type: { - name: "String" + name: "Number" } }, - osVersion: { - serializedName: "os\\.version", + canDelete: { + serializedName: "changeableAttributes.deleteEnabled", type: { - name: "String" + name: "Boolean" } }, - osFeatures: { - serializedName: "os\\.features", + canWrite: { + serializedName: "changeableAttributes.writeEnabled", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } }, - variant: { - serializedName: "variant", + canList: { + serializedName: "changeableAttributes.listEnabled", type: { - name: "String" + name: "Boolean" } }, - features: { - serializedName: "features", + canRead: { + serializedName: "changeableAttributes.readEnabled", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } } } } }; -export const Descriptor: coreClient.CompositeMapper = { +export const RepositoryWriteableProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Descriptor", + className: "RepositoryWriteableProperties", modelProperties: { - mediaType: { - serializedName: "mediaType", - type: { - name: "String" - } - }, - size: { - serializedName: "size", + canDelete: { + serializedName: "deleteEnabled", type: { - name: "Number" + name: "Boolean" } }, - digest: { - serializedName: "digest", + canWrite: { + serializedName: "writeEnabled", type: { - name: "String" + name: "Boolean" } }, - urls: { - serializedName: "urls", + canList: { + serializedName: "listEnabled", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } }, - annotations: { - serializedName: "annotations", + canRead: { + serializedName: "readEnabled", type: { - name: "Composite", - className: "Annotations" + name: "Boolean" } } } } }; -export const Annotations: coreClient.CompositeMapper = { +export const TagList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Annotations", - additionalProperties: { type: { name: "Object" } }, + className: "TagList", modelProperties: { - created: { - serializedName: "org\\.opencontainers.image.created", + registryLoginServer: { + serializedName: "registry", + required: true, type: { - name: "DateTime" + name: "String" } }, - authors: { - serializedName: "org\\.opencontainers.image.authors", + repository: { + serializedName: "imageName", + required: true, type: { name: "String" } }, - url: { - serializedName: "org\\.opencontainers.image.url", + tagAttributeBases: { + serializedName: "tags", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagAttributesBase" + } + } } }, - documentation: { - serializedName: "org\\.opencontainers.image.documentation", + link: { + serializedName: "link", type: { name: "String" } - }, - source: { - serializedName: "org\\.opencontainers.image.source", + } + } + } +}; + +export const TagAttributesBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagAttributesBase", + modelProperties: { + name: { + serializedName: "name", + required: true, + readOnly: true, type: { name: "String" } }, - version: { - serializedName: "org\\.opencontainers.image.version", + digest: { + serializedName: "digest", + required: true, + readOnly: true, type: { name: "String" } }, - revision: { - serializedName: "org\\.opencontainers.image.revision", + createdOn: { + serializedName: "createdTime", + required: true, + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - vendor: { - serializedName: "org\\.opencontainers.image.vendor", + lastUpdatedOn: { + serializedName: "lastUpdateTime", + required: true, + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - licenses: { - serializedName: "org\\.opencontainers.image.licenses", + canDelete: { + serializedName: "changeableAttributes.deleteEnabled", type: { - name: "String" + name: "Boolean" } }, - name: { - serializedName: "org\\.opencontainers.image.ref.name", + canWrite: { + serializedName: "changeableAttributes.writeEnabled", type: { - name: "String" + name: "Boolean" } }, - title: { - serializedName: "org\\.opencontainers.image.title", + canList: { + serializedName: "changeableAttributes.listEnabled", type: { - name: "String" + name: "Boolean" } }, - description: { - serializedName: "org\\.opencontainers.image.description", + canRead: { + serializedName: "changeableAttributes.readEnabled", type: { - name: "String" + name: "Boolean" } } } } }; -export const FsLayer: coreClient.CompositeMapper = { +export const TagWriteableProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FsLayer", + className: "TagWriteableProperties", modelProperties: { - blobSum: { - serializedName: "blobSum", + canDelete: { + serializedName: "deleteEnabled", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const History: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "History", - modelProperties: { - v1Compatibility: { - serializedName: "v1Compatibility", + }, + canWrite: { + serializedName: "writeEnabled", type: { - name: "String" + name: "Boolean" + } + }, + canList: { + serializedName: "listEnabled", + type: { + name: "Boolean" + } + }, + canRead: { + serializedName: "readEnabled", + type: { + name: "Boolean" } } } } }; -export const ImageSignature: coreClient.CompositeMapper = { +export const ArtifactTagProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImageSignature", + className: "ArtifactTagProperties", modelProperties: { - header: { - serializedName: "header", + registryLoginServer: { + serializedName: "registry", + required: true, + readOnly: true, type: { - name: "Composite", - className: "Jwk" + name: "String" } }, - signature: { - serializedName: "signature", + repositoryName: { + serializedName: "imageName", + required: true, + readOnly: true, type: { name: "String" } }, - protected: { - serializedName: "protected", + name: { + serializedName: "tag.name", + required: true, + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const Jwk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Jwk", - modelProperties: { - jwk: { - serializedName: "jwk", + }, + digest: { + serializedName: "tag.digest", + required: true, + readOnly: true, type: { - name: "Composite", - className: "JWKHeader" + name: "String" } }, - alg: { - serializedName: "alg", + createdOn: { + serializedName: "tag.createdTime", + required: true, + readOnly: true, type: { - name: "String" + name: "DateTime" } - } - } - } -}; - -export const JWKHeader: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JWKHeader", - modelProperties: { - crv: { - serializedName: "crv", + }, + lastUpdatedOn: { + serializedName: "tag.lastUpdateTime", + required: true, + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - kid: { - serializedName: "kid", + canDelete: { + serializedName: "tag.changeableAttributes.deleteEnabled", type: { - name: "String" + name: "Boolean" } }, - kty: { - serializedName: "kty", + canWrite: { + serializedName: "tag.changeableAttributes.writeEnabled", type: { - name: "String" + name: "Boolean" } }, - x: { - serializedName: "x", + canList: { + serializedName: "tag.changeableAttributes.listEnabled", type: { - name: "String" + name: "Boolean" } }, - y: { - serializedName: "y", + canRead: { + serializedName: "tag.changeableAttributes.readEnabled", type: { - name: "String" + name: "Boolean" } } } } }; -export const Repositories: coreClient.CompositeMapper = { +export const AcrManifests: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Repositories", + className: "AcrManifests", modelProperties: { - repositories: { - serializedName: "repositories", + registryLoginServer: { + serializedName: "registry", + type: { + name: "String" + } + }, + repository: { + serializedName: "imageName", + type: { + name: "String" + } + }, + manifests: { + serializedName: "manifests", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ManifestAttributesBase" } } } @@ -433,25 +457,24 @@ export const Repositories: coreClient.CompositeMapper = { } }; -export const ContainerRepositoryProperties: coreClient.CompositeMapper = { +export const ManifestAttributesBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerRepositoryProperties", + className: "ManifestAttributesBase", modelProperties: { - registryLoginServer: { - serializedName: "registry", + digest: { + serializedName: "digest", required: true, readOnly: true, type: { name: "String" } }, - name: { - serializedName: "imageName", - required: true, + size: { + serializedName: "imageSize", readOnly: true, type: { - name: "String" + name: "Number" } }, createdOn: { @@ -470,20 +493,45 @@ export const ContainerRepositoryProperties: coreClient.CompositeMapper = { name: "DateTime" } }, - manifestCount: { - serializedName: "manifestCount", - required: true, + architecture: { + serializedName: "architecture", readOnly: true, + nullable: true, type: { - name: "Number" + name: "String" } }, - tagCount: { - serializedName: "tagCount", - required: true, + operatingSystem: { + serializedName: "os", readOnly: true, + nullable: true, type: { - name: "Number" + name: "String" + } + }, + relatedArtifacts: { + serializedName: "references", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ArtifactManifestPlatform" + } + } + } + }, + tags: { + serializedName: "tags", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, canDelete: { @@ -514,10 +562,41 @@ export const ContainerRepositoryProperties: coreClient.CompositeMapper = { } }; -export const RepositoryWriteableProperties: coreClient.CompositeMapper = { +export const ArtifactManifestPlatform: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RepositoryWriteableProperties", + className: "ArtifactManifestPlatform", + modelProperties: { + digest: { + serializedName: "digest", + required: true, + readOnly: true, + type: { + name: "String" + } + }, + architecture: { + serializedName: "architecture", + readOnly: true, + type: { + name: "String" + } + }, + operatingSystem: { + serializedName: "os", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManifestWriteableProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManifestWriteableProperties", modelProperties: { canDelete: { serializedName: "deleteEnabled", @@ -547,71 +626,42 @@ export const RepositoryWriteableProperties: coreClient.CompositeMapper = { } }; -export const TagList: coreClient.CompositeMapper = { +export const ArtifactManifestProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TagList", + className: "ArtifactManifestProperties", modelProperties: { registryLoginServer: { serializedName: "registry", - required: true, + readOnly: true, type: { name: "String" } }, - repository: { + repositoryName: { serializedName: "imageName", - required: true, + readOnly: true, type: { name: "String" } }, - tagAttributeBases: { - serializedName: "tags", + digest: { + serializedName: "manifest.digest", required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagAttributesBase" - } - } - } - }, - link: { - serializedName: "link", - type: { - name: "String" - } - } - } - } -}; - -export const TagAttributesBase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TagAttributesBase", - modelProperties: { - name: { - serializedName: "name", - required: true, - readOnly: true, + readOnly: true, type: { name: "String" } }, - digest: { - serializedName: "digest", - required: true, + size: { + serializedName: "manifest.imageSize", readOnly: true, type: { - name: "String" + name: "Number" } }, createdOn: { - serializedName: "createdTime", + serializedName: "manifest.createdTime", required: true, readOnly: true, type: { @@ -619,66 +669,74 @@ export const TagAttributesBase: coreClient.CompositeMapper = { } }, lastUpdatedOn: { - serializedName: "lastUpdateTime", + serializedName: "manifest.lastUpdateTime", required: true, readOnly: true, type: { name: "DateTime" } }, - canDelete: { - serializedName: "changeableAttributes.deleteEnabled", + architecture: { + serializedName: "manifest.architecture", + readOnly: true, + nullable: true, type: { - name: "Boolean" + name: "String" } }, - canWrite: { - serializedName: "changeableAttributes.writeEnabled", + operatingSystem: { + serializedName: "manifest.os", + readOnly: true, + nullable: true, type: { - name: "Boolean" + name: "String" } }, - canList: { - serializedName: "changeableAttributes.listEnabled", + relatedArtifacts: { + serializedName: "manifest.references", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ArtifactManifestPlatform" + } + } } }, - canRead: { - serializedName: "changeableAttributes.readEnabled", + tags: { + serializedName: "manifest.tags", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const TagWriteableProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TagWriteableProperties", - modelProperties: { + }, canDelete: { - serializedName: "deleteEnabled", + serializedName: "manifest.changeableAttributes.deleteEnabled", type: { name: "Boolean" } }, canWrite: { - serializedName: "writeEnabled", + serializedName: "manifest.changeableAttributes.writeEnabled", type: { name: "Boolean" } }, canList: { - serializedName: "listEnabled", + serializedName: "manifest.changeableAttributes.listEnabled", type: { name: "Boolean" } }, canRead: { - serializedName: "readEnabled", + serializedName: "manifest.changeableAttributes.readEnabled", type: { name: "Boolean" } @@ -687,118 +745,104 @@ export const TagWriteableProperties: coreClient.CompositeMapper = { } }; -export const ArtifactTagProperties: coreClient.CompositeMapper = { +export const AcrRefreshToken: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArtifactTagProperties", + className: "AcrRefreshToken", modelProperties: { - registryLoginServer: { - serializedName: "registry", - required: true, - readOnly: true, + refreshToken: { + serializedName: "refresh_token", type: { name: "String" } - }, - repositoryName: { - serializedName: "imageName", - required: true, - readOnly: true, + } + } + } +}; + +export const AcrAccessToken: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AcrAccessToken", + modelProperties: { + accessToken: { + serializedName: "access_token", type: { name: "String" } - }, + } + } + } +}; + +export const RepositoryTags: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RepositoryTags", + modelProperties: { name: { - serializedName: "tag.name", - required: true, - readOnly: true, - type: { - name: "String" - } - }, - digest: { - serializedName: "tag.digest", - required: true, - readOnly: true, + serializedName: "name", type: { name: "String" } }, - createdOn: { - serializedName: "tag.createdTime", - required: true, - readOnly: true, - type: { - name: "DateTime" - } - }, - lastUpdatedOn: { - serializedName: "tag.lastUpdateTime", - required: true, - readOnly: true, - type: { - name: "DateTime" - } - }, - canDelete: { - serializedName: "tag.changeableAttributes.deleteEnabled", + tags: { + serializedName: "tags", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - canWrite: { - serializedName: "tag.changeableAttributes.writeEnabled", + } + } + } +}; + +export const ImageSignature: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageSignature", + modelProperties: { + header: { + serializedName: "header", type: { - name: "Boolean" + name: "Composite", + className: "Jwk" } }, - canList: { - serializedName: "tag.changeableAttributes.listEnabled", + signature: { + serializedName: "signature", type: { - name: "Boolean" + name: "String" } }, - canRead: { - serializedName: "tag.changeableAttributes.readEnabled", + protected: { + serializedName: "protected", type: { - name: "Boolean" + name: "String" } } } } }; -export const AcrManifests: coreClient.CompositeMapper = { +export const Jwk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcrManifests", + className: "Jwk", modelProperties: { - registryLoginServer: { - serializedName: "registry", - type: { - name: "String" - } - }, - repository: { - serializedName: "imageName", - type: { - name: "String" - } - }, - manifests: { - serializedName: "manifests", + jwk: { + serializedName: "jwk", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManifestAttributesBase" - } - } + name: "Composite", + className: "JWKHeader" } }, - link: { - serializedName: "link", + alg: { + serializedName: "alg", type: { name: "String" } @@ -807,73 +851,79 @@ export const AcrManifests: coreClient.CompositeMapper = { } }; -export const ManifestAttributesBase: coreClient.CompositeMapper = { +export const JWKHeader: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManifestAttributesBase", + className: "JWKHeader", modelProperties: { - digest: { - serializedName: "digest", - required: true, - readOnly: true, + crv: { + serializedName: "crv", type: { name: "String" } }, - size: { - serializedName: "imageSize", - readOnly: true, + kid: { + serializedName: "kid", type: { - name: "Number" + name: "String" } }, - createdOn: { - serializedName: "createdTime", - required: true, - readOnly: true, + kty: { + serializedName: "kty", type: { - name: "DateTime" + name: "String" } }, - lastUpdatedOn: { - serializedName: "lastUpdateTime", - required: true, - readOnly: true, + x: { + serializedName: "x", type: { - name: "DateTime" + name: "String" } }, - architecture: { - serializedName: "architecture", - readOnly: true, - nullable: true, + y: { + serializedName: "y", type: { name: "String" } - }, - operatingSystem: { - serializedName: "os", - readOnly: true, - nullable: true, + } + } + } +}; + +export const History: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "History", + modelProperties: { + v1Compatibility: { + serializedName: "v1Compatibility", type: { name: "String" } - }, - relatedArtifacts: { - serializedName: "references", + } + } + } +}; + +export const DeleteRepositoryResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeleteRepositoryResult", + modelProperties: { + deletedManifests: { + serializedName: "manifestsDeleted", readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ArtifactManifestPlatform" + name: "String" } } } }, - tags: { - serializedName: "tags", + deletedTags: { + serializedName: "tagsDeleted", readOnly: true, type: { name: "Sequence", @@ -883,58 +933,18 @@ export const ManifestAttributesBase: coreClient.CompositeMapper = { } } } - }, - canDelete: { - serializedName: "changeableAttributes.deleteEnabled", - type: { - name: "Boolean" - } - }, - canWrite: { - serializedName: "changeableAttributes.writeEnabled", - type: { - name: "Boolean" - } - }, - canList: { - serializedName: "changeableAttributes.listEnabled", - type: { - name: "Boolean" - } - }, - canRead: { - serializedName: "changeableAttributes.readEnabled", - type: { - name: "Boolean" - } } } } }; -export const ArtifactManifestPlatform: coreClient.CompositeMapper = { +export const FsLayer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArtifactManifestPlatform", + className: "FsLayer", modelProperties: { - digest: { - serializedName: "digest", - required: true, - readOnly: true, - type: { - name: "String" - } - }, - architecture: { - serializedName: "architecture", - readOnly: true, - type: { - name: "String" - } - }, - operatingSystem: { - serializedName: "os", - readOnly: true, + blobSum: { + serializedName: "blobSum", type: { name: "String" } @@ -943,165 +953,140 @@ export const ArtifactManifestPlatform: coreClient.CompositeMapper = { } }; -export const ManifestWriteableProperties: coreClient.CompositeMapper = { +export const Descriptor: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManifestWriteableProperties", + className: "Descriptor", modelProperties: { - canDelete: { - serializedName: "deleteEnabled", + mediaType: { + serializedName: "mediaType", type: { - name: "Boolean" + name: "String" } }, - canWrite: { - serializedName: "writeEnabled", + size: { + serializedName: "size", type: { - name: "Boolean" + name: "Number" } }, - canList: { - serializedName: "listEnabled", + digest: { + serializedName: "digest", type: { - name: "Boolean" + name: "String" } }, - canRead: { - serializedName: "readEnabled", + urls: { + serializedName: "urls", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + annotations: { + serializedName: "annotations", + type: { + name: "Composite", + className: "Annotations" } } } } }; -export const ArtifactManifestProperties: coreClient.CompositeMapper = { +export const Annotations: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArtifactManifestProperties", + className: "Annotations", + additionalProperties: { type: { name: "Object" } }, modelProperties: { - registryLoginServer: { - serializedName: "registry", - readOnly: true, + createdOn: { + serializedName: "org\\.opencontainers\\.image\\.created", type: { - name: "String" + name: "DateTime" } }, - repositoryName: { - serializedName: "imageName", - readOnly: true, + authors: { + serializedName: "org\\.opencontainers\\.image\\.authors", type: { name: "String" } }, - digest: { - serializedName: "manifest.digest", - required: true, - readOnly: true, + url: { + serializedName: "org\\.opencontainers\\.image\\.url", type: { name: "String" } }, - size: { - serializedName: "manifest.imageSize", - readOnly: true, - type: { - name: "Number" - } - }, - createdOn: { - serializedName: "manifest.createdTime", - required: true, - readOnly: true, - type: { - name: "DateTime" - } - }, - lastUpdatedOn: { - serializedName: "manifest.lastUpdateTime", - required: true, - readOnly: true, + documentation: { + serializedName: "org\\.opencontainers\\.image\\.documentation", type: { - name: "DateTime" + name: "String" } }, - architecture: { - serializedName: "manifest.architecture", - readOnly: true, - nullable: true, + source: { + serializedName: "org\\.opencontainers\\.image\\.source", type: { name: "String" } }, - operatingSystem: { - serializedName: "manifest.os", - readOnly: true, - nullable: true, + version: { + serializedName: "org\\.opencontainers\\.image\\.version", type: { name: "String" } }, - relatedArtifacts: { - serializedName: "manifest.references", - readOnly: true, + revision: { + serializedName: "org\\.opencontainers\\.image\\.revision", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArtifactManifestPlatform" - } - } + name: "String" } }, - tags: { - serializedName: "manifest.tags", - readOnly: true, + vendor: { + serializedName: "org\\.opencontainers\\.image\\.vendor", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - canDelete: { - serializedName: "manifest.changeableAttributes.deleteEnabled", + licenses: { + serializedName: "org\\.opencontainers\\.image\\.licenses", type: { - name: "Boolean" + name: "String" } }, - canWrite: { - serializedName: "manifest.changeableAttributes.writeEnabled", + name: { + serializedName: "org\\.opencontainers\\.image\\.ref.name", type: { - name: "Boolean" + name: "String" } }, - canList: { - serializedName: "manifest.changeableAttributes.listEnabled", + title: { + serializedName: "org\\.opencontainers\\.image\\.title", type: { - name: "Boolean" + name: "String" } }, - canRead: { - serializedName: "manifest.changeableAttributes.readEnabled", + description: { + serializedName: "org\\.opencontainers\\.image\\.description", type: { - name: "Boolean" + name: "String" } } } } }; -export const AcrRefreshToken: coreClient.CompositeMapper = { +export const TagAttributesTag: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcrRefreshToken", + className: "TagAttributesTag", modelProperties: { - refreshToken: { - serializedName: "refresh_token", + signatureRecord: { + serializedName: "signatureRecord", type: { name: "String" } @@ -1110,55 +1095,101 @@ export const AcrRefreshToken: coreClient.CompositeMapper = { } }; -export const AcrAccessToken: coreClient.CompositeMapper = { +export const ManifestAttributesManifest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcrAccessToken", + className: "ManifestAttributesManifest", modelProperties: { - accessToken: { - serializedName: "access_token", + references: { + serializedName: "references", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ArtifactManifestPlatform" + } + } } } } } }; -export const RepositoryTags: coreClient.CompositeMapper = { +export const Manifest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RepositoryTags", + className: "Manifest", modelProperties: { - name: { - serializedName: "name", + schemaVersion: { + serializedName: "schemaVersion", + type: { + name: "Number" + } + } + } + } +}; + +export const ManifestListAttributes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManifestListAttributes", + modelProperties: { + mediaType: { + serializedName: "mediaType", type: { name: "String" } }, - tags: { - serializedName: "tags", + size: { + serializedName: "size", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" + } + }, + digest: { + serializedName: "digest", + type: { + name: "String" + } + }, + platform: { + serializedName: "platform", + type: { + name: "Composite", + className: "Platform" } } } } }; -export const DeleteRepositoryResult: coreClient.CompositeMapper = { +export const Platform: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DeleteRepositoryResult", + className: "Platform", modelProperties: { - deletedManifests: { - serializedName: "manifestsDeleted", - readOnly: true, + architecture: { + serializedName: "architecture", + type: { + name: "String" + } + }, + os: { + serializedName: "os", + type: { + name: "String" + } + }, + osVersion: { + serializedName: "os\\.version", + type: { + name: "String" + } + }, + osFeatures: { + serializedName: "os\\.features", type: { name: "Sequence", element: { @@ -1168,9 +1199,14 @@ export const DeleteRepositoryResult: coreClient.CompositeMapper = { } } }, - deletedTags: { - serializedName: "tagsDeleted", - readOnly: true, + variant: { + serializedName: "variant", + type: { + name: "String" + } + }, + features: { + serializedName: "features", type: { name: "Sequence", element: { @@ -1184,37 +1220,43 @@ export const DeleteRepositoryResult: coreClient.CompositeMapper = { } }; -export const TagAttributesTag: coreClient.CompositeMapper = { +export const OCIManifest: coreClient.CompositeMapper = { + serializedName: "application/vnd.oci.image.manifest.v1+json", type: { name: "Composite", - className: "TagAttributesTag", + className: "OCIManifest", modelProperties: { - signatureRecord: { - serializedName: "signatureRecord", + config: { + serializedName: "config", type: { - name: "String" + name: "Composite", + className: "Descriptor" } - } - } - } -}; - -export const ManifestAttributesManifest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManifestAttributesManifest", - modelProperties: { - references: { - serializedName: "references", + }, + layers: { + serializedName: "layers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ArtifactManifestPlatform" + className: "Descriptor" } } } + }, + annotations: { + serializedName: "annotations", + type: { + name: "Composite", + className: "Annotations" + } + }, + schemaVersion: { + serializedName: "schemaVersion", + type: { + name: "Number" + } } } } @@ -1474,43 +1516,6 @@ export const V2Manifest: coreClient.CompositeMapper = { } }; -export const OCIManifest: coreClient.CompositeMapper = { - serializedName: "application/vnd.oci.image.manifest.v1+json", - type: { - name: "Composite", - className: "OCIManifest", - modelProperties: { - ...Manifest.type.modelProperties, - config: { - serializedName: "config", - type: { - name: "Composite", - className: "Descriptor" - } - }, - layers: { - serializedName: "layers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Descriptor" - } - } - } - }, - annotations: { - serializedName: "annotations", - type: { - name: "Composite", - className: "Annotations" - } - } - } - } -}; - export const OCIIndex: coreClient.CompositeMapper = { serializedName: "application/vnd.oci.image.index.v1+json", type: { @@ -1606,6 +1611,21 @@ export const V1Manifest: coreClient.CompositeMapper = { } }; +export const ContainerRegistryGetManifestHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerRegistryGetManifestHeaders", + modelProperties: { + dockerContentDigest: { + serializedName: "docker-content-digest", + type: { + name: "String" + } + } + } + } +}; + export const ContainerRegistryCreateManifestHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/containerregistry/container-registry/src/generated/models/parameters.ts b/sdk/containerregistry/container-registry/src/generated/models/parameters.ts index 9c6c288fd0d2..04de3bbfe84e 100644 --- a/sdk/containerregistry/container-registry/src/generated/models/parameters.ts +++ b/sdk/containerregistry/container-registry/src/generated/models/parameters.ts @@ -12,7 +12,6 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - Manifest as ManifestMapper, RepositoryWriteableProperties as RepositoryWriteablePropertiesMapper, TagWriteableProperties as TagWriteablePropertiesMapper, ManifestWriteableProperties as ManifestWriteablePropertiesMapper @@ -74,21 +73,37 @@ export const accept1: OperationParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const payload: OperationParameter = { + parameterPath: "payload", mapper: { - defaultValue: "application/vnd.docker.distribution.manifest.v2+json", + serializedName: "payload", + required: true, + type: { + name: "Stream" + } + } +}; + +export const accept2: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", isConstant: true, - serializedName: "Content-Type", + serializedName: "Accept", type: { name: "String" } } }; -export const payload: OperationParameter = { - parameterPath: "payload", - mapper: ManifestMapper +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + serializedName: "Content-Type", + type: { + name: "String" + } + } }; export const last: OperationQueryParameter = { @@ -192,7 +207,7 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const accept2: OperationParameter = { +export const accept3: OperationParameter = { parameterPath: "accept", mapper: { defaultValue: "application/octet-stream", @@ -226,8 +241,8 @@ export const mount: OperationQueryParameter = { } }; -export const location: OperationURLParameter = { - parameterPath: "location", +export const nextLink1: OperationURLParameter = { + parameterPath: "nextLink", mapper: { serializedName: "nextBlobUuidLink", required: true, @@ -261,18 +276,6 @@ export const value3: OperationParameter = { } }; -export const accept3: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String" - } - } -}; - export const value4: OperationParameter = { parameterPath: ["options", "value"], mapper: { diff --git a/sdk/containerregistry/container-registry/src/generated/operations/authentication.ts b/sdk/containerregistry/container-registry/src/generated/operations/authentication.ts index 73a780dc7a38..18faf45f3708 100644 --- a/sdk/containerregistry/container-registry/src/generated/operations/authentication.ts +++ b/sdk/containerregistry/container-registry/src/generated/operations/authentication.ts @@ -10,7 +10,7 @@ import { Authentication } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { GeneratedClientContext } from "../generatedClientContext"; +import { GeneratedClient } from "../generatedClient"; import { PostContentSchemaGrantType, AuthenticationExchangeAadAccessTokenForAcrRefreshTokenOptionalParams, @@ -22,13 +22,13 @@ import { /** Class containing Authentication operations. */ export class AuthenticationImpl implements Authentication { - private readonly client: GeneratedClientContext; + private readonly client: GeneratedClient; /** * Initialize a new instance of the class Authentication class. * @param client Reference to the service client */ - constructor(client: GeneratedClientContext) { + constructor(client: GeneratedClient) { this.client = client; } diff --git a/sdk/containerregistry/container-registry/src/generated/operations/containerRegistry.ts b/sdk/containerregistry/container-registry/src/generated/operations/containerRegistry.ts index 05c9039464cd..2472e05b2f28 100644 --- a/sdk/containerregistry/container-registry/src/generated/operations/containerRegistry.ts +++ b/sdk/containerregistry/container-registry/src/generated/operations/containerRegistry.ts @@ -8,14 +8,14 @@ import { ContainerRegistry } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { GeneratedClientContext } from "../generatedClientContext"; +import { GeneratedClient } from "../generatedClient"; import { ContainerRegistryCheckDockerV2SupportOptionalParams, ContainerRegistryGetManifestOptionalParams, ContainerRegistryGetManifestResponse, - Manifest, ContainerRegistryCreateManifestOptionalParams, ContainerRegistryCreateManifestResponse, ContainerRegistryDeleteManifestOptionalParams, @@ -49,13 +49,13 @@ import { /** Class containing ContainerRegistry operations. */ export class ContainerRegistryImpl implements ContainerRegistry { - private readonly client: GeneratedClientContext; + private readonly client: GeneratedClient; /** * Initialize a new instance of the class ContainerRegistry class. * @param client Reference to the service client */ - constructor(client: GeneratedClientContext) { + constructor(client: GeneratedClient) { this.client = client; } @@ -99,7 +99,7 @@ export class ContainerRegistryImpl implements ContainerRegistry { createManifest( name: string, reference: string, - payload: Manifest, + payload: coreRestPipeline.RequestBodyType, options?: ContainerRegistryCreateManifestOptionalParams ): Promise { return this.client.sendOperationRequest( @@ -369,7 +369,11 @@ const getManifestOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ManifestWrapper + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse" + }, + headersMapper: Mappers.ContainerRegistryGetManifestHeaders }, default: { bodyMapper: Mappers.AcrErrors @@ -384,7 +388,6 @@ const createManifestOperationSpec: coreClient.OperationSpec = { httpMethod: "PUT", responses: { 201: { - bodyMapper: { type: { name: "any" } }, headersMapper: Mappers.ContainerRegistryCreateManifestHeaders }, default: { @@ -393,8 +396,8 @@ const createManifestOperationSpec: coreClient.OperationSpec = { }, requestBody: Parameters.payload, urlParameters: [Parameters.url, Parameters.name, Parameters.reference], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept2, Parameters.contentType], + mediaType: "binary", serializer }; const deleteManifestOperationSpec: coreClient.OperationSpec = { diff --git a/sdk/containerregistry/container-registry/src/generated/operations/containerRegistryBlob.ts b/sdk/containerregistry/container-registry/src/generated/operations/containerRegistryBlob.ts index 9f20cd40c201..80ae0ccfa6d2 100644 --- a/sdk/containerregistry/container-registry/src/generated/operations/containerRegistryBlob.ts +++ b/sdk/containerregistry/container-registry/src/generated/operations/containerRegistryBlob.ts @@ -11,7 +11,7 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { GeneratedClientContext } from "../generatedClientContext"; +import { GeneratedClient } from "../generatedClient"; import { ContainerRegistryBlobGetBlobOptionalParams, ContainerRegistryBlobGetBlobResponse, @@ -38,13 +38,13 @@ import { /** Class containing ContainerRegistryBlob operations. */ export class ContainerRegistryBlobImpl implements ContainerRegistryBlob { - private readonly client: GeneratedClientContext; + private readonly client: GeneratedClient; /** * Initialize a new instance of the class ContainerRegistryBlob class. * @param client Reference to the service client */ - constructor(client: GeneratedClientContext) { + constructor(client: GeneratedClient) { this.client = client; } @@ -121,34 +121,34 @@ export class ContainerRegistryBlobImpl implements ContainerRegistryBlob { /** * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the * current status of a resumable upload. - * @param location Link acquired from upload start or previous chunk. Note, do not include initial / + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / * (must do substring(1) ) * @param options The options parameters. */ getUploadStatus( - location: string, + nextLink: string, options?: ContainerRegistryBlobGetUploadStatusOptionalParams ): Promise { return this.client.sendOperationRequest( - { location, options }, + { nextLink, options }, getUploadStatusOperationSpec ); } /** * Upload a stream of data without completing the upload. - * @param location Link acquired from upload start or previous chunk. Note, do not include initial / + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / * (must do substring(1) ) * @param value Raw data of blob * @param options The options parameters. */ uploadChunk( - location: string, + nextLink: string, value: coreRestPipeline.RequestBodyType, options?: ContainerRegistryBlobUploadChunkOptionalParams ): Promise { return this.client.sendOperationRequest( - { location, value, options }, + { nextLink, value, options }, uploadChunkOperationSpec ); } @@ -157,17 +157,17 @@ export class ContainerRegistryBlobImpl implements ContainerRegistryBlob { * Complete the upload, providing all the data in the body, if necessary. A request without a body will * just complete the upload with previously uploaded content. * @param digest Digest of a BLOB - * @param location Link acquired from upload start or previous chunk. Note, do not include initial / + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / * (must do substring(1) ) * @param options The options parameters. */ completeUpload( digest: string, - location: string, + nextLink: string, options?: ContainerRegistryBlobCompleteUploadOptionalParams ): Promise { return this.client.sendOperationRequest( - { digest, location, options }, + { digest, nextLink, options }, completeUploadOperationSpec ); } @@ -175,16 +175,16 @@ export class ContainerRegistryBlobImpl implements ContainerRegistryBlob { /** * Cancel outstanding upload processes, releasing associated resources. If this is not called, the * unfinished uploads will eventually timeout. - * @param location Link acquired from upload start or previous chunk. Note, do not include initial / + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / * (must do substring(1) ) * @param options The options parameters. */ cancelUpload( - location: string, + nextLink: string, options?: ContainerRegistryBlobCancelUploadOptionalParams ): Promise { return this.client.sendOperationRequest( - { location, options }, + { nextLink, options }, cancelUploadOperationSpec ); } @@ -264,7 +264,7 @@ const getBlobOperationSpec: coreClient.OperationSpec = { default: {} }, urlParameters: [Parameters.url, Parameters.name, Parameters.digest1], - headerParameters: [Parameters.accept2], + headerParameters: [Parameters.accept3], serializer }; const checkBlobExistsOperationSpec: coreClient.OperationSpec = { @@ -299,7 +299,7 @@ const deleteBlobOperationSpec: coreClient.OperationSpec = { default: {} }, urlParameters: [Parameters.url, Parameters.name, Parameters.digest1], - headerParameters: [Parameters.accept2], + headerParameters: [Parameters.accept3], serializer }; const mountBlobOperationSpec: coreClient.OperationSpec = { @@ -329,7 +329,7 @@ const getUploadStatusOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AcrErrors } }, - urlParameters: [Parameters.url, Parameters.location], + urlParameters: [Parameters.url, Parameters.nextLink1], headerParameters: [Parameters.accept], serializer }; @@ -345,8 +345,8 @@ const uploadChunkOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.value3, - urlParameters: [Parameters.url, Parameters.location], - headerParameters: [Parameters.contentType2, Parameters.accept3], + urlParameters: [Parameters.url, Parameters.nextLink1], + headerParameters: [Parameters.accept2, Parameters.contentType2], mediaType: "binary", serializer }; @@ -363,8 +363,8 @@ const completeUploadOperationSpec: coreClient.OperationSpec = { }, requestBody: Parameters.value4, queryParameters: [Parameters.digest2], - urlParameters: [Parameters.url, Parameters.location], - headerParameters: [Parameters.contentType2, Parameters.accept3], + urlParameters: [Parameters.url, Parameters.nextLink1], + headerParameters: [Parameters.accept2, Parameters.contentType2], mediaType: "binary", serializer }; @@ -377,7 +377,7 @@ const cancelUploadOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AcrErrors } }, - urlParameters: [Parameters.url, Parameters.location], + urlParameters: [Parameters.url, Parameters.nextLink1], headerParameters: [Parameters.accept], serializer }; @@ -410,7 +410,7 @@ const getChunkOperationSpec: coreClient.OperationSpec = { default: {} }, urlParameters: [Parameters.url, Parameters.name, Parameters.digest1], - headerParameters: [Parameters.accept2, Parameters.range], + headerParameters: [Parameters.accept3, Parameters.range], serializer }; const checkChunkExistsOperationSpec: coreClient.OperationSpec = { diff --git a/sdk/containerregistry/container-registry/src/generated/operationsInterfaces/containerRegistry.ts b/sdk/containerregistry/container-registry/src/generated/operationsInterfaces/containerRegistry.ts index 8591964af2d9..244348c9d646 100644 --- a/sdk/containerregistry/container-registry/src/generated/operationsInterfaces/containerRegistry.ts +++ b/sdk/containerregistry/container-registry/src/generated/operationsInterfaces/containerRegistry.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { ContainerRegistryCheckDockerV2SupportOptionalParams, ContainerRegistryGetManifestOptionalParams, ContainerRegistryGetManifestResponse, - Manifest, ContainerRegistryCreateManifestOptionalParams, ContainerRegistryCreateManifestResponse, ContainerRegistryDeleteManifestOptionalParams, @@ -72,7 +72,7 @@ export interface ContainerRegistry { createManifest( name: string, reference: string, - payload: Manifest, + payload: coreRestPipeline.RequestBodyType, options?: ContainerRegistryCreateManifestOptionalParams ): Promise; /** diff --git a/sdk/containerregistry/container-registry/src/generated/operationsInterfaces/containerRegistryBlob.ts b/sdk/containerregistry/container-registry/src/generated/operationsInterfaces/containerRegistryBlob.ts index 4f8d82092b09..3f4b4e783e71 100644 --- a/sdk/containerregistry/container-registry/src/generated/operationsInterfaces/containerRegistryBlob.ts +++ b/sdk/containerregistry/container-registry/src/generated/operationsInterfaces/containerRegistryBlob.ts @@ -82,23 +82,23 @@ export interface ContainerRegistryBlob { /** * Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the * current status of a resumable upload. - * @param location Link acquired from upload start or previous chunk. Note, do not include initial / + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / * (must do substring(1) ) * @param options The options parameters. */ getUploadStatus( - location: string, + nextLink: string, options?: ContainerRegistryBlobGetUploadStatusOptionalParams ): Promise; /** * Upload a stream of data without completing the upload. - * @param location Link acquired from upload start or previous chunk. Note, do not include initial / + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / * (must do substring(1) ) * @param value Raw data of blob * @param options The options parameters. */ uploadChunk( - location: string, + nextLink: string, value: coreRestPipeline.RequestBodyType, options?: ContainerRegistryBlobUploadChunkOptionalParams ): Promise; @@ -106,24 +106,24 @@ export interface ContainerRegistryBlob { * Complete the upload, providing all the data in the body, if necessary. A request without a body will * just complete the upload with previously uploaded content. * @param digest Digest of a BLOB - * @param location Link acquired from upload start or previous chunk. Note, do not include initial / + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / * (must do substring(1) ) * @param options The options parameters. */ completeUpload( digest: string, - location: string, + nextLink: string, options?: ContainerRegistryBlobCompleteUploadOptionalParams ): Promise; /** * Cancel outstanding upload processes, releasing associated resources. If this is not called, the * unfinished uploads will eventually timeout. - * @param location Link acquired from upload start or previous chunk. Note, do not include initial / + * @param nextLink Link acquired from upload start or previous chunk. Note, do not include initial / * (must do substring(1) ) * @param options The options parameters. */ cancelUpload( - location: string, + nextLink: string, options?: ContainerRegistryBlobCancelUploadOptionalParams ): Promise; /** diff --git a/sdk/containerregistry/container-registry/src/index.ts b/sdk/containerregistry/container-registry/src/index.ts index 12cdc48ed059..7d4a8a09480d 100644 --- a/sdk/containerregistry/container-registry/src/index.ts +++ b/sdk/containerregistry/container-registry/src/index.ts @@ -20,3 +20,4 @@ export { ListTagPropertiesOptions, } from "./registryArtifact"; export * from "./models"; +export * from "./blob"; diff --git a/sdk/containerregistry/container-registry/src/utils/digest.ts b/sdk/containerregistry/container-registry/src/utils/digest.ts new file mode 100644 index 000000000000..519467680fa5 --- /dev/null +++ b/sdk/containerregistry/container-registry/src/utils/digest.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import crypto from "crypto"; + +export function calculateDigest(buffer: Buffer): Promise; + +export function calculateDigest(stream: NodeJS.ReadableStream): Promise; + +export function calculateDigest(bufferOrStream: NodeJS.ReadableStream | Buffer): Promise { + const hash = crypto.createHash("sha256"); + if (Buffer.isBuffer(bufferOrStream)) { + return Promise.resolve(`sha256:${hash.update(bufferOrStream).digest("hex")}`); + } else { + bufferOrStream.pipe(hash); + return new Promise((resolve, reject) => { + bufferOrStream.on("end", () => { + hash.end(); + resolve(`sha256:${hash.digest("hex")}`); + }); + bufferOrStream.on("error", (err) => reject(err)); + }); + } +} diff --git a/sdk/containerregistry/container-registry/src/utils/helpers.ts b/sdk/containerregistry/container-registry/src/utils/helpers.ts index 65afe1972a78..43e01232d728 100644 --- a/sdk/containerregistry/container-registry/src/utils/helpers.ts +++ b/sdk/containerregistry/container-registry/src/utils/helpers.ts @@ -19,3 +19,13 @@ export function extractNextLink(value: string | undefined): string | undefined { export function isDigest(tagOrDigest: string): boolean { return tagOrDigest.includes(":"); } + +export async function readStreamToEnd(stream: NodeJS.ReadableStream): Promise { + const buffers: Buffer[] = []; + + return new Promise((resolve, reject) => { + stream.on("data", (chunk) => buffers.push(chunk)); + stream.on("end", () => resolve(Buffer.concat(buffers))); + stream.on("error", (err) => reject(err)); + }); +} diff --git a/sdk/containerregistry/container-registry/src/utils/wwwAuthenticateParser.ts b/sdk/containerregistry/container-registry/src/utils/wwwAuthenticateParser.ts index 7d19203530e1..d08e8e24d4ae 100644 --- a/sdk/containerregistry/container-registry/src/utils/wwwAuthenticateParser.ts +++ b/sdk/containerregistry/container-registry/src/utils/wwwAuthenticateParser.ts @@ -31,21 +31,16 @@ export type ParsedWWWAuthenticate = { * @param wwwAuthenticate - String value in the WWW-Authenticate header */ export function parseWWWAuthenticate(wwwAuthenticate: string): ParsedWWWAuthenticate { - // First we split the string by either `,`, `, ` or ` `. - const parts = wwwAuthenticate.split(/, *| +/); - // Then we only keep the strings with an equal sign after a word and before a quote. - // also splitting these sections by their equal sign - const keyValues = parts.reduce( - (acc, str) => (str.match(/\w="/) ? [...acc, str.split("=")] : acc), - [] - ); - // Then we transform these key-value pairs back into an object. - const parsed = keyValues.reduce( - (result, [key, value]: string[]) => ({ - ...result, - [key]: value.slice(1, -1), - }), - {} - ); - return parsed; + // Match on things that look like property name/value pairs. We assume that values are quoted, + // this hasn't been an issue yet... + const pattern = /(\w+?)="(.*?)"/g; + + const value: ParsedWWWAuthenticate = {}; + + let match: string[] | null; + while ((match = pattern.exec(wwwAuthenticate)) !== null) { + value[match[1] as keyof ParsedWWWAuthenticate] = match[2]; + } + + return value; } diff --git a/sdk/containerregistry/container-registry/swagger/README.md b/sdk/containerregistry/container-registry/swagger/README.md index 275dbbacca8f..325eb45c9c72 100644 --- a/sdk/containerregistry/container-registry/swagger/README.md +++ b/sdk/containerregistry/container-registry/swagger/README.md @@ -20,7 +20,7 @@ override-client-name: GeneratedClient disable-async-iterators: true hide-clients: true api-version-parameter: choice -package-version: 1.0.1 +package-version: 1.1.0-beta.1 ``` ## Customizations for Track 2 Generator @@ -87,3 +87,114 @@ directive: transform: > $.required = true ``` + +### Take stream as manifest body + +```yaml +directive: + from: swagger-document + where: $.parameters.ManifestBody + transform: > + $.schema = { + "type": "string", + "format": "binary" + } +``` + +# Add content-type parameter + +```yaml +directive: + from: swagger-document + where: $.paths["/v2/{name}/manifests/{reference}"].put + transform: > + $.parameters.push({ + "name": "Content-Type", + "in": "header", + "type": "string", + "description": "The manifest's Content-Type." + }); + delete $.responses["201"].schema; +``` + +# Change NextLink client name to nextLink + +```yaml +directive: + from: swagger-document + where: $.parameters.NextLink + transform: > + $["x-ms-client-name"] = "nextLink" +``` + +# Updates to OciManifest + +```yaml +directive: + from: swagger-document + where: $.definitions.OCIManifest + transform: > + delete $["allOf"]; + $.properties["schemaVersion"] = { + "type": "integer", + "description": "Schema version" + }; +``` + +# Rename created to createdOn in OciAnnotations + +to make our naming consistent + +```yaml +directive: + from: swagger-document + where: $.definitions.Annotations + transform: > + $.properties["org.opencontainers.image.created"] = { + "description": "Date and time on which the image was built (string, date-time as defined by https://tools.ietf.org/html/rfc3339#section-5.6)", + "type": "string", + "format": "date-time", + "x-ms-client-name": "CreatedOn" + } +``` + +# Add escaping to second and third periods of property names + +to work around a code generator bug where only the first period is escaped. +This should be removed when the code gen bug is fixed. + +```yaml +directive: + from: swagger-document + where: $.definitions.Annotations + transform: > + $.properties = Object.keys($.properties).reduce((acc, key) => { + const newKey = key.replace("org.opencontainers.image.", "org.opencontainers\\.image\\."); + acc[newKey] = $.properties[key]; + return acc; + }, {}); +``` + +# Changes to getManifest definition + +Since: + +- We need to expose the Docker-Content-Digest header +- We need the manifest body as text to calculate the digest + +```yaml +directive: + from: swagger-document + where: $.paths["/v2/{name}/manifests/{reference}"].get.responses["200"] + transform: > + $.schema = { + type: "string", + format: "file" + }; + $.headers = { + "Docker-Content-Digest": { + "type": "string", + "description": "Identifies the docker upload uuid for the current request." + } + }; +``` diff --git a/sdk/containerregistry/container-registry/test/data/oci-artifact/654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed b/sdk/containerregistry/container-registry/test/data/oci-artifact/654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed new file mode 100644 index 000000000000..80993781b54e Binary files /dev/null and b/sdk/containerregistry/container-registry/test/data/oci-artifact/654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed differ diff --git a/sdk/containerregistry/container-registry/test/data/oci-artifact/config.json b/sdk/containerregistry/container-registry/test/data/oci-artifact/config.json new file mode 100644 index 000000000000..2e34cd1899dc Binary files /dev/null and b/sdk/containerregistry/container-registry/test/data/oci-artifact/config.json differ diff --git a/sdk/containerregistry/container-registry/test/data/oci-artifact/manifest.json b/sdk/containerregistry/container-registry/test/data/oci-artifact/manifest.json new file mode 100644 index 000000000000..b9383398a440 --- /dev/null +++ b/sdk/containerregistry/container-registry/test/data/oci-artifact/manifest.json @@ -0,0 +1,18 @@ +{ + "schemaVersion": 2, + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + "size": 171 + }, + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar", + "digest": "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + "size": 28, + "annotations": { + "org.opencontainers.image.title": "artifact.txt" + } + } + ] +} diff --git a/sdk/containerregistry/container-registry/test/internal/basic.spec.ts b/sdk/containerregistry/container-registry/test/internal/basic.spec.ts index d21fcaf07969..cce0b60703e3 100644 --- a/sdk/containerregistry/container-registry/test/internal/basic.spec.ts +++ b/sdk/containerregistry/container-registry/test/internal/basic.spec.ts @@ -5,6 +5,10 @@ // as part of our template project. import { ContainerRegistryClient, KnownContainerRegistryAudience } from "../../src"; import { assert } from "chai"; +import { calculateDigest } from "../../src/utils/digest"; +import { Readable } from "stream"; +import { parseWWWAuthenticate } from "../../src/utils/wwwAuthenticateParser"; +import { expect } from "@azure/test-utils"; describe("ContainerRegistryClient functional test", async function () { ["", null, undefined].forEach((value) => { @@ -109,3 +113,39 @@ describe("RegistryArtifact functional test", async function () { }); }); }); + +describe("digest calculation helper", () => { + it("should calculate the digest correctly from a buffer", async () => { + const buf = Buffer.from("Hello world!", "utf8"); + const expectedChecksum = "c0535e4be2b79ffd93291305436bf889314e4a3faec05ecffcbb7df31ad9e51a"; + + assert.equal(await calculateDigest(buf), `sha256:${expectedChecksum}`); + }); + + it("should calculate the digest correctly from a stream", async () => { + const buf = Buffer.from("Hello world!", "utf8"); + const stream = Readable.from(buf); + const expectedChecksum = "c0535e4be2b79ffd93291305436bf889314e4a3faec05ecffcbb7df31ad9e51a"; + + assert.equal(await calculateDigest(stream), `sha256:${expectedChecksum}`); + }); +}); + +describe("WWW-Authenticate parser", () => { + it("should extract properties correctly", () => { + const token = `Bearer authorization="some_authorization", resource="https://some.url"`; + expect(parseWWWAuthenticate(token)).to.deep.equal({ + authorization: "some_authorization", + resource: "https://some.url", + }); + }); + + it("should extract properties correctly when a property value contains a comma", () => { + const token = `Bearer realm="https://dummy.azurecr.io/oauth2/token",service="dummy.azurecr.io",scope="repository:dummyrepo:pull,push"`; + expect(parseWWWAuthenticate(token)).to.deep.equal({ + realm: "https://dummy.azurecr.io/oauth2/token", + service: "dummy.azurecr.io", + scope: "repository:dummyrepo:pull,push", + }); + }); +}); diff --git a/sdk/containerregistry/container-registry/test/public/containerRegistryBlobClient.spec.ts b/sdk/containerregistry/container-registry/test/public/containerRegistryBlobClient.spec.ts new file mode 100644 index 000000000000..4a96737cc637 --- /dev/null +++ b/sdk/containerregistry/container-registry/test/public/containerRegistryBlobClient.spec.ts @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; +import { ContainerRegistryBlobClient, OciManifest } from "@azure/container-registry"; +import { assert, versionsToTest } from "@azure/test-utils"; +import { Context } from "mocha"; +import { createBlobClient, recorderStartOptions, serviceVersions } from "../utils/utils"; +import fs from "fs"; + +versionsToTest(serviceVersions, {}, (serviceVersion, onVersions): void => { + onVersions({ minVer: "2021-07-01" }).describe("ContainerRegistryBlobClient", function () { + // Declare the client and recorder instances. We will set them using the + // beforeEach hook. + let client: ContainerRegistryBlobClient; + let recorder: Recorder; + const repositoryName = "oci-artifact"; + + // NOTE: use of "function" and not ES6 arrow-style functions with the + // beforeEach hook is IMPORTANT due to the use of `this` in the function + // body. + beforeEach(async function (this: Context) { + // The recorder has some convenience methods, and we need to store a + // reference to it so that we can `stop()` the recorder later in the + // `afterEach` hook. + recorder = new Recorder(this.currentTest); + + await recorder.start(recorderStartOptions); + + // We'll be able to refer to the instantiated `client` in tests, since we + // initialize it before each test + client = createBlobClient( + assertEnvironmentVariable("CONTAINER_REGISTRY_ENDPOINT"), + repositoryName, + serviceVersion, + recorder + ); + }); + + // After each test, we need to stop the recording. + afterEach(async function () { + await recorder.stop(); + }); + + const manifest: OciManifest = { + schemaVersion: 2, + config: { + mediaType: "application/vnd.oci.image.config.v1+json", + digest: "sha256:d25b42d3dbad5361ed2d909624d899e7254a822c9a632b582ebd3a44f9b0dbc8", + size: 171, + }, + layers: [ + { + mediaType: "application/vnd.oci.image.layer.v1.tar", + digest: "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed", + size: 28, + annotations: { + title: "artifact.txt", + }, + }, + ], + }; + + const uploadManifestPrerequisites = async () => { + const layer = fs.createReadStream( + "test/data/oci-artifact/654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed" + ); + await client.uploadBlob(layer); + const config = fs.createReadStream("test/data/oci-artifact/config.json"); + await client.uploadBlob(config); + }; + + /** + * The test proxy goes to the liberty of trimming whitespace from JSON (including our manifests) when responding to + * requests. This means that the recorded Docker-Content-Digest header from the does not match the digest our client + * computes, causing test failures. + * + * We use a transform to substitute in the digest of the whitespace-trimmed JSON so that our client doesn't reject + * the played back request. + */ + const mockDockerContentDigestHeader = () => + recorder.addTransform({ + type: "HeaderTransform", + params: { + key: "Docker-Content-Digest", + value: "sha256:70e2ffca8e79adc4bd34b67363a972522d75933e435084826d39a19f958579ed", + }, + }); + + it("can upload OCI manifest", async () => { + await uploadManifestPrerequisites(); + + const uploadResult = await client.uploadManifest(manifest); + const downloadResult = await client.downloadManifest(uploadResult.digest); + + assert.equal(downloadResult.digest, uploadResult.digest); + assert.deepStrictEqual(downloadResult.manifest, manifest); + + await client.deleteManifest(uploadResult.digest); + }); + + // Tempoarily skip while dealing with recorder issue + it.skip("can upload OCI manifest from stream", async () => { + await uploadManifestPrerequisites(); + + await mockDockerContentDigestHeader(); + + const manifestStream = fs.createReadStream("test/data/oci-artifact/manifest.json"); + const uploadResult = await client.uploadManifest(manifestStream); + const downloadResult = await client.downloadManifest(uploadResult.digest); + + assert.equal(downloadResult.digest, uploadResult.digest); + assert.deepStrictEqual(downloadResult.manifest, manifest); + + await client.deleteManifest(uploadResult.digest); + }); + + it("can upload OCI manifest with tag", async () => { + await uploadManifestPrerequisites(); + + const uploadResult = await client.uploadManifest(manifest, { tag: "my_artifact" }); + const downloadResult = await client.downloadManifest("my_artifact"); + + assert.equal(downloadResult.digest, uploadResult.digest); + assert.deepStrictEqual(downloadResult.manifest, manifest); + + await client.deleteManifest(uploadResult.digest); + }); + + it("can upload OCI manifest stream with tag", async () => { + await uploadManifestPrerequisites(); + + await mockDockerContentDigestHeader(); + + const manifestStream = fs.createReadStream("test/data/oci-artifact/manifest.json"); + const uploadResult = await client.uploadManifest(manifestStream, { tag: "my_artifact" }); + const downloadResult = await client.downloadManifest("my_artifact"); + + assert.equal(downloadResult.digest, uploadResult.digest); + assert.deepStrictEqual(downloadResult.manifest, manifest); + + await client.deleteManifest(uploadResult.digest); + }); + + it("can upload blob", async () => { + const blob = fs.createReadStream( + "test/data/oci-artifact/654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed" + ); + const { digest } = await client.uploadBlob(blob); + const downloadResult = await client.downloadBlob( + "sha256:654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed" + ); + assert.equal(digest, downloadResult.digest); + }); + }); +}); diff --git a/sdk/containerregistry/container-registry/test/utils/utils.ts b/sdk/containerregistry/container-registry/test/utils/utils.ts index ef3d79df60fb..817f11a17f34 100644 --- a/sdk/containerregistry/container-registry/test/utils/utils.ts +++ b/sdk/containerregistry/container-registry/test/utils/utils.ts @@ -3,8 +3,12 @@ import { AzureAuthorityHosts } from "@azure/identity"; import { createTestCredential } from "@azure-tools/test-credential"; -import { env, isLiveMode, Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; -import { ContainerRegistryClient, KnownContainerRegistryAudience } from "../../src"; +import { Recorder, RecorderStartOptions, env, isLiveMode } from "@azure-tools/test-recorder"; +import { + ContainerRegistryBlobClient, + ContainerRegistryClient, + KnownContainerRegistryAudience, +} from "../../src"; import { createXhrHttpClient, isNode } from "@azure/test-utils"; // When the recorder observes the values of these environment variables in any @@ -116,4 +120,35 @@ export function createRegistryClient( ); } +export function createBlobClient( + endpoint: string, + repositoryName: string, + serviceVersion: string, + recorder: Recorder +): ContainerRegistryBlobClient { + const authorityHost = getAuthority(endpoint); + const audience = getAudience(authorityHost); + const tokenCredentialOptions = authorityHost ? { authorityHost } : undefined; + const clientOptions = { + audience, + serviceVersion: serviceVersion as ContainerRegistryServiceVersions, + }; + + const credential = createTestCredential( + { ...tokenCredentialOptions }, + { + tenantId: env.CONTAINERREGISTRY_TENANT_ID, + clientId: env.CONTAINERREGISTRY_CLIENT_ID, + clientSecret: env.CONTAINERREGISTRY_CLIENT_SECRET, + } + ); + + return new ContainerRegistryBlobClient( + endpoint, + repositoryName, + credential, + recorder.configureClientOptions(clientOptions) + ); +} + export const serviceVersions = ["2021-07-01"] as const; diff --git a/sdk/containerregistry/perf-tests/container-registry/package.json b/sdk/containerregistry/perf-tests/container-registry/package.json index bb09efcd5473..a39142d231a0 100644 --- a/sdk/containerregistry/perf-tests/container-registry/package.json +++ b/sdk/containerregistry/perf-tests/container-registry/package.json @@ -7,7 +7,7 @@ "author": "", "license": "ISC", "dependencies": { - "@azure/container-registry": "^1.0.0", + "@azure/container-registry": "^1.1.0-beta.1", "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" },