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

ipsec, option: Make the IPsec key rotation delay configurable #24811

Merged

Conversation

pchaigno
Copy link
Member

We currently have a maximum IPsec key rotation delay hardcoded to 5 minutes. After that time, we remove the old key from the node. Therefore, if the new key wasn't propagated to all nodes before then, communication between nodes will break.

5 minutes is usually enough because all agents will pick up the new key as soon as it's loaded and takes them a few seconds maximum to reload their IPsec configuration in the kernel.

For clustermesh scenarios however, 5 minutes may not be enough. In those cases, the key needs to be updated separately on all clusters. Depending on the number of clusters and how this is done, it may take longer than 5 minutes.

This pull request therefore makes this 5 minutes delay configurable via an agent flag.

@pchaigno pchaigno added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/clustermesh Relates to multi-cluster routing functionality in Cilium. area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. labels Apr 11, 2023
@pchaigno pchaigno requested review from a team as code owners April 11, 2023 13:47
Copy link
Member

@asauber asauber left a comment

Choose a reason for hiding this comment

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

LGTM. Have you tested it interactively?

@maintainer-s-little-helper

This comment was marked as resolved.

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Apr 11, 2023
@pchaigno
Copy link
Member Author

LGTM. Have you tested it interactively?

No.

We currently have a maximum IPsec key rotation delay hardcoded to 5
minutes. After that time, we remove the old key from the node.
Therefore, if the new key wasn't propagated to all nodes before then,
communication between nodes will break.

5 minutes is usually enough because all agents will pick up the new key
as soon as it's loaded and takes them a few seconds maximum to reload
their IPsec configuration in the kernel.

For clustermesh scenarios however, 5 minutes may not be enough. In those
cases, the key needs to be updated separately on all clusters. Depending
on the number of clusters and how this is done, it may take longer than
5 minutes.

This commit therefore makes this 5 minutes delay configurable via an
agent flag.

Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno force-pushed the configurable-ipsec-key-rotation-delay branch from d178da2 to 52b5bc2 Compare April 11, 2023 14:49
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Apr 11, 2023
Copy link
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@pchaigno
Copy link
Member Author

This is not covered in end-to-end tests and all compile & lint tests are passing. Merging.

@pchaigno pchaigno merged commit b7ecd90 into cilium:main Apr 18, 2023
43 checks passed
@pchaigno pchaigno deleted the configurable-ipsec-key-rotation-delay branch April 18, 2023 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clustermesh Relates to multi-cluster routing functionality in Cilium. area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants