Skip to content

Comments

basic prototype#1

Merged
shizhMSFT merged 14 commits intomasterfrom
prototype
Jul 17, 2020
Merged

basic prototype#1
shizhMSFT merged 14 commits intomasterfrom
prototype

Conversation

@shizhMSFT
Copy link
Owner

No description provided.

@shizhMSFT shizhMSFT requested a review from avtakkar July 17, 2020 06:46
@shizhMSFT shizhMSFT merged commit 8d4858f into master Jul 17, 2020
@shizhMSFT shizhMSFT deleted the prototype branch July 17, 2020 06:47
shizhMSFT added a commit that referenced this pull request Jul 25, 2020
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
avtakkar referenced this pull request in avtakkar/nv2 Jul 30, 2020
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
shizhMSFT pushed a commit that referenced this pull request Feb 18, 2026
Pending on notaryproject#1260

Fix:
- updated timestamp to UTC with nanosecond
- added new line after request and response log

Previous example:
```
DEBU[2025-04-14T07:42:25Z] Request #0
> Request: "HEAD" "https://notationreg.azurecr.io/v2/hello/manifests/v1"
> Request headers:
   "Accept": "application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, application/vnd.oci.artifact.manifest.v1+json"
   "User-Agent": "notation/v2.0.0-alpha.1+unreleased"
DEBU[2025-04-14T07:42:26Z] Response #0
< Response status: "401 Unauthorized"
< Response headers:
   "Content-Length": "199"
   "X-Content-Type-Options": "nosniff"
   "Date": "Mon, 14 Apr 2025 07:42:26 GMT"
   "Server": "AzureContainerRegistry"
   "Connection": "keep-alive"
   "Strict-Transport-Security": "max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains"
   "Content-Type": "application/json; charset=utf-8"
   "Access-Control-Expose-Headers": "Docker-Content-Digest, WWW-Authenticate, Link, X-Ms-Correlation-Request-Id"
   "Docker-Distribution-Api-Version": "registry/2.0"
   "Www-Authenticate": "Bearer realm=\"https://notationreg.azurecr.io/oauth2/token\",service=\"notationreg.azurecr.io\",scope=\"repository:hello:pull\""
   "X-Ms-Correlation-Request-Id": "df5ee6ff-0afb-47d6-ab98-6835c2e41f8a"
DEBU[2025-04-14T07:42:26Z] Request #1
> Request: "POST" "https://notationreg.azurecr.io/oauth2/token"
> Request headers:
   "Content-Type": "application/x-www-form-urlencoded"
   "User-Agent": "notation/v2.0.0-alpha.1+unreleased"
```

Current example:
```                  
notation sign notationreg.azurecr.io/hello:v1 -d
DEBU[2025-05-12 07:41:42.720229189Z] Request #0
> Request: "HEAD" "https://notationreg.azurecr.io/v2/hello/manifests/v1"
> Request headers:
   "Accept": "application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, application/vnd.oci.artifact.manifest.v1+json"
   "User-Agent": "notation/v2.0.0-alpha.1+unreleased"


DEBU[2025-05-12 07:41:43.248214367Z] Response #0
< Response status: "401 Unauthorized"
< Response headers:
   "Date": "Mon, 12 May 2025 07:41:43 GMT"
   "Server": "AzureContainerRegistry"
   "Access-Control-Expose-Headers": "Docker-Content-Digest, WWW-Authenticate, Link, X-Ms-Correlation-Request-Id"
   "Docker-Distribution-Api-Version": "registry/2.0"
   "Strict-Transport-Security": "max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains"
   "X-Content-Type-Options": "nosniff"
   "X-Ms-Correlation-Request-Id": "0c11d32c-4ffe-480c-acb3-8d145a83a87e"
   "Content-Type": "application/json; charset=utf-8"
   "Content-Length": "199"
   "Connection": "keep-alive"
   "Www-Authenticate": "Bearer realm=\"https://notationreg.azurecr.io/oauth2/token\",service=\"notationreg.azurecr.io\",scope=\"repository:hello:pull\""


DEBU[2025-05-12 07:41:43.248394566Z] Request #1
> Request: "POST" "https://notationreg.azurecr.io/oauth2/token"
> Request headers:
   "Content-Type": "application/x-www-form-urlencoded"
   "User-Agent": "notation/v2.0.0-alpha.1+unreleased"


DEBU[2025-05-12 07:41:43.414852708Z] Response #1
< Response status: "200 OK"
< Response headers:
   "Connection": "keep-alive"
   "X-Ms-Correlation-Request-Id": "d4baeae0-e47e-4b6f-8767-a7002229a1d6"
   "X-Ms-Ratelimit-Remaining-Calls-Per-Second": "333.316667"
   "Strict-Transport-Security": "max-age=31536000; includeSubDomains"
   "Server": "AzureContainerRegistry"
   "Date": "Mon, 12 May 2025 07:41:43 GMT"
   "Content-Type": "application/json; charset=utf-8"
```

Color:

![image](https://github.com/user-attachments/assets/6a54c33e-2f84-4e4b-a88a-49f1877a2b29)

![image](https://github.com/user-attachments/assets/08173d5c-4327-4545-8ee1-7be94babde18)

![image](https://github.com/user-attachments/assets/c9bc1270-58bd-42f8-9fcf-819779a16687)

![image](https://github.com/user-attachments/assets/2c3a85b9-5118-4e19-9ae1-7457174a934a)

Resolve part of notaryproject#1247

---------

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant