mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-24 17:48:49 +02:00
Strip fields not consumed by any test from all 594 HuJSON test data files:
grant_results/ (248 files, 21MB -> 1.8MB):
- Remove: timestamp, propagation_wait_seconds, input.policy_file,
input.grants_section, input.api_endpoint, input.api_method,
topology.nodes.mts_name, topology.nodes.socket, topology.nodes.user_id,
captures.commands, captures.packet_filter_matches, captures.whois
- V14-V16, V26-V36: keep stripped netmap (Peers.Name/AllowedIPs/PrimaryRoutes
+ PacketFilterRules) for via_compat_test.go compatibility
- V17-V25: strip netmap (old topology, incompatible with via_compat harness)
acl_results/ (215 files, 1.4MB -> 1.2MB):
- Remove: timestamp, propagation_wait_seconds, input.policy_file,
input.api_endpoint, input.api_response_code, entire topology section
(parsed by Go struct but completely ignored — nodes are hardcoded)
routes_results/ (92 files, unchanged — topology is actively used):
- Remove: timestamp, propagation_wait_seconds, input.policy_file,
input.api_endpoint, input.api_response_code
ssh_results/ (39 files, unchanged — minimal to begin with):
- Remove: policy_file
168 lines
3.4 KiB
Plaintext
168 lines
3.4 KiB
Plaintext
// ACL-A13
|
|
//
|
|
// ACL: accept: src=['*'] dst=['autogroup:self:80-443']
|
|
//
|
|
// Expected: Rules on user-kris, user-mon, user1
|
|
{
|
|
"test_id": "ACL-A13",
|
|
"input": {
|
|
"full_policy": {
|
|
"groups": {
|
|
"group:admins": [
|
|
"kratail2tid@passkey"
|
|
],
|
|
"group:developers": [
|
|
"kristoffer@dalby.cc",
|
|
"kratail2tid@passkey"
|
|
],
|
|
"group:monitors": [
|
|
"monitorpasskeykradalby@passkey"
|
|
],
|
|
"group:empty": []
|
|
},
|
|
"tagOwners": {
|
|
"tag:server": [
|
|
"kratail2tid@passkey"
|
|
],
|
|
"tag:prod": [
|
|
"kratail2tid@passkey"
|
|
],
|
|
"tag:client": [
|
|
"kratail2tid@passkey"
|
|
],
|
|
"tag:router": [
|
|
"kratail2tid@passkey"
|
|
],
|
|
"tag:exit": [
|
|
"kratail2tid@passkey"
|
|
]
|
|
},
|
|
"hosts": {
|
|
"webserver": "100.108.74.26",
|
|
"prodbox": "100.103.8.15",
|
|
"internal": "10.0.0.0/8",
|
|
"subnet24": "192.168.1.0/24"
|
|
},
|
|
"autoApprovers": {
|
|
"routes": {
|
|
"10.33.0.0/16": [
|
|
"tag:router"
|
|
],
|
|
"0.0.0.0/0": [
|
|
"tag:exit"
|
|
],
|
|
"::/0": [
|
|
"tag:exit"
|
|
]
|
|
}
|
|
},
|
|
"acls": [
|
|
{
|
|
"action": "accept",
|
|
"src": [
|
|
"*"
|
|
],
|
|
"dst": [
|
|
"autogroup:self:80-443"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"captures": {
|
|
"exit-node": {
|
|
"packet_filter_rules": null
|
|
},
|
|
"subnet-router": {
|
|
"packet_filter_rules": null
|
|
},
|
|
"tagged-client": {
|
|
"packet_filter_rules": null
|
|
},
|
|
"tagged-prod": {
|
|
"packet_filter_rules": null
|
|
},
|
|
"tagged-server": {
|
|
"packet_filter_rules": null
|
|
},
|
|
"user-kris": {
|
|
"packet_filter_rules": [
|
|
{
|
|
"SrcIPs": [
|
|
"100.110.121.96",
|
|
"fd7a:115c:a1e0::1737:7960"
|
|
],
|
|
"DstPorts": [
|
|
{
|
|
"IP": "100.110.121.96",
|
|
"Ports": {
|
|
"First": 80,
|
|
"Last": 443
|
|
}
|
|
},
|
|
{
|
|
"IP": "fd7a:115c:a1e0::1737:7960",
|
|
"Ports": {
|
|
"First": 80,
|
|
"Last": 443
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"user-mon": {
|
|
"packet_filter_rules": [
|
|
{
|
|
"SrcIPs": [
|
|
"100.103.90.82",
|
|
"fd7a:115c:a1e0::9e37:5a52"
|
|
],
|
|
"DstPorts": [
|
|
{
|
|
"IP": "100.103.90.82",
|
|
"Ports": {
|
|
"First": 80,
|
|
"Last": 443
|
|
}
|
|
},
|
|
{
|
|
"IP": "fd7a:115c:a1e0::9e37:5a52",
|
|
"Ports": {
|
|
"First": 80,
|
|
"Last": 443
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"user1": {
|
|
"packet_filter_rules": [
|
|
{
|
|
"SrcIPs": [
|
|
"100.90.199.68",
|
|
"fd7a:115c:a1e0::2d01:c747"
|
|
],
|
|
"DstPorts": [
|
|
{
|
|
"IP": "100.90.199.68",
|
|
"Ports": {
|
|
"First": 80,
|
|
"Last": 443
|
|
}
|
|
},
|
|
{
|
|
"IP": "fd7a:115c:a1e0::2d01:c747",
|
|
"Ports": {
|
|
"First": 80,
|
|
"Last": 443
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|