@@ -75,6 +75,9 @@ type ACL struct {
7575 Postures map [string ][]string `json:"postures,omitempty" hujson:"Postures,omitempty"`
7676 DefaultSourcePosture []string `json:"defaultSrcPosture,omitempty" hujson:"DefaultSrcPosture,omitempty"`
7777
78+ // AttrConfig maps attribute names to their configuration for custom device attributes.
79+ AttrConfig map [string ]ACLAttrConfig `json:"attrConfig,omitempty" hujson:"AttrConfig,omitempty"`
80+
7881 // ETag is the etag corresponding to this version of the ACL
7982 ETag string `json:"-"`
8083}
@@ -160,6 +163,16 @@ type NodeAttrGrantApp struct {
160163 Domains []string `json:"domains,omitempty" hujson:"Domains,omitempty"`
161164}
162165
166+ // ACLAttrConfig represents configuration for a custom device attribute.
167+ type ACLAttrConfig struct {
168+ // Type can be one of "string", "bool", or "number".
169+ Type string `json:"type,omitempty" hujson:"Type,omitempty"`
170+ // AllowSetByNode indicates if nodes can set this attribute via LocalAPI.
171+ AllowSetByNode bool `json:"allowSetByNode,omitempty" hujson:"AllowSetByNode,omitempty"`
172+ // BroadcastToPeers is a list of destinations which should receive this attribute value, e.g. ["tag:admin"].
173+ BroadcastToPeers []string `json:"broadcastToPeers,omitempty" hujson:"BroadcastToPeers,omitempty"`
174+ }
175+
163176// Get retrieves the [ACL] that is currently set for the tailnet.
164177func (pr * PolicyFileResource ) Get (ctx context.Context ) (* ACL , error ) {
165178 req , err := pr .buildRequest (ctx , http .MethodGet , pr .buildTailnetURL ("acl" ))
0 commit comments