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

security: document threat model. #8906

Merged
merged 20 commits into from
Nov 11, 2019
Merged

security: document threat model. #8906

merged 20 commits into from
Nov 11, 2019

Conversation

htuch
Copy link
Member

@htuch htuch commented Nov 5, 2019

  • Add an explicit threat model to the end user facing docs, link to this from SECURITY.md

  • Switch all Envoy extensions to use a new macro envoy_cc_extension, mandating that extensions declare a security posture. Extensions can also optionally declare alpha or wip status.

  • Tag all documentation sites with their well-known Envoy names.

  • Introduce tooling to automagically populate a list of known trusted/untrusted extensions in the threat model docs.

  • Generate API docs for extensions that depend on google.protobuf.Empty. This pattern is deprecated as per Per-extension empty message configs #8933, but we need these for tooling support meanwhile.

This work was motivated by oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18370

Signed-off-by: Harvey Tuch htuch@google.com

Describe core/extension and data/control plane distinctions and our
current posture around these.

Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch
Copy link
Member Author

htuch commented Nov 5, 2019

@envoyproxy/security-team for consideration.

@mattklein123 mattklein123 self-assigned this Nov 6, 2019
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Awesome, LGTM w/ some small comments.

/wait

htuch added 7 commits November 6, 2019 12:37
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

In general, +1 on this approach. With the bazel tagging can we feed that into the docs somehow? WDYT? Amazing stuff.

@htuch htuch changed the title security: update threat model documentation. security: document threat model. Nov 7, 2019
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #8906 was synchronize by htuch.

see: more, trace.

Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch
Copy link
Member Author

htuch commented Nov 7, 2019

This is now updated with the plumbing for generating docs from envoy_cc_extension attributes. I had an initial attempt at classifying the extension, some are still unknown, I think these would all benefit from additional eyes. Thanks.

Signed-off-by: Harvey Tuch <htuch@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Super amazing work. So amazing! Flushing out some comments now before I run to a meeting. Will look at the rendered docs later.

name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
security_posture = "unknown",
Copy link
Member

Choose a reason for hiding this comment

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

@lizan @PiotrSikora I think Istio uses this?

@mattklein123
Copy link
Member

@htuch looking at the rendered docs can you alpha sort the output of each security posture section?

htuch added 3 commits November 8, 2019 09:12
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
htuch added 2 commits November 8, 2019 09:59
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Some random notes from looking at the docs:

  1. Is envoy.transport_sockets.alts really robust to downstream and upstream? How have we validated that?
  2. kafka/xray show up on the threat model page with no links. Can they be excluded?
  3. On the detailed page for each extension, can the thread model and production readiness level be somehow called out via an attention box or similar?
  4. (Wish) on the threat model page, can it say something like "(alpha)" if an extension is alpha quality?
  5. I think all the tracers need to be robust to downstream similar to loggers?

Amazing stuff.

/wait

@@ -69,6 +69,7 @@ envoy_cc_extension(
srcs = ["filter_factory.cc"],
hdrs = ["filter_factory.h"],
security_posture = "robust_to_untrusted_downstream",
status = "alpha",
Copy link
Member

Choose a reason for hiding this comment

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

I think this is used in production now? @lizan @qiwzhang? If so and this is still using alpha protos can we promote to non-alpha?

@htuch
Copy link
Member Author

htuch commented Nov 11, 2019

@marcomagdy @easy are you willing to call the X-ray and OpenCensus tracers (respectively) as hardened to edge traffic (i.e. untrusted downstreams)?

@htuch
Copy link
Member Author

htuch commented Nov 11, 2019

@mattklein123 re: the ALTS robustness, my assumption is that any transport socket is largely symmetrical, as (with some minor configuration differences usually) it can be dropped into downstream or upstream configuration.

@htuch
Copy link
Member Author

htuch commented Nov 11, 2019

@PiotrSikora @lizan @qiwzhang can you folks please address @mattklein123 's questions in the threads above? We'd like to land the threat modeling for Envoy.

Signed-off-by: Harvey Tuch <htuch@google.com>
@marcomagdy
Copy link
Contributor

... are you willing to call the X-ray and OpenCensus tracers (respectively) as hardened to edge traffic (i.e. untrusted downstreams)?

@htuch I think that makes sense for X-Ray since it consumes HTTP headers only which have gone through Envoy's core already.
Let me know if I should be thinking of particular scenarios or attack vectors.

Signed-off-by: Harvey Tuch <htuch@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Awesome work, let's ship and iterate.

@htuch htuch merged commit 90d1094 into envoyproxy:master Nov 11, 2019
@htuch htuch deleted the update-policy branch November 11, 2019 22:03
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