fix: allow gateway access with open ACL policy
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -73,16 +73,31 @@ export class HeadscaleAdapter {
|
||||
unresolved: string[]
|
||||
error?: string
|
||||
}> {
|
||||
const gatewaySources = [...new Set(
|
||||
config.headscaleGatewayUsers.map((user) => this.toHeadscaleUserName(user)),
|
||||
)]
|
||||
const policy: HeadscalePolicy = {
|
||||
groups: {},
|
||||
tagOwners: {
|
||||
'tag:teaching-device': [`${config.headscaleTeachingDeviceOwner}@`],
|
||||
},
|
||||
acls: [{
|
||||
acls: [
|
||||
{
|
||||
action: 'accept',
|
||||
src: ['*'],
|
||||
dst: ['*:*'],
|
||||
}],
|
||||
},
|
||||
{
|
||||
action: 'accept',
|
||||
src: gatewaySources,
|
||||
dst: ['*:*'],
|
||||
},
|
||||
{
|
||||
action: 'accept',
|
||||
src: ['tag:teaching-device'],
|
||||
dst: ['*:*'],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const result = await this.applyPolicy(policy)
|
||||
|
||||
Reference in New Issue
Block a user