pub struct AttributeContext {
pub source: Option<Peer>,
pub destination: Option<Peer>,
pub request: Option<Request>,
pub context_extensions: HashMap<String, String>,
pub metadata_context: Option<Metadata>,
pub route_metadata_context: Option<Metadata>,
pub tls_session: Option<TlsSession>,
}
Expand description
An attribute is a piece of metadata that describes an activity on a network. For example, the size of an HTTP request, or the status code of an HTTP response.
Each attribute has a type and a name, which is logically defined as a proto message field
of the AttributeContext
. The AttributeContext
is a collection of individual attributes
supported by Envoy authorization system.
[#comment: The following items are left out of this proto
Request.Auth field for jwt tokens
Request.Api for api management
Origin peer that originated the request
Caching Protocol
request_context return values to inject back into the filter chain
peer.claims – from X.509 extensions
Configuration
- field mask to send
- which return values from request_context are copied back
- which return values are copied into request_headers] [#next-free-field: 14]
Fields§
§source: Option<Peer>
The source of a network activity, such as starting a TCP connection. In a multi hop network activity, the source represents the sender of the last hop.
destination: Option<Peer>
The destination of a network activity, such as accepting a TCP connection. In a multi hop network activity, the destination represents the receiver of the last hop.
request: Option<Request>
Represents a network request, such as an HTTP request.
context_extensions: HashMap<String, String>
This is analogous to http_request.headers, however these contents will not be sent to the upstream server. Context_extensions provide an extension mechanism for sending additional information to the auth server without modifying the proto definition. It maps to the internal opaque context in the filter chain.
metadata_context: Option<Metadata>
Dynamic metadata associated with the request.
route_metadata_context: Option<Metadata>
Metadata associated with the selected route.
tls_session: Option<TlsSession>
TLS session details of the underlying connection.
This is not populated by default and will be populated only if the ext_authz filter has
been specifically configured to include this information.
For HTTP ext_authz, that requires :ref:include_tls_session <config_http_filters_ext_authz>
to be set to true.
For network ext_authz, that requires :ref:include_tls_session <config_network_filters_ext_authz>
to be set to true.
Trait Implementations§
Source§impl Clone for AttributeContext
impl Clone for AttributeContext
Source§fn clone(&self) -> AttributeContext
fn clone(&self) -> AttributeContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AttributeContext
impl Debug for AttributeContext
Source§impl Default for AttributeContext
impl Default for AttributeContext
Source§impl Message for AttributeContext
impl Message for AttributeContext
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for AttributeContext
impl Name for AttributeContext
Source§const NAME: &'static str = "AttributeContext"
const NAME: &'static str = "AttributeContext"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.service.auth.v3"
const PACKAGE: &'static str = "envoy.service.auth.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for AttributeContext
impl PartialEq for AttributeContext
impl StructuralPartialEq for AttributeContext
Auto Trait Implementations§
impl Freeze for AttributeContext
impl RefUnwindSafe for AttributeContext
impl Send for AttributeContext
impl Sync for AttributeContext
impl Unpin for AttributeContext
impl UnwindSafe for AttributeContext
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request