@@ -77,6 +77,9 @@ type ACL struct {
7777 Postures map [string ][]string `json:"postures,omitempty" hujson:"Postures,omitempty"`
7878 DefaultSourcePosture []string `json:"defaultSrcPosture,omitempty" hujson:"DefaultSrcPosture,omitempty"`
7979
80+ // AttrConfig maps attribute names to their configuration for custom device attributes.
81+ AttrConfig map [string ]ACLAttrConfig `json:"attrConfig,omitempty" hujson:"AttrConfig,omitempty"`
82+
8083 // ETag is the etag corresponding to this version of the ACL
8184 ETag string `json:"-"`
8285}
@@ -171,6 +174,16 @@ type Grant struct {
171174 Via []string `json:"via,omitempty" hujson:"Via,omitempty"`
172175}
173176
177+ // ACLAttrConfig represents configuration for a custom device attribute.
178+ type ACLAttrConfig struct {
179+ // Type can be one of "string", "bool", or "number".
180+ Type string `json:"type,omitempty" hujson:"Type,omitempty"`
181+ // AllowSetByNode indicates if nodes can set this attribute via LocalAPI.
182+ AllowSetByNode bool `json:"allowSetByNode,omitempty" hujson:"AllowSetByNode,omitempty"`
183+ // BroadcastToPeers is a list of destinations which should receive this attribute value, e.g. ["tag:admin"].
184+ BroadcastToPeers []string `json:"broadcastToPeers,omitempty" hujson:"BroadcastToPeers,omitempty"`
185+ }
186+
174187// Get retrieves the [ACL] that is currently set for the tailnet.
175188func (pr * PolicyFileResource ) Get (ctx context.Context ) (* ACL , error ) {
176189 req , err := pr .buildRequest (ctx , http .MethodGet , pr .buildTailnetURL ("acl" ))
0 commit comments