@@ -74,6 +74,9 @@ type ACL struct {
74
74
Postures map [string ][]string `json:"postures,omitempty" hujson:"Postures,omitempty"`
75
75
DefaultSourcePosture []string `json:"defaultSrcPosture,omitempty" hujson:"DefaultSrcPosture,omitempty"`
76
76
77
+ // AttrConfig maps attribute names to their configuration for custom device attributes.
78
+ AttrConfig map [string ]ACLAttrConfig `json:"attrConfig,omitempty" hujson:"AttrConfig,omitempty"`
79
+
77
80
// ETag is the etag corresponding to this version of the ACL
78
81
ETag string `json:"-"`
79
82
}
@@ -159,6 +162,15 @@ type NodeAttrGrantApp struct {
159
162
Domains []string `json:"domains,omitempty" hujson:"Domains,omitempty"`
160
163
}
161
164
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
+
162
174
// Get retrieves the [ACL] that is currently set for the tailnet.
163
175
func (pr * PolicyFileResource ) Get (ctx context.Context ) (* ACL , error ) {
164
176
req , err := pr .buildRequest (ctx , http .MethodGet , pr .buildTailnetURL ("acl" ))
0 commit comments