Rename all 594 test data files from .json to .hujson and add descriptive header comments to each file documenting what policy rules are under test and what outcome is expected. Update test loaders in all 5 _test.go files to parse HuJSON via hujson.Parse/Standardize/Pack before json.Unmarshal. Add cross-dependency warning to via_compat_test.go documenting that GRANT-V29/V30/V31/V36 are shared with TestGrantsCompat. Add .gitignore exemption for testdata HuJSON files.
54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
// GRANT-H3
|
|
//
|
|
// Grant: src=['*'] dst=['*']
|
|
//
|
|
// Expected: Error (HTTP 400) — ip and app can not both be empty
|
|
{
|
|
"test_id": "GRANT-H3",
|
|
"description": "",
|
|
"timestamp": "2026-02-23T00:36:53Z",
|
|
"error": true,
|
|
"input": {
|
|
"policy_file": "/home/kradalby/acl-explore/grant_policies/grant_h3.json",
|
|
"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"
|
|
},
|
|
"autoApprovers": {
|
|
"routes": {
|
|
"10.33.0.0/16": ["tag:router"],
|
|
"0.0.0.0/0": ["tag:exit"],
|
|
"::/0": ["tag:exit"]
|
|
}
|
|
},
|
|
"grants": [
|
|
{
|
|
"src": ["*"],
|
|
"dst": ["*"],
|
|
"ip": []
|
|
}
|
|
]
|
|
},
|
|
"grants_section": [{ "src": ["*"], "dst": ["*"], "ip": [] }],
|
|
"api_endpoint": "https://api.tailscale.com/api/v2/tailnet/kratail2tid%40passkey/acl",
|
|
"api_method": "POST",
|
|
"api_response_code": 400,
|
|
"api_response_body": { "message": "ip and app can not both be empty" }
|
|
}
|
|
}
|