1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-09-25 17:51:11 +02:00

policy: validate error message for asterix in ssh

Closes #2652

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2025-09-10 12:50:32 +02:00
parent 3f6657ae57
commit 74896f6bd9
No known key found for this signature in database

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: `