@@ -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,16 @@ 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 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
+
162
175
// Get retrieves the [ACL] that is currently set for the tailnet.
163
176
func (pr * PolicyFileResource ) Get (ctx context.Context ) (* ACL , error ) {
164
177
req , err := pr .buildRequest (ctx , http .MethodGet , pr .buildTailnetURL ("acl" ))
0 commit comments