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

fix: Resource restricted policy should allow empty ports #193

Merged
merged 5 commits into from Mar 11, 2024

Conversation

ekampf
Copy link
Contributor

@ekampf ekampf commented Mar 11, 2024

Related Tickets & Documents

Changes

  • Fixed minimum port value - should be 1 not zero
  • Allow RESTRICTED ports to be empty list which means "block all"

Also manually tested adding this resource:

apiVersion: twingate.com/v1beta
kind: TwingateResource
metadata:
  name: foo
spec:
  name: Foo
  address: foo.default.cluster.local
  protocols:
    allowIcmp: true
    tcp:
      policy: RESTRICTED
      ports:
        - end: 8080
          start: 8080
    udp:
      policy: RESTRICTED
      ports: []

result:
Screenshot 2024-03-11 at 4 47 03 PM

Copy link

linear bot commented Mar 11, 2024

@coveralls
Copy link
Collaborator

coveralls commented Mar 11, 2024

Pull Request Test Coverage Report for Build 8241306083

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 97.507%

Totals Coverage Status
Change from base Build 8195844409: -0.01%
Covered Lines: 796
Relevant Lines: 807

💛 - Coveralls

@ekampf ekampf changed the title fix: Port minimum value should be 1 fix: Resource restricted policy should allow empty ports Mar 11, 2024
Copy link

@minhtule minhtule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT 👍

@ekampf ekampf merged commit e9aec7d into main Mar 11, 2024
16 checks passed
@ekampf ekampf deleted the feature/oss-19-enable-to-block-all-ports branch March 11, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants