From 03f22cd9fab835630bdbefb6bcfe96838d6a3a0f Mon Sep 17 00:00:00 2001 From: Paul Scott Date: Mon, 30 Oct 2023 21:09:34 +0000 Subject: [PATCH] client/tailscale: add Device.PostureIdentity field New API fields being added in tailscale/corp#15445. Updates tailscale/corp#15203 Signed-off-by: Paul Scott --- client/tailscale/devices.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/tailscale/devices.go b/client/tailscale/devices.go index e75f9ea17..108a70aff 100644 --- a/client/tailscale/devices.go +++ b/client/tailscale/devices.go @@ -71,6 +71,17 @@ type Device struct { AdvertisedRoutes []string `json:"advertisedRoutes"` // Empty for external devices. ClientConnectivity *ClientConnectivity `json:"clientConnectivity"` + + // PostureIdentity contains extra identifiers collected from the device when + // the tailnet has the device posture identification features enabled. If + // Tailscale have attempted to collect this from the device but it has not + // opted in, PostureIdentity will have Disabled=true. + PostureIdentity *DevicePostureIdentity `json:"postureIdentity"` +} + +type DevicePostureIdentity struct { + Disabled bool `json:"disabled,omitempty"` + SerialNumbers []string `json:"serialNumbers,omitempty"` } // DeviceFieldsOpts determines which fields should be returned in the response.