Skip to content

docs: Add page about securing envoy to quick-start#13880

Merged
mattklein123 merged 31 commits intoenvoyproxy:masterfrom
phlax:docs-add-secure-quickstart
Nov 9, 2020
Merged

docs: Add page about securing envoy to quick-start#13880
mattklein123 merged 31 commits intoenvoyproxy:masterfrom
phlax:docs-add-secure-quickstart

Conversation

@phlax
Copy link
Copy Markdown
Member

@phlax phlax commented Nov 3, 2020

Signed-off-by: Ryan Northey [email protected]

Commit Message: docs: Add page about securing envoy to quick-start
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

@phlax phlax marked this pull request as draft November 3, 2020 11:28
phlax added 6 commits November 3, 2020 11:33
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
@mattklein123 mattklein123 self-assigned this Nov 3, 2020
Signed-off-by: Ryan Northey <[email protected]>
phlax added 4 commits November 4, 2020 09:19
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 4, 2020

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #13880 (comment) was created by @phlax.

see: more, trace.

phlax added 7 commits November 5, 2020 12:47
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
phlax added 3 commits November 5, 2020 15:03
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 5, 2020

@mattklein123 this one is nearly ready for final review - its taking a while as i was testing as i was writing it.

i still need to add/update some links and some small formatting/grammar issues

phlax added 4 commits November 5, 2020 17:35
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
@phlax phlax changed the title [WIP] docs: Add page about securing envoy to quick-start docs: Add page about securing envoy to quick-start Nov 6, 2020
@phlax phlax marked this pull request as ready for review November 6, 2020 09:56
@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 6, 2020

@mattklein123 this one should be ready for final review

Copy link
Copy Markdown
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.

Thanks this is awesome. A few comments to get started.

/wait

The following guide takes you through individual aspects of securing traffic.

To secure traffic over a network that is untrusted, you are strongly advised to make
use of :ref:`SNI <start_quick_start_securing_sni>` *and* :ref:`mTLS <start_quick_start_securing_mtls>`
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.

re: SNI, I would rephrase this, as I don't think it's required to use SNI. In some sense, SNI is just a routing concept (setting aside TLS1.3 encrypted SNI which breaks all of this).

re: mTLS, I might rephrase this slightly, as the way this is written will be contentious with some people. There is a set of people that think mTLS is too complicated and per-request (signing, etc. like JWT) is a better way to handle mutual authentication. I think mTLS is one way of doing this, but it would be good to rephrase slightly and potentially link to some of the per-request options such as JWT/Oauth/etc.

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.

so re SNI, my understanding is that it prevents a type of spoofing - ie valid certs for wrong server (maybe this is wrong).

ill remove this/related advice and try to clarify what is written about it...

re mTLS - got it (i think) - ill make the warning about mutual authentication and encryption, and suggest this as a way to address those problems

Copy link
Copy Markdown
Member Author

@phlax phlax Nov 8, 2020

Choose a reason for hiding this comment

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

so re SNI, my understanding is that it prevents a type of spoofing - ie valid certs for wrong server (maybe this is wrong).

yep, from further testing, this is wrong.

sni "allows" multiple domains to be served at same ip with different certs. I guess browsers just automatically use the dns name here.

From envoy configuration pov i guess the advice is still that its best to put the dns of upstream in tls cluster config

Im less clear how important it is to include in sec section, but ill try and reword and we can figure what/whether to include


.. _start_quick_start_securing_sni:

Secure an endpoint with SNI
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.

Per above, SNI is about routing, not about security. It's actually not secure at all (until encrypted SNI in TLS 1.3). Can you check this around the doc and update/rephrase as needed?

Copy link
Copy Markdown
Member Author

@phlax phlax Nov 6, 2020

Choose a reason for hiding this comment

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

so i get its called routing but my understanding is that it just "addresses" the other side with an "sni" name

certainly in my testing, dns had no bearing here - as long as the sni name matched what was in the match list (or there was no match list) then it worked

if there was a match list then the sni has to be set (dns also had no bearing in this case)

in terms of the title for this section - how about "Validating certificates with SNI" ?

i feel like we want to include sni here, and that it is sufficiently related to cert sec, but struggling to think how to word the section title

Signed-off-by: Ryan Northey <[email protected]>
@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 8, 2020

@mattklein123 ive updated the SNI sections, and the initial warning about using auth/encryption.

Im still not 100% about the sni stuff, but i think this is closer to what we want.

I read the existing faq page, and anything else in the existing envoy docs. I tried playing with the auto_sni and auto_san settings, but couldnt seem to get them working or find any examples. The proto docs dont make it very clear the context that these can be used in.

I guess the main difference between what i have tried to add here and what is in the faq already re sni, is why people would want/need to use it - from both server and client perspectives.

@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 8, 2020

@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 8, 2020

also, not sure if this is necessary for first iteration - but would probs be good to get something about ocsp stapling in here

@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 9, 2020

@mattklein123 it would be good to land this - ive posted it to users on slack twice in as many days - i think its pretty useful, and we can iterate

Copy link
Copy Markdown
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.

Thanks this is great. Agreed we can ship and iterate. See my one follow up comment below. Thank you!

Comment on lines +20 to +21
Here we provide a guide to using :ref:`mTLS <start_quick_start_securing_mtls>` which provides both encryption
and mutual authentication.
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.

We can do it as a follow up, but I think it would be good to cross link here to other authentication and authorization concepts such as JWT/RBAC/OAUTH/etc.

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.

cool, i have some other pending PRs around here, i reckon i can tack something on

@mattklein123 mattklein123 merged commit 93b393b into envoyproxy:master Nov 9, 2020
@phlax phlax mentioned this pull request Nov 10, 2020
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.

2 participants