From 384c6621ef60c95e5211717e5f924e406885fdef Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 23 Nov 2026 12:37:11 +0100 Subject: [PATCH] wimseagent: find the identity agent via the varlink registry The default socket for the identity agent was hardcoded to the real location of the socket in amutablectl. So moving it there needs a matching change here. This commit moves the default to the symlink that the amutablectl socket unit creates in /run/varlink/registry. The permissions are on the socket, so access control is not affected. Signed-off-by: Michael Vogt --- contrib/quarry-client/config.toml | 8 ++++---- internal/wimseagent/witcred.go | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/contrib/quarry-client/config.toml b/contrib/quarry-client/config.toml index 11500e5..b6c4f9c 100644 --- a/contrib/quarry-client/config.toml +++ b/contrib/quarry-client/config.toml @@ -83,8 +83,8 @@ cache_dir = "/var/lib/quarry-client/latest-metadata" ## request then carries the machine's WIMSE workload identity token for ## "wit_audience", from the varlink service at "varlink" implementing ## com.amutable.IdentityAgent (default: amutablectl's, at -## unix:/run/amutable/com.amutable.IdentityAgent), and an RFC 9421 signature -## by a key quarry-client holds in memory and the token binds. The signature -## is for "wimse_audience" (default: the URL of the request). Redirects are -## not signed. "wimse" is the only supported type. +## unix:/run/varlink/registry/com.amutable.IdentityAgent), and an RFC 9421 +## signature by a key quarry-client holds in memory and the token binds. The +## signature is for "wimse_audience" (default: the URL of the request). +## Redirects are not signed. "wimse" is the only supported type. #auth = { type = "wimse", wit_audience = "urn:amutable:quarry-worker" } diff --git a/internal/wimseagent/witcred.go b/internal/wimseagent/witcred.go index 0fbd771..2274c2c 100644 --- a/internal/wimseagent/witcred.go +++ b/internal/wimseagent/witcred.go @@ -115,8 +115,9 @@ const refreshMargin = 5 * time.Minute const vlInterface = "com.amutable.IdentityAgent" -// DefaultSocketURI is the varlink URI of amutablectl's identity agent. -const DefaultSocketURI = "unix:/run/amutable/" + vlInterface +// DefaultSocketURI is the varlink URI of amutablectl's identity agent, via +// its entry in the varlink registry. +const DefaultSocketURI = "unix:/run/varlink/registry/" + vlInterface type witParams struct { Audience string `json:"aud"`