Skip to content

Add admin guide for configuring cluster-wide IPsec encryption #3236

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

Closed
wants to merge 1 commit into from

Conversation

dcbw
Copy link

@dcbw dcbw commented Nov 16, 2016

This document is relevant for OpenShift 3.3 and later.

@openshift/networking

Copy link
Contributor

@knobunc knobunc left a comment

Choose a reason for hiding this comment

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

Really nice stuff, thanks. LGTM

Just a couple of nits.

already communicate with each other via the Internet Protocol (IP). The simplest
way of protecting traffic within an Openshift cluster is to ensure that the
master and all nodes use IPsec to encrypt their communication. This document
describes the simplest way to do this.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reword the last sentence to avoid repetition of 'simplest'.

Perhaps:
This document describes how to achieve that.


Now that the configuration has been defined, you need to tell `libreswan`
what IP subnets and hosts to apply each policy to. This is done through policy
files in /etc/ipsec.d/policies/ where each configured connection has a
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the paths need to be made into fixed width text?

what IP subnets and hosts to apply each policy to. This is done through policy
files in /etc/ipsec.d/policies/ where each configured connection has a
corresponding policy file. In our example above, we have two connections,
`private` and `clear` and each will have a file in /etc/ipsec.d/policies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Above policies has a trailing /, here it doesn't. We should be consistent.

Copy link

@pecameron pecameron left a comment

Choose a reason for hiding this comment

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

LGTM
Nicely written.
Should ansible be updated to install libreswan?
Do we expect a performance impact for using this?

Save the nickname for later.

The client certificate, CA certificate, and private key files must be combined
into a PKCS#12 file, which is a common container format for multiple

Choose a reason for hiding this comment

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

Container is a loaded term w.r.t.openshift/docker. Maybe use something else?

== Overview
IPsec is a mechanism for encrypting communication between hosts which can
already communicate with each other via the Internet Protocol (IP). The simplest
way of protecting traffic within an Openshift cluster is to ensure that the
Copy link
Contributor

Choose a reason for hiding this comment

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

"OpenShift" (everywhere)

In this example, we will secure communication of an entire IP subnet from which
the Openshift hosts receive their IP addresses. Since you are securing the
host-to-host communication, this automatically includes all cluster management
and pod data traffic.
Copy link
Contributor

Choose a reason for hiding this comment

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

Management traffic is already over https, so this adds a second layer of encryption...


[[procedure]]
== Procedure
This procedure should be repeated for each host in your cluster. Any host
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe explicitly clarify that "host" means both nodes and masters here

== Procedure
This procedure should be repeated for each host in your cluster. Any host
in the cluster that does not have IPsec enabled will not be able to communicate
with a host that does. It is suggested to perform these steps on the master
Copy link
Contributor

Choose a reason for hiding this comment

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

"the master(s)"

By default, Openshift secures cluster management communication with mutually
authenticated HTTPS communication. This means that both the client (like an
openshift node) and the server (like the openshift api-server) send each other
their certificates, which are checked against a know Certificate Authority (CA).
Copy link
Contributor

Choose a reason for hiding this comment

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

"known"


/etc/ipsec.d/policies/private should contain the IP subnet of your cluster,
which your hosts receive IP addresses from. This, by default, will cause all
communication between hosts in the 172.16.0.0/16 subnet to be encrypted if
Copy link
Contributor

Choose a reason for hiding this comment

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

Makes it sound like regardless of what you put in the file, it will affect traffic to 172.16.0.0/16... I think you rearranged some text here and didn't fully fix up everything for it.

communication between hosts in the 172.16.0.0/16 subnet to be encrypted if
the remote host's client certificate authenticates against the local host's
Certificate Authority certificate. If the remote host's certificate does not
authenticate, all traffic between the two hosts it will be blocked.
Copy link
Contributor

Choose a reason for hiding this comment

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

drop "it"

172.16.0.0/16
----

Next encryption between all hosts and the subnet gateway must be un-encrypted,
Copy link
Contributor

Choose a reason for hiding this comment

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

comma after "Next"


----
172.16.0.0/16
----
Copy link
Contributor

Choose a reason for hiding this comment

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

Presumably one can add additional IP ranges or specific addresses here? It would be good to explain that.

Copy link

Choose a reason for hiding this comment

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

yes

from another host in the cluster.

The most common failure is certificates that do not verify against a common
Certificate Authority certificate. To verify this:
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems unlikely that this would happen in an OpenShift cluster, since the certificates are being created by automated processes; if people were ending up with node certs that used the wrong CA, then that would cause https failures even if they weren't using ipsec.

@dcbw
Copy link
Author

dcbw commented Nov 29, 2016

@openshift/networking PTAL, thanks!

Copy link
Contributor

@knobunc knobunc left a comment

Choose a reason for hiding this comment

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

LGTM. Please just add the versions you want this to be applied to to the description.

@dcbw
Copy link
Author

dcbw commented Nov 30, 2016

@knobunc done

the OpenShift hosts receive their IP addresses. Since you are securing the
host-to-host communication, this automatically includes all cluster management
and pod data traffic. Note that as OpenShift management traffic uses HTTPS,
enabling IPsec will encrypt management traffic a second time.
Copy link
Contributor

Choose a reason for hiding this comment

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

I was pointing that out before as more of a question: do we really want to do that? (Do our customers really want to do that?) Would it be better to just specifically encrypt the currently-unencrypted traffic (which is just VXLAN?) rather than encrypting all traffic between the hosts? (Does libreswan even let us configure something like that?)

(If we do actually want to do this, I don't think it needs to be pointed out in the docs; you can go back to whatever this said before.)

@letoams
Copy link

letoams commented Nov 30, 2016 via email

@knobunc
Copy link
Contributor

knobunc commented Dec 13, 2016

@openshift/team-documentation this has passed tech review. Over to you. Thanks.

@vikram-redhat
Copy link
Contributor

@knobunc - Hey Ben. Is this for 3.4 or 3.3 onwards?

@bfallonf - PTAL.

@bfallonf bfallonf mentioned this pull request Dec 15, 2016
@bfallonf
Copy link

I created #3398 as a follow-up to this (for 3.3 ->).

I'll close this and continue the edits there, and put that onto peer review.

Let me know if there's any issues.

@bfallonf bfallonf closed this Dec 15, 2016
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.

7 participants