[client] Authorize daemon IPC callers by their local identity (#6967)

This commit is contained in:
Viktor Liu
2026-07-29 20:32:26 +02:00
committed by GitHub
parent 0b7e6a9f46
commit 0f5d2d91fb
58 changed files with 3799 additions and 167 deletions
+7
View File
@@ -746,6 +746,13 @@ func (config *Config) applyMDMPolicy(policy *mdm.Policy) {
// appended for https or ":80" for http. The serviceName parameter is
// used to contextualise error messages. On success returns the parsed
// *url.URL; on failure returns a non-nil error.
// ParseServiceURL normalises a service URL exactly as the config layer does when
// it stores one, so callers comparing a requested URL against a stored one do not
// have to reimplement the scheme validation and default-port handling.
func ParseServiceURL(serviceName, serviceURL string) (*url.URL, error) {
return parseURL(serviceName, serviceURL)
}
func parseURL(serviceName, serviceURL string) (*url.URL, error) {
parsedMgmtURL, err := url.ParseRequestURI(serviceURL)
if err != nil {