-
Notifications
You must be signed in to change notification settings - Fork 326
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
connect: endpoints controller deletes ACL token when service is deregistered #571
Conversation
5b0b946
to
a817f77
Compare
a817f77
to
3341281
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took a while to read but this is an excellent PR!! I'm surprised that we only had to make changes to the endpoints controller in order for the ACL deletion to work (along with the acl write policy). Have a few suggestions but this looks excellent!
I havent tested this myself though.
Co-authored-by: Ashwin Venkatesh <ashwin@hashicorp.com>
Thank you so much for the review @thisisnotashwin 🙏 🙏 I know it was a bit of a handful to read with all the refactors! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow this touches a lot of places and makes it so nice and clean to read! I especially like that you pulled the K8sAuthMethod functions out into test_util. Awesome work, and I just had a few questions.
c.CAFile = caFile | ||
c.CertFile = certFile | ||
c.KeyFile = keyFile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this removed because it's just a test and what we care about is the ACL behaviour and not whether the traffic is TLS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm removing because there isn't any behavior in the endpoints controller that's specific to TLS. Since we're passing the consul client to the endpoints controller struct, so long as that client is configured correctly, everything will work. We're configuring that client in the test as well, and so there's no way this test could ever fail. Since it can't fail, I don't think it's that useful to us.
What triggered it though is that with TLS and ACL table tests, adding new tests was getting a hard. At first, I was thinking of separating those tests and refactoring to make them a bit more readable with the new ACL tests added. But then realized that they can't fail, and so we should probably just remove them.
* adding terminating gw test without tls/acls Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
Fixes #540
Changes proposed in this PR:
helper
and moveGenerateServerCerts
function fromsubcommand/common
there because it was used outside ofsubcommand
.connect-init
command tests to use that function.How I've tested this PR:
How I expect reviewers to test this PR:
Checklist: