mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-24 09:38:45 +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
199 lines
4.2 KiB
Plaintext
199 lines
4.2 KiB
Plaintext
// ACL-AR02
|
|
//
|
|
// ACLs:
|
|
// accept: src=['tag:client'] dst=['tag:server:22']
|
|
// accept: src=['tag:client'] dst=['tag:server:80,443']
|
|
// accept: src=['*'] dst=['tag:server:53'] proto=udp
|
|
//
|
|
// Expected: Rules on tagged-server
|
|
{
|
|
"test_id": "ACL-AR02",
|
|
"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": [
|
|
"tag:client"
|
|
],
|
|
"dst": [
|
|
"tag:server:22"
|
|
]
|
|
},
|
|
{
|
|
"action": "accept",
|
|
"src": [
|
|
"tag:client"
|
|
],
|
|
"dst": [
|
|
"tag:server:80,443"
|
|
]
|
|
},
|
|
{
|
|
"action": "accept",
|
|
"src": [
|
|
"*"
|
|
],
|
|
"proto": "udp",
|
|
"dst": [
|
|
"tag:server:53"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"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": [
|
|
{
|
|
"SrcIPs": [
|
|
"100.83.200.69",
|
|
"fd7a:115c:a1e0::c537:c845"
|
|
],
|
|
"DstPorts": [
|
|
{
|
|
"IP": "100.108.74.26",
|
|
"Ports": {
|
|
"First": 22,
|
|
"Last": 22
|
|
}
|
|
},
|
|
{
|
|
"IP": "fd7a:115c:a1e0::b901:4a87",
|
|
"Ports": {
|
|
"First": 22,
|
|
"Last": 22
|
|
}
|
|
},
|
|
{
|
|
"IP": "100.108.74.26",
|
|
"Ports": {
|
|
"First": 80,
|
|
"Last": 80
|
|
}
|
|
},
|
|
{
|
|
"IP": "100.108.74.26",
|
|
"Ports": {
|
|
"First": 443,
|
|
"Last": 443
|
|
}
|
|
},
|
|
{
|
|
"IP": "fd7a:115c:a1e0::b901:4a87",
|
|
"Ports": {
|
|
"First": 80,
|
|
"Last": 80
|
|
}
|
|
},
|
|
{
|
|
"IP": "fd7a:115c:a1e0::b901:4a87",
|
|
"Ports": {
|
|
"First": 443,
|
|
"Last": 443
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"SrcIPs": [
|
|
"10.33.0.0/16",
|
|
"100.115.94.0-100.127.255.255",
|
|
"100.64.0.0-100.115.91.255",
|
|
"fd7a:115c:a1e0::/48"
|
|
],
|
|
"DstPorts": [
|
|
{
|
|
"IP": "100.108.74.26",
|
|
"Ports": {
|
|
"First": 53,
|
|
"Last": 53
|
|
}
|
|
},
|
|
{
|
|
"IP": "fd7a:115c:a1e0::b901:4a87",
|
|
"Ports": {
|
|
"First": 53,
|
|
"Last": 53
|
|
}
|
|
}
|
|
],
|
|
"IPProto": [
|
|
17
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"user-kris": {
|
|
"packet_filter_rules": null
|
|
},
|
|
"user-mon": {
|
|
"packet_filter_rules": null
|
|
},
|
|
"user1": {
|
|
"packet_filter_rules": null
|
|
}
|
|
}
|
|
}
|