Skip to content

Commit 5f2fd86

Browse files
committed
docs: add TODO for ARM token exposure on azcmagent command line
azcmagent only supports --access-token via argv, which exposes the token through /proc/<pid>/cmdline to all local users. The token is short-lived (~60 minutes) which limits the window, but it is still observable during registration. Document this as a known limitation with a pointer to alternative auth methods (service principal certificate, Azure CLI).
1 parent d5df303 commit 5f2fd86

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

components/arc/v20260301/arc_registration.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,13 @@ func (a *installArcAction) addAuthenticationArgs(ctx context.Context, args *[]st
164164
return fmt.Errorf("failed to get access token: %w", err)
165165
}
166166

167-
// Add access token to azcmagent arguments
167+
// TODO(security): The access token is passed on the command line and is therefore visible
168+
// to all local users via /proc/<pid>/cmdline for the lifetime of the azcmagent process.
169+
// The token is short-lived (~60 minutes) which limits the exposure window, but it is
170+
// still observable during the registration process. azcmagent does not currently support
171+
// reading the token from stdin or an environment variable.
172+
// Consider switching to --service-principal-cert or --use-azcli when feasible.
173+
// See: https://learn.microsoft.com/en-us/azure/azure-arc/servers/azcmagent-connect
168174
*args = append(*args, "--access-token", accessToken)
169175

170176
a.logger.Debug("Authentication arguments added to Arc agent command")

0 commit comments

Comments
 (0)