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

Allow specifying haproxy SSL Cipher list #14505

Merged
merged 2 commits into from
Jun 12, 2017

Conversation

pecameron
Copy link
Contributor

@pecameron pecameron commented Jun 7, 2017

The user can select from among 3 predefined cipher lists: modern,
intermediate, or old. Alternatively the use may provide a custom
cipher list see "openssl ciphers". The list is used to negotiate a
cipher between a user and haproxyi during bind.

The predefined lists are from:
https://wiki.mozilla.org/Security/Server_Side_TLS

A new option to "oc adm router", --ciphers, is added to specify
the cipher list. The values are modern|intermediate|old, or a
":" separated list of ciphers from "man 1 ciphers"

Option --ciphers creates an environment variable, ROUTER_CIPHERS,
which is passed to the router pod.

See https://trello.com/c/oeP7vrTZ

Update router cipher suites

From https://wiki.mozilla.org/Security/Server_Side_TLS
update the three cipher suites:
  # Modern cipher suite (no legacy browser support) - not currently used
  # Intermediate cipher suite (default) - currently used
  # Old cipher suite (maximum compatibility but insecure) - not currently used

openshift/openshift-docs PR 4587

bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1465572

From https://wiki.mozilla.org/Security/Server_Side_TLS
update the three cipher suites:
  # Modern cipher suite (no legacy browser support) - not currently used
  # Intermediate cipher suite (default) - currently used
  # Old cipher suite (maximum compatibility but insecure) - not currently used
@pecameron
Copy link
Contributor Author

@knobunc PTAL

@knobunc
Copy link
Contributor

knobunc commented Jun 8, 2017

@openshift/networking PTAL

@knobunc knobunc requested a review from rajatchopra June 8, 2017 17:37
ssl-default-bind-ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:DES-CBC3-SHA:HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP

{{- else }}
# user provided list of ciphers (Colon separated list as seen above)
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worth noting in the comment that the env here can never use the default since if they had not passed one, then the default of "intermediate" would have been used already.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

@@ -305,6 +309,7 @@ func NewCmdRouter(f *clientcmd.Factory, parentName, name string, out, errout io.
cmd.Flags().StringVar(&cfg.ExternalHostPartitionPath, "external-host-partition-path", cfg.ExternalHostPartitionPath, "If the underlying router implementation uses partitions for control boundaries, this is the path to use for that partition.")
cmd.Flags().BoolVar(&cfg.DisableNamespaceOwnershipCheck, "disable-namespace-ownership-check", cfg.DisableNamespaceOwnershipCheck, "Disables the namespace ownership check and allows different namespaces to claim either different paths to a route host or overlapping host names in case of a wildcard route. The default behavior (false) to restrict claims to the oldest namespace that has claimed either the host or the subdomain. Please be aware that if namespace ownership checks are disabled, routes in a different namespace can use this mechanism to 'steal' sub-paths for existing domains. This is only safe if route creation privileges are restricted, or if all the users can be trusted.")
cmd.Flags().StringVar(&cfg.MaxConnections, "max-connections", cfg.MaxConnections, "Specifies the maximum number of concurrent connections. Not supported for F5.")
cmd.Flags().StringVar(&cfg.Ciphers, "ciphers", cfg.Ciphers, "Specifies the cipher set (modern|intermediate|old) or the : separated list of ciphers to be used by bind. Not supported for F5.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps:

"Specifies the cipher suites to use. You can choose a predefined cipher set ('modern', 'intermediate', or 'old') or specify exact cipher suites by passing a : separated list. Not supported for F5."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

@pecameron
Copy link
Contributor Author

@openshift/networking PTAL

Copy link
Contributor

@rajatchopra rajatchopra left a comment

Choose a reason for hiding this comment

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

LGTM
Minor concern: How to sanitize the cipher string when provided by the user? Is there a security concern on that? Maybe a regexcheck should be done? To check for newlines at least?

@imcsk8
Copy link
Contributor

imcsk8 commented Jun 9, 2017

Code looks good

The user can select from among 3 predefined cipher lists: modern,
intermediate, or old. Alternatively the use may  provide a custom
cipher list see "man 1 ciphers". The list is used to negotiate a
cipher between a user and haproxyi during bind.

The predefined lists are from:
https://wiki.mozilla.org/Security/Server_Side_TLS

A new option to "oc adm router", --ciphers, is added to specify
the cipher list. The values are modern|intermediate|old, or a
":" separated list of ciphers from "man 1 ciphers"

Option --ciphers creates an environmen variable, ROUTER_CIPHERS,
which is passed to the router pod.

See https://trello.com/c/oeP7vrTZ
@knobunc
Copy link
Contributor

knobunc commented Jun 9, 2017

@rajatchopra we don't validate the ENV since those have to be set by the router admin and they can do "bad things" anyway. It's any annotations we use that we need to be scrupulous about validating.

@knobunc
Copy link
Contributor

knobunc commented Jun 9, 2017

@smarterclayton Any concerns with this?

@smarterclayton
Copy link
Contributor

No concerns as long as this is admin, not end user.

@pecameron
Copy link
Contributor Author

@knobunc Is this ready to merge?

@knobunc
Copy link
Contributor

knobunc commented Jun 12, 2017

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to f2896fc

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to f2896fc

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2143/) (Base Commit: acb8636)

@knobunc
Copy link
Contributor

knobunc commented Jun 12, 2017

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge FAILURE (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/973/) (Base Commit: acb8636)

@smarterclayton smarterclayton merged commit 1aa67a2 into openshift:master Jun 12, 2017
@smarterclayton
Copy link
Contributor

Flaked in queue, no conflicts.

@pecameron pecameron deleted the cipher branch June 26, 2017 13:31
pecameron added a commit to pecameron/openshift-docs that referenced this pull request Jun 27, 2017
Openshift 3.6

The user can select from among 3 predefined cipher lists: modern,
intermediate, or old. Alternatively the use may provide a custom
cipher list see "openssl ciphers". The list is used to negotiate a
cipher between a user and haproxyi during bind.

The predefined lists are from:
https://wiki.mozilla.org/Security/Server_Side_TLS

A new option to "oc adm router", --ciphers, is added to specify
the cipher list. The values are modern|intermediate|old, or a
":" separated list of ciphers from "man 1 ciphers"

Option --ciphers creates an environment variable, ROUTER_CIPHERS,
which is passed to the router pod.

----------------------
General cleanup: "oadm router" changed to "oc adm router"

Code changes are in:
Openshift/origin PR 14505
openshift/origin#14505

Trello oeP7vrTZ
https://trello.com/c/oeP7vrTZ/285-3-allow-modification-of-haproxys-ssl-cipher-preference-ingress
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.

6 participants