pub struct GatewayTlsFrontendDefaultValidation {
pub ca_certificate_refs: Vec<GatewayTlsFrontendDefaultValidationCaCertificateRefs>,
pub mode: Option<GatewayTlsFrontendDefaultValidationMode>,
}Expand description
Validation holds configuration information for validating the frontend (client). Setting this field will result in mutual authentication when connecting to the gateway. In browsers this may result in a dialog appearing that requests a user to specify the client certificate. The maximum depth of a certificate chain accepted in verification is Implementation specific.
Support: Core
Fields§
§ca_certificate_refs: Vec<GatewayTlsFrontendDefaultValidationCaCertificateRefs>CACertificateRefs contains one or more references to Kubernetes objects that contain a PEM-encoded TLS CA certificate bundle, which is used as a trust anchor to validate the certificates presented by the client.
A CACertificateRef is invalid if:
-
It refers to a resource that cannot be resolved (e.g., the referenced resource does not exist) or is misconfigured (e.g., a ConfigMap does not contain a key named
ca.crt). In this case, the Reason on all matching HTTPS listeners must be set toInvalidCACertificateRefand the Message of the Condition must indicate which reference is invalid and why. -
It refers to an unknown or unsupported kind of resource. In this case, the Reason on all matching HTTPS listeners must be set to
InvalidCACertificateKindand the Message of the Condition must explain which kind of resource is unknown or unsupported. -
It refers to a resource in another namespace UNLESS there is a ReferenceGrant in the target namespace that allows the CA certificate to be attached. If a ReferenceGrant does not allow this reference, the
ResolvedRefson all matching HTTPS listeners condition MUST be set with the ReasonRefNotPermitted.
Implementations MAY choose to perform further validation of the certificate content (e.g., checking expiry or enforcing specific formats). In such cases, an implementation-specific Reason and Message MUST be set.
In all cases, the implementation MUST ensure that the ResolvedRefs
condition is set to status: False on all targeted listeners (i.e.,
listeners serving HTTPS on a matching port). The condition MUST
include a Reason and Message that indicate the cause of the error. If
ALL CACertificateRefs are invalid, the implementation MUST also ensure
the Accepted condition on the listener is set to status: False, with
the Reason NoValidCACertificate.
Implementations MAY choose to support attaching multiple CA certificates
to a listener, but this behavior is implementation-specific.
Support: Core - A single reference to a Kubernetes ConfigMap, with the
CA certificate in a key named ca.crt.
Support: Implementation-specific - More than one reference, other kinds of resources, or a single reference that includes multiple certificates.
mode: Option<GatewayTlsFrontendDefaultValidationMode>FrontendValidationMode defines the mode for validating the client certificate. There are two possible modes:
-
AllowValidOnly: In this mode, the gateway will accept connections only if the client presents a valid certificate. This certificate must successfully pass validation against the CA certificates specified in
CACertificateRefs. -
AllowInsecureFallback: In this mode, the gateway will accept connections even if the client certificate is not presented or fails verification.
This approach delegates client authorization to the backend and introduce a significant security risk. It should be used in testing environments or on a temporary basis in non-testing environments.
Defaults to AllowValidOnly.
Support: Core
Trait Implementations§
Source§impl Clone for GatewayTlsFrontendDefaultValidation
impl Clone for GatewayTlsFrontendDefaultValidation
Source§fn clone(&self) -> GatewayTlsFrontendDefaultValidation
fn clone(&self) -> GatewayTlsFrontendDefaultValidation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for GatewayTlsFrontendDefaultValidation
impl Default for GatewayTlsFrontendDefaultValidation
Source§fn default() -> GatewayTlsFrontendDefaultValidation
fn default() -> GatewayTlsFrontendDefaultValidation
Source§impl<'de> Deserialize<'de> for GatewayTlsFrontendDefaultValidation
impl<'de> Deserialize<'de> for GatewayTlsFrontendDefaultValidation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for GatewayTlsFrontendDefaultValidation
impl JsonSchema for GatewayTlsFrontendDefaultValidation
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for GatewayTlsFrontendDefaultValidation
impl PartialEq for GatewayTlsFrontendDefaultValidation
Source§fn eq(&self, other: &GatewayTlsFrontendDefaultValidation) -> bool
fn eq(&self, other: &GatewayTlsFrontendDefaultValidation) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GatewayTlsFrontendDefaultValidation
Auto Trait Implementations§
impl Freeze for GatewayTlsFrontendDefaultValidation
impl RefUnwindSafe for GatewayTlsFrontendDefaultValidation
impl Send for GatewayTlsFrontendDefaultValidation
impl Sync for GatewayTlsFrontendDefaultValidation
impl Unpin for GatewayTlsFrontendDefaultValidation
impl UnsafeUnpin for GatewayTlsFrontendDefaultValidation
impl UnwindSafe for GatewayTlsFrontendDefaultValidation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more