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

Improvements on the ACLs and bug fixing #320

Merged
merged 30 commits into from
Feb 21, 2022

Commits on Feb 17, 2022

  1. Configuration menu
    Copy the full SHA
    9b7d657 View commit details
    Browse the repository at this point in the history
  2. feat(machine): add ACLFilter if ACL's are enabled.

    This commit change the default behaviour and remove the notion of namespaces between the hosts. It allows all namespaces to be only filtered by the ACLs. This behavior is closer to tailsnet.
    restanrm committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    e482dfe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e9949b4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fb45138 View commit details
    Browse the repository at this point in the history
  5. feat(acl): update frequently the aclRules

    This call should be done quite at each modification of a server resources like RequestTags.
    When a server changes it's tag we should rebuild the ACL rules.
    
    When a server is added to headscale we also should update the ACLRules.
    restanrm committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    97eac3b View commit details
    Browse the repository at this point in the history
  6. feat(acls): rewrite functions to be testable

    Rewrite some function to get rid of the dependency on Headscale object. This allows us
    to write succinct test that are more easy to review and implement.
    
    The improvements of the tests allowed to write the removal of the tagged hosts
    from the namespace as specified here: https://tailscale.com/kb/1068/acl-tags/
    restanrm committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    de59946 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7b5ba9f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    aceaba6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9cedbba View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d8c4c31 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5f642ee View commit details
    Browse the repository at this point in the history
  12. chore(lint): ignore linting on test_expandalias

    This is a false positive on the way the function is built.
    Small tests cases are all inside this functions, making it big.
    restanrm committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    f073d8f View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2022

  1. Configuration menu
    Copy the full SHA
    21df798 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2022

  1. Apply suggestions from code review on changelog

    Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
    restanrm and kradalby authored Feb 20, 2022
    Configuration menu
    Copy the full SHA
    4f9ece1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d00251c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5e167cc View commit details
    Browse the repository at this point in the history
  4. fix(machine): revert modifications

    Using h.ListAllMachines also listed the current machine in the result. It's unnecessary (I don't know if it's harmful).
    
    Breaking the check with the `matchSourceAndDestinationWithRule` broke the tests. We have a specificity with the '*' destination that isn't symetrical.
    I need to think of a better way to do this. It too hard to read.
    restanrm committed Feb 20, 2022
    Configuration menu
    Copy the full SHA
    b3d0fb7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5242025 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2022

  1. Configuration menu
    Copy the full SHA
    ecb3ee6 View commit details
    Browse the repository at this point in the history
  2. fix(machines): simplify complex if check

    This should fix the performance issue with computation of `dst` variable. It's also easier to read now.
    restanrm committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    960412a View commit details
    Browse the repository at this point in the history
  3. fix(machines): use ListAllMachines function

    added a simple filter to remove the current node
    restanrm committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    9c6ce02 View commit details
    Browse the repository at this point in the history
  4. feat(machines): untie dependency with class for filter func

    The dependency to the `headscale` struct makes tests harder to do.
    
    This change allow to easily add some tests for this quite sensible function.
    restanrm committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    f006860 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5ab6237 View commit details
    Browse the repository at this point in the history
  6. chore(machines): apply lint

    restanrm committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    4bbe005 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    25550f8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    211fe40 View commit details
    Browse the repository at this point in the history
  9. fix: add error checking in acl and poll

    If aclPolicy is not defined, in updateAclPolicy, return an error.
    restanrm committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    50af44b View commit details
    Browse the repository at this point in the history
  10. Update acls_test.go

    Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
    restanrm and kradalby authored Feb 21, 2022
    Configuration menu
    Copy the full SHA
    baae266 View commit details
    Browse the repository at this point in the history
  11. chore(fmt): apply fmt

    restanrm committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    650108c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d971f0f View commit details
    Browse the repository at this point in the history