-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Feature untrusted client certs #9172
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ Version history | |
* config: use type URL to select an extension whenever the config type URL (or its previous versions) uniquely identify a typed extension, see :ref:`extension configuration <config_overview_extension_configuration>`. | ||
* http: fixing a bug in HTTP/1.0 responses where Connection: keep-alive was not appended for connections which were kept alive. | ||
* retry: added a retry predicate that :ref:`rejects hosts based on metadata. <envoy_api_field_route.RetryPolicy.retry_host_predicate>` | ||
* router: added the ability to match a route based on whether a downstream TLS connection certificate has been | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: alphabetical order There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
:ref:`validated <envoy_api_field_route.RouteMatch.TlsContextMatchOptions.validated>`. | ||
* upstream: combined HTTP/1 and HTTP/2 connection pool code. This means that circuit breaker | ||
limits for both requests and connections apply to both pool types. Also, HTTP/2 now has | ||
the option to limit concurrent requests on a connection, and allow multiple draining | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -530,11 +530,23 @@ class MetadataMatchCriteria { | |
filterMatchCriteria(const std::set<std::string>& names) const PURE; | ||
}; | ||
|
||
/** | ||
* Criterion that a route entry uses for matching TLS connection context. | ||
*/ | ||
class TlsContextMatchCriteria { | ||
public: | ||
virtual ~TlsContextMatchCriteria() = default; | ||
|
||
/** | ||
* @return bool indicating whether the client presented credentials. | ||
*/ | ||
virtual const absl::optional<bool>& presented() const PURE; | ||
|
||
/** | ||
* @return bool indicating whether the client credentials successfully validated against the TLS | ||
* context validation context. | ||
*/ | ||
virtual const absl::optional<bool>& validated() const PURE; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you add comment to this class and methods? |
||
}; | ||
|
||
using TlsContextMatchCriteriaConstPtr = std::unique_ptr<const TlsContextMatchCriteria>; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
#include <string> | ||
#include <vector> | ||
|
||
#include "envoy/common/pure.h" | ||
|
||
namespace Envoy { | ||
namespace Ssl { | ||
|
||
enum class ClientValidationStatus { NotValidated, NoClientCertificate, Validated, Failed }; | ||
|
||
class SslExtendedSocketInfo { | ||
public: | ||
virtual ~SslExtendedSocketInfo() = default; | ||
|
||
/** | ||
* Set the peer certificate validation status. | ||
**/ | ||
virtual void setCertificateValidationStatus(ClientValidationStatus validated) PURE; | ||
|
||
/** | ||
* @return ClientValidationStatus The peer certificate validation status. | ||
**/ | ||
virtual ClientValidationStatus certificateValidationStatus() const PURE; | ||
}; | ||
|
||
} // namespace Ssl | ||
} // namespace Envoy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the default here? Can you clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not specified, then the validated status (true or false) will not be considered for route matching - it's the same behaviour as the 'presented' field above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK can you do me a favor and clarify the docs both here and above that no value means not considered at all, a set value checks that state, etc. Feel free to phrase however you want but it was a bit unclear to me from a quick doc read. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated it, let me know if it's ok. Thanks.