Skip to main content

V2PluginConfiguration

Struct V2PluginConfiguration 

Source
pub struct V2PluginConfiguration {
Show 16 fields pub exclude_hosts: Vec<Regex>, pub exclude_paths: Vec<Regex>, pub exclude_urls: Vec<Regex>, pub access_token_header_name: Option<String>, pub access_token_header_prefix: Option<String>, pub id_token_header_name: Option<String>, pub id_token_header_prefix: Option<String>, pub cookie_name: String, pub logout_path: String, pub filter_plugin_cookies: bool, pub cookie_duration_in_s: u64, pub token_validation: bool, pub aes_key: Secret<Aes256Gcm>, pub reload_interval_in_h: u64, pub ticking_interval_in_ms: u64, pub open_id_configs: Vec<OpenIdConfig>,
}
Expand description

Struct that holds the configuration for the plugin. It is loaded from the config file envoy.yaml

Fields§

§exclude_hosts: Vec<Regex>

Exclude hosts. Example: localhost:10000

§exclude_paths: Vec<Regex>

Exclude paths. Example: /health

§exclude_urls: Vec<Regex>

Exclude urls. Example: localhost:10000/health

§access_token_header_name: Option<String>

The header name that will be used for the access token. If the header name is empty, the access token will not be forwarded

§access_token_header_prefix: Option<String>

Prefix for the access token header. If the prefix is empty, the access token will be forwarded without a prefix

§id_token_header_name: Option<String>

The header name that will be used for the id token. If the header name is empty, the id token will not be forwarded

§id_token_header_prefix: Option<String>

Prefix for the id token header. If the prefix is empty, the id token will be forwarded without a prefix

§cookie_name: String

The cookie name that will be used for the session cookie

§logout_path: String

The URL to logout the user

§filter_plugin_cookies: bool

Filter out the cookies created and controlled by the plugin If the value is true, the cookies will be filtered out

§cookie_duration_in_s: u64

The cookie duration in seconds

§token_validation: bool

Option to skip Token Validation

§aes_key: Secret<Aes256Gcm>

AES Key

§reload_interval_in_h: u64

Reload interval in hours

§ticking_interval_in_ms: u64

The interval in milliseconds that the plugin will wait for the discovery endpoint to respond or send a new request.

§open_id_configs: Vec<OpenIdConfig>

A list of OpenID Connect configurations that will be used for the filter

Implementations§

Source§

impl V2PluginConfiguration

Source

pub fn parse(config_bytes: &[u8]) -> Result<(Self, bool)>

Source

fn validate(&self) -> Result<()>

Evaluate the plugin configuration and check if the values are valid. Type checking is done by serde, so we only need to check the values.

Trait Implementations§

Source§

impl Clone for V2PluginConfiguration

Source§

fn clone(&self) -> V2PluginConfiguration

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for V2PluginConfiguration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for V2PluginConfiguration

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,