-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
microsoft.genpolicy: log image reference on unauthorized access
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...name/microsoft/genpolicy/0008-genpolicy-include-reference-in-logs-when-auth-failure.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: jmxnzo <[email protected]> | ||
Date: Mon, 2 Dec 2024 12:38:04 +0100 | ||
Subject: [PATCH] genpolicy: include reference in logs when auth failure | ||
|
||
--- | ||
src/tools/genpolicy/src/registry.rs | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/tools/genpolicy/src/registry.rs b/src/tools/genpolicy/src/registry.rs | ||
index bdce2d40e3a7c3ec34137ceb3685fcc94aedcb39..9aa1cde98cd28a8c78d652986408e7738e5d96d6 100644 | ||
--- a/src/tools/genpolicy/src/registry.rs | ||
+++ b/src/tools/genpolicy/src/registry.rs | ||
@@ -125,7 +125,7 @@ impl Container { | ||
}) | ||
} | ||
Err(oci_distribution::errors::OciDistributionError::AuthenticationFailure(message)) => { | ||
- panic!("Container image registry authentication failure ({}). Are docker credentials set-up for current user?", &message); | ||
+ panic!("Container image registry authentication failure ({}) for {}. Are docker credentials set-up for current user?", &message, &reference.whole().as_str()); | ||
} | ||
Err(e) => { | ||
panic!( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters