fix: allow gateway access with open ACL policy
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-10-07 14:55:39 +09:00
parent 2be752d7f8
commit b6c0503f27
+17 -2
View File
@@ -73,16 +73,31 @@ export class HeadscaleAdapter {
unresolved: string[] unresolved: string[]
error?: string error?: string
}> { }> {
const gatewaySources = [...new Set(
config.headscaleGatewayUsers.map((user) => this.toHeadscaleUserName(user)),
)]
const policy: HeadscalePolicy = { const policy: HeadscalePolicy = {
groups: {}, groups: {},
tagOwners: { tagOwners: {
'tag:teaching-device': [`${config.headscaleTeachingDeviceOwner}@`], 'tag:teaching-device': [`${config.headscaleTeachingDeviceOwner}@`],
}, },
acls: [{ acls: [
{
action: 'accept', action: 'accept',
src: ['*'], src: ['*'],
dst: ['*:*'], dst: ['*:*'],
}], },
{
action: 'accept',
src: gatewaySources,
dst: ['*:*'],
},
{
action: 'accept',
src: ['tag:teaching-device'],
dst: ['*:*'],
},
],
} }
const result = await this.applyPolicy(policy) const result = await this.applyPolicy(policy)