types,mapper,integration: enable Taildrive and add cap/drive grant lifecycle test

Add NodeAttrsTaildriveShare and NodeAttrsTaildriveAccess to the node capability map, enabling Taildrive file sharing when granted via policy. Add integration test verifying the full cap/drive grant lifecycle.

Updates #2180
This commit is contained in:
Kristoffer Dalby
2026-03-23 09:43:30 +00:00
parent 9b1a6b6c05
commit d243adaedd
4 changed files with 494 additions and 9 deletions

View File

@@ -1144,6 +1144,12 @@ func (nv NodeView) TailNode(
capMap[tailcfg.CapabilityFileSharing] = []tailcfg.RawMessage{}
}
// Enable Taildrive sharing and access on all nodes. The actual
// access control is enforced by cap/drive grants in FilterRules;
// without a matching grant these attributes alone do nothing.
capMap[tailcfg.NodeAttrsTaildriveShare] = []tailcfg.RawMessage{}
capMap[tailcfg.NodeAttrsTaildriveAccess] = []tailcfg.RawMessage{}
tNode := tailcfg.Node{
//nolint:gosec // G115: NodeID values are within int64 range
ID: tailcfg.NodeID(nv.ID()),