do not send resource policies map over the wire

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Dmitri Dolguikh
2026-07-27 19:00:30 +02:00
parent a6603a2e0a
commit 2af3a5fba5
7 changed files with 743 additions and 469 deletions
File diff suppressed because it is too large Load Diff
+15 -6
View File
@@ -1066,16 +1066,23 @@ message PolicyCompact {
repeated string source_posture_check_ids = 13;
}
enum ResourceCompactType {
unknown_type = 0; //placeholder
peer = 1;
domain = 2;
host = 3;
subnet = 4;
}
// ResourceCompact mirrors types.Resource. Used by PolicyCompact to carry
// rule.SourceResource / rule.DestinationResource when the rule targets a
// specific resource (typically a peer) rather than groups.
// peer_index_set tells whether peer_index is valid (proto3 uint32 cannot
// disambiguate "0" from "unset"); set only when type == "peer".
message ResourceCompact {
string type = 1;
bool peer_index_set = 2;
uint32 peer_index = 3;
reserved 4; // future: host/subnet/domain references when needed
ResourceCompactType type = 1;
oneof resource_id {
string id = 2; // for domain/host/subnet resources
uint32 peer_index = 3; // for peers
}
}
// UserNameList is a list of local-user names — used as the value type in
@@ -1099,6 +1106,8 @@ message GroupCompact {
// groups lose that property and the two sides expand policy
// destinations differently.
bool is_all = 3;
repeated ResourceCompact resources = 4;
}
// DNSSettingsCompact mirrors types.DNSSettings.