Skip to content

connectivity: Add node-to-node encryption tests#1308

Merged
tklauser merged 1 commit intomasterfrom
pr/brb/ci-dp-encrypt-node
Jan 10, 2023
Merged

connectivity: Add node-to-node encryption tests#1308
tklauser merged 1 commit intomasterfrom
pr/brb/ci-dp-encrypt-node

Conversation

@brb
Copy link
Copy Markdown
Member

@brb brb commented Dec 23, 2022

This commit introduces the following encryption tests which check whether there is no unencrypted traffic leakage:

  • Node to remote pod
  • Pod to remote node
  • Node to remote node

Also, it refactors the previous encryption test case to make it reusable by the new test cases.

One important detail is that the tcpdump filter is appended with and (tcp or icmp), as otherwise in the case of the node-to-node test case the tcpdump would capture encrypted UDP WireGuard traffic.

Tested manually with cilium/cilium#19401 (until #merge-cilium-and-cilium-cli).

cc @gandro

@brb brb added area/CI Continuous Integration testing issue or flake ci/hyperjump labels Dec 23, 2022
@brb brb temporarily deployed to ci December 23, 2022 07:38 — with GitHub Actions Inactive
@brb brb force-pushed the pr/brb/ci-dp-encrypt-node branch from f8c50b6 to 1aef8a9 Compare January 10, 2023 09:44
@brb brb temporarily deployed to ci January 10, 2023 09:44 — with GitHub Actions Inactive
@brb brb changed the title WIP: add host2pod, pod2host, host2host encryption tests connectivity: Add node-to-node encryption tests Jan 10, 2023
@brb brb marked this pull request as ready for review January 10, 2023 09:46
@brb brb requested a review from a team as a code owner January 10, 2023 09:46
@brb brb requested review from gandro and rolinh January 10, 2023 09:46
Copy link
Copy Markdown
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Copy link
Copy Markdown
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

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

Nits only, LGTM.

This commit introduces the following encryption tests which check
whether there is no unencrypted traffic leakage:

* Node to remote pod
* Pod to remote node
* Node to remote node

Also, it refactors the previous encryption test case to make it
reusable by the new test cases.

One important detail is that the tcpdump filter is appended with "and
(tcp or icmp)", as otherwise in the case of the node-to-node test case
the tcpdump would capture encrypted UDP WireGuard traffic.

Tested manually with cilium/cilium#19401
(until #merge-cilium-and-cilium-cli).

Signed-off-by: Martynas Pumputis <m@lambda.lt>
@brb brb force-pushed the pr/brb/ci-dp-encrypt-node branch from 1aef8a9 to 173f18e Compare January 10, 2023 15:05
@brb brb temporarily deployed to ci January 10, 2023 15:05 — with GitHub Actions Inactive
brb added a commit to cilium/cilium that referenced this pull request Jan 10, 2023
The encryption tests were introduced in
cilium/cilium-cli#1308.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
@tklauser tklauser merged commit f4beecd into master Jan 10, 2023
@tklauser tklauser deleted the pr/brb/ci-dp-encrypt-node branch January 10, 2023 15:54
)
ct.NewTest("node-to-node-encryption").
WithFeatureRequirements(check.RequireFeatureEnabled(check.FeatureEncryptionNode),
check.RequireFeatureEnabled(check.FeatureEncryptionNode)).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@brb Shouldn't the first constant here be FeatureEncryptionPod instead of FeatureEncryptionNode?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oops, good spot!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

brb added a commit to cilium/cilium that referenced this pull request Jan 11, 2023
The encryption tests were introduced in
cilium/cilium-cli#1308.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
gandro pushed a commit to cilium/cilium that referenced this pull request Jan 12, 2023
The encryption tests were introduced in
cilium/cilium-cli#1308.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
brb added a commit to cilium/cilium that referenced this pull request Jan 13, 2023
The encryption tests were introduced in
cilium/cilium-cli#1308.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
brb added a commit to cilium/cilium that referenced this pull request Jan 16, 2023
The encryption tests were introduced in
cilium/cilium-cli#1308.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
gandro pushed a commit to cilium/cilium that referenced this pull request Jan 23, 2023
The encryption tests were introduced in
cilium/cilium-cli#1308.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
ldelossa pushed a commit to cilium/cilium that referenced this pull request Jan 24, 2023
The encryption tests were introduced in
cilium/cilium-cli#1308.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/CI Continuous Integration testing issue or flake ci/hyperjump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants