diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_get_properties.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_get_properties.yaml index 9c635e45fd5d..d77e70f67769 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_get_properties.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_get_properties.yaml @@ -30,7 +30,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:47 GMT + - Tue, 11 May 2021 21:18:42 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:48 GMT + - Tue, 11 May 2021 21:18:42 GMT server: - openresty strict-transport-security: @@ -97,7 +97,7 @@ interactions: response: body: string: '{"registry": "fake_url.azurecr.io", "imageName": "library/hello-world", - "createdTime": "2021-05-05T18:00:19.7101132Z", "lastUpdateTime": "2021-05-05T18:00:17.5345755Z", + "createdTime": "2021-05-11T21:17:45.937904Z", "lastUpdateTime": "2021-05-11T21:17:46.3234919Z", "manifestCount": 10, "tagCount": 5, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "teleportEnabled": false}}' @@ -110,11 +110,11 @@ interactions: connection: - keep-alive content-length: - - '326' + - '325' content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:48 GMT + - Tue, 11 May 2021 21:18:43 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_manifests.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_manifests.yaml index 1b9dc66f97f5..f2d2235900fd 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_manifests.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_manifests.yaml @@ -30,7 +30,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:50 GMT + - Tue, 11 May 2021 21:18:43 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:50 GMT + - Tue, 11 May 2021 21:18:44 GMT server: - openresty strict-transport-security: @@ -98,53 +98,53 @@ interactions: body: string: '{"registry": "fake_url.azurecr.io", "imageName": "library/hello-world", "manifests": [{"digest": "sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792", - "imageSize": 525, "createdTime": "2021-05-05T18:00:19.9237969Z", "lastUpdateTime": - "2021-05-05T18:00:19.9237969Z", "architecture": "amd64", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.894001Z", "lastUpdateTime": + "2021-05-11T21:17:46.894001Z", "architecture": "amd64", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.0894003Z", "lastUpdateTime": - "2021-05-05T18:00:20.0894003Z", "architecture": "arm", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.5289051Z", "lastUpdateTime": + "2021-05-11T21:17:47.5289051Z", "architecture": "arm", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.9702265Z", "lastUpdateTime": - "2021-05-05T18:00:20.9702265Z", "architecture": "mips64le", "os": "linux", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.1680665Z", "lastUpdateTime": + "2021-05-11T21:17:47.1680665Z", "architecture": "mips64le", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.7515462Z", "lastUpdateTime": - "2021-05-05T18:00:20.7515462Z", "architecture": "arm64", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.4820084Z", "lastUpdateTime": + "2021-05-11T21:17:46.4820084Z", "architecture": "arm64", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d", - "imageSize": 525, "createdTime": "2021-05-05T18:00:21.9872183Z", "lastUpdateTime": - "2021-05-05T18:00:21.9872183Z", "architecture": "ppc64le", "os": "linux", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.4688177Z", "lastUpdateTime": + "2021-05-11T21:17:47.4688177Z", "architecture": "ppc64le", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.5796932Z", "lastUpdateTime": - "2021-05-05T18:00:20.5796932Z", "architecture": "386", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.6387006Z", "lastUpdateTime": + "2021-05-11T21:17:47.6387006Z", "architecture": "386", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf", - "imageSize": 525, "createdTime": "2021-05-05T18:00:19.8200236Z", "lastUpdateTime": - "2021-05-05T18:00:19.8200236Z", "architecture": "s390x", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.9385336Z", "lastUpdateTime": + "2021-05-11T21:17:46.9385336Z", "architecture": "s390x", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.0067665Z", "lastUpdateTime": - "2021-05-05T18:00:20.0067665Z", "architecture": "arm", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.3092689Z", "lastUpdateTime": + "2021-05-11T21:17:46.3092689Z", "architecture": "arm", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:ea0cfb27fd41ea0405d3095880c1efa45710f5bcdddb7d7d5a7317ad4825ae14", - "imageSize": 1125, "createdTime": "2021-05-05T18:00:28.6381496Z", "lastUpdateTime": - "2021-05-05T18:00:28.6381496Z", "architecture": "amd64", "os": "windows", + "imageSize": 1125, "createdTime": "2021-05-11T21:17:47.7429606Z", "lastUpdateTime": + "2021-05-11T21:17:47.7429606Z", "architecture": "amd64", "os": "windows", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "imageSize": 5325, "createdTime": "2021-05-05T18:00:19.8821305Z", "lastUpdateTime": - "2021-05-05T18:00:19.8821305Z", "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", + "imageSize": 5325, "createdTime": "2021-05-11T21:17:46.7851308Z", "lastUpdateTime": + "2021-05-11T21:17:46.7851308Z", "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "tags": ["latest", "v1", "v2", "v3", "v4"], "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}]}' headers: @@ -158,7 +158,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:51 GMT + - Tue, 11 May 2021 21:18:44 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_repository_names.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_repository_names.yaml index b40ba31ecae4..c6fec340d810 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_repository_names.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_repository_names.yaml @@ -30,7 +30,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:52 GMT + - Tue, 11 May 2021 21:18:45 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:52 GMT + - Tue, 11 May 2021 21:18:46 GMT server: - openresty strict-transport-security: @@ -110,7 +110,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:53 GMT + - Tue, 11 May 2021 21:18:46 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_repository_names_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_repository_names_by_page.yaml index 2a494f581dbf..986e056c100e 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_repository_names_by_page.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_repository_names_by_page.yaml @@ -30,7 +30,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:53 GMT + - Tue, 11 May 2021 21:18:46 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:54 GMT + - Tue, 11 May 2021 21:18:47 GMT server: - openresty strict-transport-security: @@ -110,7 +110,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:54 GMT + - Tue, 11 May 2021 21:18:47 GMT docker-distribution-api-version: - registry/2.0 link: @@ -156,7 +156,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:54 GMT + - Tue, 11 May 2021 21:18:47 GMT docker-distribution-api-version: - registry/2.0 server: @@ -197,7 +197,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:54 GMT + - Tue, 11 May 2021 21:18:47 GMT server: - openresty strict-transport-security: @@ -236,7 +236,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:54 GMT + - Tue, 11 May 2021 21:18:47 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_tags.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_tags.yaml index e36dc3ebf49e..ceb9b428bf71 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_tags.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_list_tags.yaml @@ -1,4 +1,178 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b2 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world/_manifests + response: + body: + string: '{"errors": [{"code": "UNAUTHORIZED", "message": "authentication required, + visit https://aka.ms/acr/authorization for more information.", "detail": [{"Type": + "repository", "Name": "library/hello-world", "Action": "metadata_read"}]}]}' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '222' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 May 2021 21:18: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="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: grant_type=password&service=seankaneanon.azurecr.io&scope=repository%3Alibrary%2Fhello-world%3Ametadata_read + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '108' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b2 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/token + response: + body: + string: '{"access_token": "REDACTED"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 May 2021 21:18:48 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b2 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world/_manifests + response: + body: + string: '{"registry": "fake_url.azurecr.io", "imageName": "library/hello-world", + "manifests": [{"digest": "sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792", + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.894001Z", "lastUpdateTime": + "2021-05-11T21:17:46.894001Z", "architecture": "amd64", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.5289051Z", "lastUpdateTime": + "2021-05-11T21:17:47.5289051Z", "architecture": "arm", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.1680665Z", "lastUpdateTime": + "2021-05-11T21:17:47.1680665Z", "architecture": "mips64le", "os": "linux", + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343", + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.4820084Z", "lastUpdateTime": + "2021-05-11T21:17:46.4820084Z", "architecture": "arm64", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.4688177Z", "lastUpdateTime": + "2021-05-11T21:17:47.4688177Z", "architecture": "ppc64le", "os": "linux", + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.6387006Z", "lastUpdateTime": + "2021-05-11T21:17:47.6387006Z", "architecture": "386", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf", + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.9385336Z", "lastUpdateTime": + "2021-05-11T21:17:46.9385336Z", "architecture": "s390x", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9", + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.3092689Z", "lastUpdateTime": + "2021-05-11T21:17:46.3092689Z", "architecture": "arm", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:ea0cfb27fd41ea0405d3095880c1efa45710f5bcdddb7d7d5a7317ad4825ae14", + "imageSize": 1125, "createdTime": "2021-05-11T21:17:47.7429606Z", "lastUpdateTime": + "2021-05-11T21:17:47.7429606Z", "architecture": "amd64", "os": "windows", + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", + "imageSize": 5325, "createdTime": "2021-05-11T21:17:46.7851308Z", "lastUpdateTime": + "2021-05-11T21:17:46.7851308Z", "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", + "tags": ["latest", "v1", "v2", "v3", "v4"], "changeableAttributes": {"deleteEnabled": + true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}]}' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 May 2021 21:18:49 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: @@ -30,7 +204,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:55 GMT + - Tue, 11 May 2021 21:18:49 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +245,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:56 GMT + - Tue, 11 May 2021 21:18:49 GMT server: - openresty strict-transport-security: @@ -98,23 +272,23 @@ interactions: body: string: '{"registry": "fake_url.azurecr.io", "imageName": "library/hello-world", "tags": [{"name": "latest", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:20.8799521Z", "lastUpdateTime": "2021-05-05T18:00:20.8799521Z", + "createdTime": "2021-05-11T21:17:46.0365675Z", "lastUpdateTime": "2021-05-11T21:17:46.0365675Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}, {"name": "v1", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:24.1188128Z", "lastUpdateTime": "2021-05-05T18:00:24.1188128Z", + "createdTime": "2021-05-11T21:17:48.0232569Z", "lastUpdateTime": "2021-05-11T21:17:48.0232569Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}, {"name": "v2", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:21.3154368Z", "lastUpdateTime": "2021-05-05T18:00:21.3154368Z", + "createdTime": "2021-05-11T21:17:47.2166815Z", "lastUpdateTime": "2021-05-11T21:17:47.2166815Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}, {"name": "v3", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:20.4944944Z", "lastUpdateTime": "2021-05-05T18:00:20.4944944Z", + "createdTime": "2021-05-11T21:17:48.5358052Z", "lastUpdateTime": "2021-05-11T21:17:48.5358052Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}, {"name": "v4", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:20.3500586Z", "lastUpdateTime": "2021-05-05T18:00:20.3500586Z", + "createdTime": "2021-05-11T21:17:48.2377521Z", "lastUpdateTime": "2021-05-11T21:17:48.2377521Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}]}' headers: @@ -130,7 +304,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:56 GMT + - Tue, 11 May 2021 21:18:49 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_transport_closed_only_once.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_transport_closed_only_once.yaml index 8aa8191da23a..d9d068e3dff3 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_transport_closed_only_once.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access.test_transport_closed_only_once.yaml @@ -30,7 +30,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:57 GMT + - Tue, 11 May 2021 21:18:50 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:57 GMT + - Tue, 11 May 2021 21:18:50 GMT server: - openresty strict-transport-security: @@ -110,7 +110,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:57 GMT + - Tue, 11 May 2021 21:18:51 GMT docker-distribution-api-version: - registry/2.0 server: @@ -154,7 +154,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:58 GMT + - Tue, 11 May 2021 21:18:51 GMT docker-distribution-api-version: - registry/2.0 server: @@ -195,7 +195,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:58 GMT + - Tue, 11 May 2021 21:18:51 GMT server: - openresty strict-transport-security: @@ -234,7 +234,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 09 May 2021 18:55:58 GMT + - Tue, 11 May 2021 21:18:51 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_get_properties.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_get_properties.yaml index f79128390f7a..ef8c0d9abdb4 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_get_properties.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_get_properties.yaml @@ -18,7 +18,7 @@ interactions: connection: keep-alive content-length: '222' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:55:59 GMT + date: Tue, 11 May 2021 21:18:52 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -30,7 +30,8 @@ interactions: url: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world - request: body: - grant_type: password + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password scope: repository:library/hello-world:metadata_read service: fake_url.azurecr.io headers: @@ -46,7 +47,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:55:59 GMT + date: Tue, 11 May 2021 21:18:52 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -66,16 +67,16 @@ interactions: response: body: string: '{"registry": "fake_url.azurecr.io", "imageName": "library/hello-world", - "createdTime": "2021-05-05T18:00:19.7101132Z", "lastUpdateTime": "2021-05-05T18:00:17.5345755Z", + "createdTime": "2021-05-11T21:17:45.937904Z", "lastUpdateTime": "2021-05-11T21:17:46.3234919Z", "manifestCount": 10, "tagCount": 5, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "teleportEnabled": false}}' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '326' + content-length: '325' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:55:59 GMT + date: Tue, 11 May 2021 21:18:52 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_manifests.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_manifests.yaml index 8be62e7d3a89..c1e737f498f7 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_manifests.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_manifests.yaml @@ -18,7 +18,7 @@ interactions: connection: keep-alive content-length: '222' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:00 GMT + date: Tue, 11 May 2021 21:18:52 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -30,7 +30,8 @@ interactions: url: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world/_manifests - request: body: - grant_type: password + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password scope: repository:library/hello-world:metadata_read service: fake_url.azurecr.io headers: @@ -46,7 +47,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:00 GMT + date: Tue, 11 May 2021 21:18:53 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -67,60 +68,60 @@ interactions: body: string: '{"registry": "fake_url.azurecr.io", "imageName": "library/hello-world", "manifests": [{"digest": "sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792", - "imageSize": 525, "createdTime": "2021-05-05T18:00:19.9237969Z", "lastUpdateTime": - "2021-05-05T18:00:19.9237969Z", "architecture": "amd64", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.894001Z", "lastUpdateTime": + "2021-05-11T21:17:46.894001Z", "architecture": "amd64", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.0894003Z", "lastUpdateTime": - "2021-05-05T18:00:20.0894003Z", "architecture": "arm", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.5289051Z", "lastUpdateTime": + "2021-05-11T21:17:47.5289051Z", "architecture": "arm", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.9702265Z", "lastUpdateTime": - "2021-05-05T18:00:20.9702265Z", "architecture": "mips64le", "os": "linux", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.1680665Z", "lastUpdateTime": + "2021-05-11T21:17:47.1680665Z", "architecture": "mips64le", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.7515462Z", "lastUpdateTime": - "2021-05-05T18:00:20.7515462Z", "architecture": "arm64", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.4820084Z", "lastUpdateTime": + "2021-05-11T21:17:46.4820084Z", "architecture": "arm64", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d", - "imageSize": 525, "createdTime": "2021-05-05T18:00:21.9872183Z", "lastUpdateTime": - "2021-05-05T18:00:21.9872183Z", "architecture": "ppc64le", "os": "linux", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.4688177Z", "lastUpdateTime": + "2021-05-11T21:17:47.4688177Z", "architecture": "ppc64le", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.5796932Z", "lastUpdateTime": - "2021-05-05T18:00:20.5796932Z", "architecture": "386", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.6387006Z", "lastUpdateTime": + "2021-05-11T21:17:47.6387006Z", "architecture": "386", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf", - "imageSize": 525, "createdTime": "2021-05-05T18:00:19.8200236Z", "lastUpdateTime": - "2021-05-05T18:00:19.8200236Z", "architecture": "s390x", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.9385336Z", "lastUpdateTime": + "2021-05-11T21:17:46.9385336Z", "architecture": "s390x", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9", - "imageSize": 525, "createdTime": "2021-05-05T18:00:20.0067665Z", "lastUpdateTime": - "2021-05-05T18:00:20.0067665Z", "architecture": "arm", "os": "linux", "mediaType": + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.3092689Z", "lastUpdateTime": + "2021-05-11T21:17:46.3092689Z", "architecture": "arm", "os": "linux", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:ea0cfb27fd41ea0405d3095880c1efa45710f5bcdddb7d7d5a7317ad4825ae14", - "imageSize": 1125, "createdTime": "2021-05-05T18:00:28.6381496Z", "lastUpdateTime": - "2021-05-05T18:00:28.6381496Z", "architecture": "amd64", "os": "windows", + "imageSize": 1125, "createdTime": "2021-05-11T21:17:47.7429606Z", "lastUpdateTime": + "2021-05-11T21:17:47.7429606Z", "architecture": "amd64", "os": "windows", "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true, "quarantineState": "Passed"}}, {"digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "imageSize": 5325, "createdTime": "2021-05-05T18:00:19.8821305Z", "lastUpdateTime": - "2021-05-05T18:00:19.8821305Z", "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", + "imageSize": 5325, "createdTime": "2021-05-11T21:17:46.7851308Z", "lastUpdateTime": + "2021-05-11T21:17:46.7851308Z", "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "tags": ["latest", "v1", "v2", "v3", "v4"], "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}]}' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:01 GMT + date: Tue, 11 May 2021 21:18:53 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_repository_names.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_repository_names.yaml index 8fcd4be7be2c..49b898b9e5ee 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_repository_names.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_repository_names.yaml @@ -18,7 +18,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:01 GMT + date: Tue, 11 May 2021 21:18:54 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -30,7 +30,8 @@ interactions: url: https://fake_url.azurecr.io/acr/v1/_catalog - request: body: - grant_type: password + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password scope: registry:catalog:* service: fake_url.azurecr.io headers: @@ -46,7 +47,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:02 GMT + date: Tue, 11 May 2021 21:18:54 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -71,7 +72,7 @@ interactions: connection: keep-alive content-length: '76' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:02 GMT + date: Tue, 11 May 2021 21:18:54 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_repository_names_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_repository_names_by_page.yaml index e7fa72e94305..7dcceb65667b 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_repository_names_by_page.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_repository_names_by_page.yaml @@ -18,7 +18,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:02 GMT + date: Tue, 11 May 2021 21:18:55 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -30,7 +30,8 @@ interactions: url: https://fake_url.azurecr.io/acr/v1/_catalog?n=2 - request: body: - grant_type: password + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password scope: registry:catalog:* service: fake_url.azurecr.io headers: @@ -46,7 +47,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:03 GMT + date: Tue, 11 May 2021 21:18:55 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -71,7 +72,7 @@ interactions: connection: keep-alive content-length: '54' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:03 GMT + date: Tue, 11 May 2021 21:18:55 GMT docker-distribution-api-version: registry/2.0 link: ; rel="next" server: openresty @@ -100,7 +101,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:04 GMT + date: Tue, 11 May 2021 21:18:55 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -112,7 +113,8 @@ interactions: url: https://fake_url.azurecr.io/acr/v1/_catalog?last=library/busybox&n=2&orderby= - request: body: - grant_type: password + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password scope: registry:catalog:* service: fake_url.azurecr.io headers: @@ -128,7 +130,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:04 GMT + date: Tue, 11 May 2021 21:18:55 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -153,7 +155,7 @@ interactions: connection: keep-alive content-length: '41' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:04 GMT + date: Tue, 11 May 2021 21:18:55 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_tags.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_tags.yaml index cf901497c6cf..b8512307277d 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_tags.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_list_tags.yaml @@ -1,4 +1,136 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b2 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world/_manifests + response: + body: + string: '{"errors": [{"code": "UNAUTHORIZED", "message": "authentication required, + visit https://aka.ms/acr/authorization for more information.", "detail": [{"Type": + "repository", "Name": "library/hello-world", "Action": "metadata_read"}]}]}' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '222' + content-type: application/json; charset=utf-8 + date: Tue, 11 May 2021 21:18:56 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" + x-content-type-options: nosniff + status: + code: 401 + message: Unauthorized + url: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world/_manifests +- request: + body: + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password + scope: repository:library/hello-world:metadata_read + service: fake_url.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b2 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/token + response: + body: + string: '{"access_token": "REDACTED"}' + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Tue, 11 May 2021 21:18:56 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://fake_url.azurecr.io/oauth2/token +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b2 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world/_manifests + response: + body: + string: '{"registry": "fake_url.azurecr.io", "imageName": "library/hello-world", + "manifests": [{"digest": "sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792", + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.894001Z", "lastUpdateTime": + "2021-05-11T21:17:46.894001Z", "architecture": "amd64", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.5289051Z", "lastUpdateTime": + "2021-05-11T21:17:47.5289051Z", "architecture": "arm", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.1680665Z", "lastUpdateTime": + "2021-05-11T21:17:47.1680665Z", "architecture": "mips64le", "os": "linux", + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343", + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.4820084Z", "lastUpdateTime": + "2021-05-11T21:17:46.4820084Z", "architecture": "arm64", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.4688177Z", "lastUpdateTime": + "2021-05-11T21:17:47.4688177Z", "architecture": "ppc64le", "os": "linux", + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98", + "imageSize": 525, "createdTime": "2021-05-11T21:17:47.6387006Z", "lastUpdateTime": + "2021-05-11T21:17:47.6387006Z", "architecture": "386", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf", + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.9385336Z", "lastUpdateTime": + "2021-05-11T21:17:46.9385336Z", "architecture": "s390x", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9", + "imageSize": 525, "createdTime": "2021-05-11T21:17:46.3092689Z", "lastUpdateTime": + "2021-05-11T21:17:46.3092689Z", "architecture": "arm", "os": "linux", "mediaType": + "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:ea0cfb27fd41ea0405d3095880c1efa45710f5bcdddb7d7d5a7317ad4825ae14", + "imageSize": 1125, "createdTime": "2021-05-11T21:17:47.7429606Z", "lastUpdateTime": + "2021-05-11T21:17:47.7429606Z", "architecture": "amd64", "os": "windows", + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "changeableAttributes": + {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": + true, "quarantineState": "Passed"}}, {"digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", + "imageSize": 5325, "createdTime": "2021-05-11T21:17:46.7851308Z", "lastUpdateTime": + "2021-05-11T21:17:46.7851308Z", "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", + "tags": ["latest", "v1", "v2", "v3", "v4"], "changeableAttributes": {"deleteEnabled": + true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}]}' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Tue, 11 May 2021 21:18:57 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world/_manifests - request: body: null headers: @@ -18,7 +150,7 @@ interactions: connection: keep-alive content-length: '222' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:05 GMT + date: Tue, 11 May 2021 21:18:57 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -30,7 +162,8 @@ interactions: url: https://fake_url.azurecr.io/acr/v1/library%2Fhello-world/_tags - request: body: - grant_type: password + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password scope: repository:library/hello-world:metadata_read service: fake_url.azurecr.io headers: @@ -46,7 +179,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:06 GMT + date: Tue, 11 May 2021 21:18:57 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -67,23 +200,23 @@ interactions: body: string: '{"registry": "fake_url.azurecr.io", "imageName": "library/hello-world", "tags": [{"name": "latest", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:20.8799521Z", "lastUpdateTime": "2021-05-05T18:00:20.8799521Z", + "createdTime": "2021-05-11T21:17:46.0365675Z", "lastUpdateTime": "2021-05-11T21:17:46.0365675Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}, {"name": "v1", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:24.1188128Z", "lastUpdateTime": "2021-05-05T18:00:24.1188128Z", + "createdTime": "2021-05-11T21:17:48.0232569Z", "lastUpdateTime": "2021-05-11T21:17:48.0232569Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}, {"name": "v2", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:21.3154368Z", "lastUpdateTime": "2021-05-05T18:00:21.3154368Z", + "createdTime": "2021-05-11T21:17:47.2166815Z", "lastUpdateTime": "2021-05-11T21:17:47.2166815Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}, {"name": "v3", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:20.4944944Z", "lastUpdateTime": "2021-05-05T18:00:20.4944944Z", + "createdTime": "2021-05-11T21:17:48.5358052Z", "lastUpdateTime": "2021-05-11T21:17:48.5358052Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}, {"name": "v4", "digest": "sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519", - "createdTime": "2021-05-05T18:00:20.3500586Z", "lastUpdateTime": "2021-05-05T18:00:20.3500586Z", + "createdTime": "2021-05-11T21:17:48.2377521Z", "lastUpdateTime": "2021-05-11T21:17:48.2377521Z", "signed": false, "changeableAttributes": {"deleteEnabled": true, "writeEnabled": true, "readEnabled": true, "listEnabled": true}}]}' headers: @@ -91,7 +224,7 @@ interactions: connection: keep-alive content-length: '1631' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:06 GMT + date: Tue, 11 May 2021 21:18:57 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_transport_closed_only_once.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_transport_closed_only_once.yaml index 67a14fba0fab..335360db87cd 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_transport_closed_only_once.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_anon_access_async.test_transport_closed_only_once.yaml @@ -18,7 +18,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:07 GMT + date: Tue, 11 May 2021 21:18:58 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -30,7 +30,8 @@ interactions: url: https://fake_url.azurecr.io/acr/v1/_catalog - request: body: - grant_type: password + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password scope: registry:catalog:* service: fake_url.azurecr.io headers: @@ -46,7 +47,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:08 GMT + date: Tue, 11 May 2021 21:18:58 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -71,7 +72,7 @@ interactions: connection: keep-alive content-length: '76' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:08 GMT + date: Tue, 11 May 2021 21:18:58 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -99,7 +100,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:08 GMT + date: Tue, 11 May 2021 21:18:58 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -111,7 +112,8 @@ interactions: url: https://fake_url.azurecr.io/acr/v1/_catalog - request: body: - grant_type: password + grant_type: !!python/object/apply:azure.containerregistry._generated.models._container_registry_enums.TokenGrantType + - password scope: registry:catalog:* service: fake_url.azurecr.io headers: @@ -127,7 +129,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:08 GMT + date: Tue, 11 May 2021 21:18:58 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -152,7 +154,7 @@ interactions: connection: keep-alive content-length: '76' content-type: application/json; charset=utf-8 - date: Sun, 09 May 2021 18:56:08 GMT + date: Tue, 11 May 2021 21:18:58 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/test_anon_access.py b/sdk/containerregistry/azure-containerregistry/tests/test_anon_access.py index 2782942e9160..b8dba437819b 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/test_anon_access.py +++ b/sdk/containerregistry/azure-containerregistry/tests/test_anon_access.py @@ -129,7 +129,8 @@ def test_list_tags(self, containerregistry_anonregistry_endpoint): container_repository = client.get_repository(HELLO_WORLD) assert container_repository._credential is None - registry_artifact = container_repository.get_artifact("latest") + for manifest in container_repository.list_manifests(): + registry_artifact = container_repository.get_artifact(manifest.digest) assert registry_artifact._credential is None count = 0 diff --git a/sdk/containerregistry/azure-containerregistry/tests/test_anon_access_async.py b/sdk/containerregistry/azure-containerregistry/tests/test_anon_access_async.py index 0f109df99e26..ab4a1bec86ca 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/test_anon_access_async.py +++ b/sdk/containerregistry/azure-containerregistry/tests/test_anon_access_async.py @@ -125,7 +125,8 @@ async def test_list_tags(self, containerregistry_anonregistry_endpoint): container_repository = client.get_repository(HELLO_WORLD) assert container_repository._credential is None - registry_artifact = container_repository.get_artifact("latest") + async for manifest in container_repository.list_manifests(): + registry_artifact = container_repository.get_artifact(manifest.digest) assert registry_artifact._credential is None count = 0 diff --git a/sdk/containerregistry/azure-containerregistry/tests/testcase.py b/sdk/containerregistry/azure-containerregistry/tests/testcase.py index db0b4e33b629..c796a46b7f14 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/testcase.py +++ b/sdk/containerregistry/azure-containerregistry/tests/testcase.py @@ -320,6 +320,27 @@ def import_image(repository, tags): while not result.done(): pass + # Do the same for anonymous + mgmt_client = ContainerRegistryManagementClient( + DefaultAzureCredential(), os.environ["CONTAINERREGISTRY_SUBSCRIPTION_ID"] + ) + registry_uri = "registry.hub.docker.com" + rg_name = os.environ["CONTAINERREGISTRY_RESOURCE_GROUP"] + registry_name = os.environ["CONTAINERREGISTRY_ANONREGISTRY_NAME"] + + import_source = ImportSource(source_image=repository, registry_uri=registry_uri) + + import_params = ImportImageParameters(mode=ImportMode.Force, source=import_source, target_tags=tags) + + result = mgmt_client.registries.begin_import_image( + rg_name, + registry_name, + parameters=import_params, + ) + + while not result.done(): + pass + @pytest.fixture(scope="session") def load_registry():