1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-09-16 17:50:44 +02:00

policy: validate error message for asterix in ssh (#2766)

This commit is contained in:
Kristoffer Dalby 2025-09-10 18:41:43 +02:00 committed by GitHub
parent 3f6657ae57
commit 01c1f6f82a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -348,6 +348,42 @@ func TestUnmarshalPolicy(t *testing.T) {
},
},
},
{
name: "2652-asterix-error-better-explain",
input: `
{
"acls": [
{
"action": "accept",
"src": [
"*"
],
"dst": [
"*:*"
],
"proto": [
"*:*"
]
}
],
"ssh": [
{
"action": "accept",
"src": [
"*"
],
"dst": [
"*"
],
"proto": [
"*:*"
]
}
]
}
`,
wantErr: "alias v2.Asterix is not supported for SSH source",
},
{
name: "invalid-username",
input: `