mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-18 14:59:54 +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
72 lines
1.3 KiB
Plaintext
72 lines
1.3 KiB
Plaintext
// SSH-C2
|
|
//
|
|
// SSH: accept: src=['autogroup:member'] dst=['tag:server'] users=['root']
|
|
//
|
|
// Expected: SSH rules on 1 of 5 nodes
|
|
{
|
|
"test_id": "SSH-C2",
|
|
"ssh_section": [
|
|
{
|
|
"action": "accept",
|
|
"src": [
|
|
"autogroup:member"
|
|
],
|
|
"dst": [
|
|
"tag:server"
|
|
],
|
|
"users": [
|
|
"root"
|
|
]
|
|
}
|
|
],
|
|
"nodes": {
|
|
"user1": {
|
|
"rules": []
|
|
},
|
|
"user-kris": {
|
|
"rules": []
|
|
},
|
|
"user-mon": {
|
|
"rules": []
|
|
},
|
|
"tagged-server": {
|
|
"rules": [
|
|
{
|
|
"principals": [
|
|
{
|
|
"nodeIP": "100.103.90.82"
|
|
},
|
|
{
|
|
"nodeIP": "100.110.121.96"
|
|
},
|
|
{
|
|
"nodeIP": "100.90.199.68"
|
|
},
|
|
{
|
|
"nodeIP": "fd7a:115c:a1e0::1737:7960"
|
|
},
|
|
{
|
|
"nodeIP": "fd7a:115c:a1e0::2d01:c747"
|
|
},
|
|
{
|
|
"nodeIP": "fd7a:115c:a1e0::9e37:5a52"
|
|
}
|
|
],
|
|
"sshUsers": {
|
|
"root": "root"
|
|
},
|
|
"action": {
|
|
"accept": true,
|
|
"allowAgentForwarding": true,
|
|
"allowLocalPortForwarding": true,
|
|
"allowRemotePortForwarding": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"tagged-prod": {
|
|
"rules": []
|
|
}
|
|
}
|
|
}
|