summaryrefslogtreecommitdiff
path: root/dev-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/azure-identity/azure-identity-1.13.0-r1.ebuild (renamed from dev-cpp/azure-identity/azure-identity-1.13.0.ebuild)4
-rw-r--r--dev-cpp/azure-identity/files/azure-identity-imds-double-slash.patch22
2 files changed, 26 insertions, 0 deletions
diff --git a/dev-cpp/azure-identity/azure-identity-1.13.0.ebuild b/dev-cpp/azure-identity/azure-identity-1.13.0-r1.ebuild
index 79814f2229e7..eb21aada9a90 100644
--- a/dev-cpp/azure-identity/azure-identity-1.13.0.ebuild
+++ b/dev-cpp/azure-identity/azure-identity-1.13.0-r1.ebuild
@@ -30,6 +30,10 @@ BDEPEND="
doc? ( app-text/doxygen )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-imds-double-slash.patch
+)
+
src_configure() {
local mycmakeargs=(
-DBUILD_DOCUMENTATION=$(usex doc)
diff --git a/dev-cpp/azure-identity/files/azure-identity-imds-double-slash.patch b/dev-cpp/azure-identity/files/azure-identity-imds-double-slash.patch
new file mode 100644
index 000000000000..f6b47be1ad6f
--- /dev/null
+++ b/dev-cpp/azure-identity/files/azure-identity-imds-double-slash.patch
@@ -0,0 +1,22 @@
+From 72f327b2c19afffa9df2ce0ef817c13b3dd75804 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <jlecuirot@microsoft.com>
+Date: Wed, 13 Aug 2025 15:52:31 +0100
+Subject: [PATCH] Fix IMDS token requests for managed identities
+
+This was broken by a035ee5f9416ef9188533de40b4ab1c37fb7c0af, which
+accidentally constructed the IMDS URL with a double slash at the start
+of the path. This is not properly routed on the server side, leading to
+a 404 error with some very misleading XML.
+
+Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
+--- a/src/managed_identity_source.cpp
++++ b/src/managed_identity_source.cpp
+@@ -527,7 +527,7 @@ std::unique_ptr<ManagedIdentitySource> ImdsManagedIdentitySource::Create(
+
+ imdsUrl = Core::Url{imdsEndpointEnvVarValue};
+ }
+- imdsUrl.SetPath("/metadata/identity/oauth2/token");
++ imdsUrl.SetPath("metadata/identity/oauth2/token");
+
+ return std::unique_ptr<ManagedIdentitySource>(
+ new ImdsManagedIdentitySource(clientId, objectId, resourceId, imdsUrl, options));