Skip to main content

EntitySetting

Struct EntitySetting 

Source
#[non_exhaustive]
pub struct EntitySetting {
Show 35 fields pub entity_id: Option<String>, pub request_signature_algorithm: String, pub data_encryption_algorithm: String, pub key_encryption_algorithm: String, pub message_signing_order: MessageSignatureOrder, pub allow_create: bool, pub is_assertion_encrypted: bool, pub allow_insecure_software_rsa_key_transport_decryption: bool, pub relay_state: String, pub authn_requests_signed: bool, pub want_assertions_signed: bool, pub validate_audience: bool, pub want_message_signed: bool, pub want_authn_requests_signed: bool, pub want_logout_request_signed: bool, pub want_logout_response_signed: bool, pub name_id_format: Vec<String>, pub private_key: Option<String>, pub private_key_pass: Option<String>, pub signing_cert: Option<String>, pub encrypt_cert: Option<String>, pub enc_private_key: Option<String>, pub enc_private_key_pass: Option<String>, pub clock_drifts: (i64, i64), pub redirect_inflate_max_bytes: usize, pub xml_limits: XmlLimits, pub tag_prefix_protocol: String, pub tag_prefix_assertion: String, pub tag_prefix_encrypted_assertion: String, pub login_response_template: Option<LoginResponseTemplate>, pub login_request_template: Option<String>, pub logout_request_template: Option<String>, pub logout_response_template: Option<String>, pub signature_config: Option<SignatureConfig>, pub transformation_algorithms: Vec<String>,
}
Expand description

Compatibility export for older crate-root imports. Use Saml for new integrations; advanced raw callers should import raw::EntitySetting. Runtime configuration for an entity (keys, algorithms, flags).

Use EntitySetting::default and tweak the fields you need.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§entity_id: Option<String>

Override entity ID (otherwise taken from metadata).

§request_signature_algorithm: String

Signature algorithm URI for outgoing signatures.

§data_encryption_algorithm: String

Data encryption algorithm URI.

§key_encryption_algorithm: String

Key encryption algorithm URI.

§message_signing_order: MessageSignatureOrder

Sign-then-encrypt vs encrypt-then-sign.

§allow_create: bool

AllowCreate for the NameIDPolicy.

§is_assertion_encrypted: bool

Whether assertions are encrypted.

§allow_insecure_software_rsa_key_transport_decryption: bool

Allow XML-Enc RSA key-transport decryption with the bundled software RSA backend.

This is disabled by default because bergshamra currently reaches the RustCrypto rsa crate, which is affected by RUSTSEC-2023-0071 when an attacker can observe timing. Prefer an external/HSM decryptor once one is exposed through the public API; enable this only as an explicit compatibility exception for deployments that accept that risk.

§relay_state: String

Default RelayState.

§authn_requests_signed: bool

SP: signs its AuthnRequests.

§want_assertions_signed: bool

SP: requires signed assertions.

§validate_audience: bool

SP: reject a <Response> whose <Audience> is not this entity (default true).

§want_message_signed: bool

SP: requires signed messages.

§want_authn_requests_signed: bool

IdP: requires signed AuthnRequests.

§want_logout_request_signed: bool

Requires signed LogoutRequest (default true).

§want_logout_response_signed: bool

Requires signed LogoutResponse.

§name_id_format: Vec<String>

Supported NameID formats.

§private_key: Option<String>

Signing private key (PEM).

§private_key_pass: Option<String>

Passphrase for private_key.

§signing_cert: Option<String>

Signing certificate (PEM/base64).

§encrypt_cert: Option<String>

Encryption certificate (PEM/base64).

§enc_private_key: Option<String>

Decryption private key (PEM).

§enc_private_key_pass: Option<String>

Passphrase for enc_private_key.

§clock_drifts: (i64, i64)

Clock drift tolerance (not_before_ms, not_on_or_after_ms).

§redirect_inflate_max_bytes: usize

Maximum decoded compressed and inflated raw-DEFLATE bytes accepted for HTTP-Redirect input.

SAML does not define this limit; the default is a conservative resource-exhaustion guard for unauthenticated Redirect messages.

§xml_limits: XmlLimits

XML parser resource limits for inbound messages and metadata parsing.

§tag_prefix_protocol: String

IdP: protocol tag prefix for generated IdP messages (default samlp).

§tag_prefix_assertion: String

IdP: assertion tag prefix for generated IdP messages (default saml).

§tag_prefix_encrypted_assertion: String

IdP: tag prefix for the <EncryptedAssertion> element (default saml).

§login_response_template: Option<LoginResponseTemplate>

IdP: login <Response> template + attribute configuration.

§login_request_template: Option<String>

SP: custom <AuthnRequest> template (None uses the default).

§logout_request_template: Option<String>

Custom <LogoutRequest> template (None uses the default).

§logout_response_template: Option<String>

Custom <LogoutResponse> template (None uses the default).

§signature_config: Option<SignatureConfig>

Custom embedded-signature placement/prefix (None uses the default).

§transformation_algorithms: Vec<String>

XML-DSig transforms applied to signed references (default enveloped-signature + exclusive C14N).

Trait Implementations§

Source§

impl Clone for EntitySetting

Source§

fn clone(&self) -> EntitySetting

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 EntitySetting

Source§

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

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

impl Default for EntitySetting

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl TryFrom<&IdpConfig> for EntitySetting

Source§

type Error = SamlError

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

fn try_from(config: &IdpConfig) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&SpConfig> for EntitySetting

Source§

type Error = SamlError

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

fn try_from(config: &SpConfig) -> Result<Self, Self::Error>

Performs the conversion.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
Source§

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

Source§

fn vzip(self) -> V