class
Saml::Settings
- Saml::Settings
- Reference
- Object
Overview
SAML2 Toolkit Settings. Build one per request from stored configuration; nothing here is global.
Defined in:
saml/settings.crConstant Summary
-
DEFAULT_SECURITY =
{:authn_requests_signed => false, :logout_requests_signed => false, :logout_responses_signed => false, :want_assertions_signed => false, :want_assertions_encrypted => false, :want_name_id => false, :metadata_signed => false, :embed_sign => false, :digest_method => XMLSecurity::Document::SHA1, :signature_method => XMLSecurity::Document::RSA_SHA1, :check_idp_cert_expiration => false, :check_sp_cert_expiration => false, :strict_audience_validation => false, :lowercase_url_encoding => false} of Symbol => SecurityValue -
DEFAULTS =
{:assertion_consumer_service_binding => Utils::BINDINGS[:post], :single_logout_service_binding => Utils::BINDINGS[:redirect], :idp_cert_fingerprint_algorithm => XMLSecurity::Document::SHA1, :compress_request => true, :compress_response => true, :message_max_bytesize => 250000, :soft => true, :check_malformed_doc => true, :double_quote_xml_attribute_values => false, :security => DEFAULT_SECURITY} of Symbol => Value
Constructors
-
.new(overrides : Hash = {} of Symbol => Value, keep_security_attributes = false)
overrides maps setting names (symbols) to values; a :security hash replaces the default security settings unless keep_security_attributes, in which case it is merged over them.
Instance Method Summary
- #assertion_consumer_logout_service_binding : String | Nil
- #assertion_consumer_logout_service_binding=(value : String | Symbol | Nil)
-
#assertion_consumer_logout_service_url : String | Nil
Deprecated
-
#assertion_consumer_logout_service_url=(assertion_consumer_logout_service_url : String | Nil)
Deprecated
- #assertion_consumer_service_binding : String | Nil
- #assertion_consumer_service_binding=(value : String | Symbol | Nil)
- #assertion_consumer_service_url : String | Nil
- #assertion_consumer_service_url=(assertion_consumer_service_url : String | Nil)
- #attribute_consuming_service : AttributeService
- #attributes_index : Int32 | Nil
- #attributes_index=(attributes_index : Int32 | Nil)
- #authn_context : String | Array(String) | Nil
- #authn_context=(authn_context : String | Array(String) | Nil)
- #authn_context_comparison : String | Nil
- #authn_context_comparison=(authn_context_comparison : String | Nil)
- #authn_context_decl_ref : String | Array(String) | Nil
- #authn_context_decl_ref=(authn_context_decl_ref : String | Array(String) | Nil)
- #certificate : String | Nil
- #certificate=(certificate : String | Nil)
- #certificate_new : String | Nil
- #certificate_new=(certificate_new : String | Nil)
-
#check_malformed_doc : Bool
Malformed XML is always refused; kept for compatibility.
-
#check_malformed_doc=(check_malformed_doc : Bool)
Malformed XML is always refused; kept for compatibility.
- #compress_request : Bool
- #compress_request=(compress_request : Bool)
- #compress_response : Bool
- #compress_response=(compress_response : Bool)
- #double_quote_xml_attribute_values : Bool
- #double_quote_xml_attribute_values=(double_quote_xml_attribute_values : Bool)
- #force_authn : Bool | Nil
- #force_authn=(force_authn : Bool | Nil)
- #get_binding(value : String | Symbol | Nil) : String | Nil
-
#get_fingerprint : String | Nil
Calculates the fingerprint of the IdP x509 certificate.
-
#get_idp_cert : OpenSSL::X509::Certificate | Nil
@return [OpenSSL::X509::Certificate|nil] Build the IdP certificate from the settings
-
#get_idp_cert_multi : Hash(Symbol, Array(OpenSSL::X509::Certificate)) | Nil
@return [Hash with 2 arrays of OpenSSL::X509::Certificate] Build multiple IdP certificates from the settings.
-
#get_sp_cert : OpenSSL::X509::Certificate | Nil
@return [OpenSSL::X509::Certificate|nil] The SP certificate
-
#get_sp_cert_new : OpenSSL::X509::Certificate | Nil
@return [OpenSSL::X509::Certificate|nil] The new SP certificate (during a rotation)
-
#get_sp_decryption_keys : Array(OpenSSL::PKey::RSA)
Keys an encrypted assertion may be decrypted with.
-
#get_sp_key : OpenSSL::PKey::RSA | Nil
@return [OpenSSL::PKey::RSA|nil] The SP private key
- #get_sp_key_text : String | Nil
- #idp_attribute_names : Array(String) | Nil
- #idp_attribute_names=(idp_attribute_names : Array(String) | Nil)
- #idp_binding_from_embed_sign : String
- #idp_cert : String | Nil
- #idp_cert=(idp_cert : String | Nil)
- #idp_cert_fingerprint : String | Nil
- #idp_cert_fingerprint=(idp_cert_fingerprint : String | Nil)
- #idp_cert_fingerprint_algorithm : String | Nil
- #idp_cert_fingerprint_algorithm=(idp_cert_fingerprint_algorithm : String | Nil)
- #idp_cert_multi : Hash(Symbol, Array(String)) | Nil
- #idp_cert_multi=(value : Nil)
-
#idp_cert_multi=(value : Hash)
Accepts symbol or string keys (:signing / :encryption).
-
#idp_entity_id : String | Nil
IdP Data
-
#idp_entity_id=(idp_entity_id : String | Nil)
IdP Data
- #idp_name_qualifier : String | Nil
- #idp_name_qualifier=(idp_name_qualifier : String | Nil)
-
#idp_signing_certificates : Array(OpenSSL::X509::Certificate)
Every IdP signing certificate configured (the multi list, else idp_cert).
- #idp_slo_response_service_url : String | Nil
- #idp_slo_response_service_url=(idp_slo_response_service_url : String | Nil)
-
#idp_slo_service_binding : String | Nil
@return [String] IdP Single Logout Service Binding
- #idp_slo_service_binding=(value : String | Symbol | Nil)
-
#idp_slo_service_url : String | Nil
@return [String] IdP Single Logout Service URL
- #idp_slo_service_url=(idp_slo_service_url : String | Nil)
- #idp_slo_target_url : String | Nil
- #idp_slo_target_url=(idp_slo_target_url : String | Nil)
-
#idp_sso_service_binding : String | Nil
@return [String] IdP Single Sign On Service Binding
- #idp_sso_service_binding=(value : String | Symbol | Nil)
-
#idp_sso_service_url : String | Nil
@return [String] IdP Single Sign On Service URL
- #idp_sso_service_url=(idp_sso_service_url : String | Nil)
- #idp_sso_target_url : String | Nil
- #idp_sso_target_url=(idp_sso_target_url : String | Nil)
- #issuer : String | Nil
- #issuer=(issuer : String | Nil)
- #message_max_bytesize : Int32
- #message_max_bytesize=(message_max_bytesize : Int32)
- #name_identifier_format : String | Nil
- #name_identifier_format=(name_identifier_format : String | Nil)
- #name_identifier_value : String | Nil
- #name_identifier_value=(name_identifier_value : String | Nil)
- #name_identifier_value_requested : String | Nil
- #name_identifier_value_requested=(name_identifier_value_requested : String | Nil)
- #passive : Bool | Nil
- #passive=(passive : Bool | Nil)
- #private_key : String | Nil
- #private_key=(private_key : String | Nil)
- #protocol_binding : String | Nil
- #protocol_binding=(value : String | Symbol | Nil)
-
#security : Hash(Symbol, SecurityValue)
Work-flow
-
#security=(security : Hash(Symbol, SecurityValue))
Work-flow
- #sessionindex : String | Nil
- #sessionindex=(sessionindex : String | Nil)
-
#set_option(key : Symbol | String, value) : Bool
Sets one setting by name; unknown names are ignored.
-
#single_logout_service_binding : String | Nil
@return [String] Single Logout Service Binding.
- #single_logout_service_binding=(value : String | Symbol | Nil)
-
#single_logout_service_url : String | Nil
@return [String] Single Logout Service URL.
- #single_logout_service_url=(single_logout_service_url : String | Nil)
- #soft : Bool
- #soft=(soft : Bool)
-
#sp_entity_id : String | Nil
@return [String] SP Entity ID
-
#sp_entity_id=(sp_entity_id : String | Nil)
SP Data
- #sp_name_qualifier : String | Nil
- #sp_name_qualifier=(sp_name_qualifier : String | Nil)
- #valid_until : Time | Nil
- #valid_until=(value : Time | Nil)
- #valid_until=(value : String)
Constructor Detail
overrides maps setting names (symbols) to values; a :security hash replaces the default security settings unless keep_security_attributes, in which case it is merged over them.
Instance Method Detail
Deprecated
Malformed XML is always refused; kept for compatibility.
@return [OpenSSL::X509::Certificate|nil] Build the IdP certificate from the settings
@return [Hash with 2 arrays of OpenSSL::X509::Certificate] Build multiple IdP certificates from the settings.
@return [OpenSSL::X509::Certificate|nil] The SP certificate
@return [OpenSSL::X509::Certificate|nil] The new SP certificate (during a rotation)
Keys an encrypted assertion may be decrypted with.
Every IdP signing certificate configured (the multi list, else idp_cert).
Sets one setting by name; unknown names are ignored. Returns whether the name was known.