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