@@ -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,15 @@ 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 string `json:"type,omitempty" hujson:"Type,omitempty"`
168+ // AllowSetByNode indicates if nodes can set this attribute via LocalAPI.
169+ AllowSetByNode bool `json:"allowSetByNode,omitempty" hujson:"AllowSetByNode,omitempty"`
170+ // BroadcastToPeers lists which nodes should receive this attribute value.
171+ BroadcastToPeers []string `json:"broadcastToPeers,omitempty" hujson:"BroadcastToPeers,omitempty"`
172+ }
173+
162174// Get retrieves the [ACL] that is currently set for the tailnet.
163175func (pr * PolicyFileResource ) Get (ctx context.Context ) (* ACL , error ) {
164176 req , err := pr .buildRequest (ctx , http .MethodGet , pr .buildTailnetURL ("acl" ))
0 commit comments