Skip to content

Commit 258e6aa

Browse files
committed
policyfile: add AttrConfig support to ACLDetails
Signed-off-by: Raj Singh <[email protected]>
1 parent d51fc60 commit 258e6aa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

policyfile.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ 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 map[string]*ACLAttrConfig `json:"attrConfig,omitempty" hujson:"AttrConfig,omitempty"`
78+
7779
// ETag is the etag corresponding to this version of the ACL
7880
ETag string `json:"-"`
7981
}
@@ -159,6 +161,12 @@ type NodeAttrGrantApp struct {
159161
Domains []string `json:"domains,omitempty" hujson:"Domains,omitempty"`
160162
}
161163

164+
type ACLAttrConfig struct {
165+
Type string `json:"type,omitempty" hujson:"Type,omitempty"`
166+
AllowSetByNode bool `json:"allowSetByNode,omitempty" hujson:"AllowSetByNode,omitempty"`
167+
BroadcastToPeers []string `json:"broadcastToPeers,omitempty" hujson:"BroadcastToPeers,omitempty"`
168+
}
169+
162170
// Get retrieves the [ACL] that is currently set for the tailnet.
163171
func (pr *PolicyFileResource) Get(ctx context.Context) (*ACL, error) {
164172
req, err := pr.buildRequest(ctx, http.MethodGet, pr.buildTailnetURL("acl"))

0 commit comments

Comments
 (0)