Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users that don't belong to any ACL can access the whole network #1292

Closed
reynico opened this issue Mar 27, 2023 · 5 comments
Closed

Users that don't belong to any ACL can access the whole network #1292

reynico opened this issue Mar 27, 2023 · 5 comments
Labels
bug Something isn't working policy 📝 stale

Comments

@reynico
Copy link
Contributor

reynico commented Mar 27, 2023

Bug description
If a new user is enrolled into Headscale and it doesn't belong to any group, the user has access to the whole network.

To Reproduce
Describing an ACL as following:

{
    "groups": {
        "group:dev": [
            "john",
            "doe",
        ],
        "group:support": [
            "sandy",
            "joe",
        ],
    },
    "hosts": {
        "db": "10.10.11.7/32",
        "server1": "10.10.0.2/32",
        "server2": "100.100.100.100/32",
    },
    "acls": [
        {
            "action": "accept",
            "src": [
                "100.64.0.1",
            ],
            "dst": [
                "*:*",
            ],
        },
        {
            "action": "accept",
            "src": [
                "group:dev",
            ],
            "dst": [
                "db:5432",
                "server1:*",
                "server2:*",

                "100.64.0.1:0",
            ]
        },
        {
            "action": "accept",
            "src": [
                "group:support",
            ],
            "dst": [
                "db:5432",

                "100.64.0.1:0",
            ]
        }
    ]
}

permits the support team to access a PostgreSQL database, but prohibits access to the servers, while the developers have access to the database and servers.

if a new user marty is enrolled, marty has access to everything, bypassing the ACLs.

  • Version of headscale used: v0.20.0
  • Version of tailscale client: 1.38.2
  • OS (e.g. Linux, Mac, Cygwin, WSL, etc.) and version: macOS Ventura
@reynico reynico added the bug Something isn't working label Mar 27, 2023
@kradalby
Copy link
Collaborator

Is this a new bug, or has it always been like this? I will add it to #1069 (tracking my ACL improvement work).

@reynico
Copy link
Contributor Author

reynico commented Mar 28, 2023

I have a gut feeling that it has always been like this.

@kradalby
Copy link
Collaborator

Noted, I will try to write a test case to "prove" it and then fix it for the #1069 work and hopefully get it resolve when I am sitting down with that work.

Copy link
Contributor

github-actions bot commented Feb 4, 2024

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Feb 4, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working policy 📝 stale
Projects
None yet
Development

No branches or pull requests

2 participants