Class: Hatchet::TLSConfig
- Inherits:
-
Object
- Object
- Hatchet::TLSConfig
- Defined in:
- lib/hatchet/config.rb
Overview
TLS configuration for client connections
Instance Attribute Summary collapse
-
#cert_file ⇒ String?
Path to client certificate file for mTLS.
-
#key_file ⇒ String?
Path to client private key file for mTLS.
-
#root_ca_file ⇒ String?
Path to root CA certificate file.
-
#server_name ⇒ String
Server name for TLS verification.
-
#strategy ⇒ String
TLS strategy (“tls”, “mtls”, “insecure”).
Instance Method Summary collapse
-
#initialize(**options) ⇒ TLSConfig
constructor
Initialize TLS configuration.
Constructor Details
#initialize(**options) ⇒ TLSConfig
Initialize TLS configuration
43 44 45 46 47 48 49 |
# File 'lib/hatchet/config.rb', line 43 def initialize(**) @strategy = [:strategy] || env_var("HATCHET_CLIENT_TLS_STRATEGY") || "tls" @cert_file = [:cert_file] || env_var("HATCHET_CLIENT_TLS_CERT_FILE") @key_file = [:key_file] || env_var("HATCHET_CLIENT_TLS_KEY_FILE") @root_ca_file = [:root_ca_file] || env_var("HATCHET_CLIENT_TLS_ROOT_CA_FILE") @server_name = [:server_name] || env_var("HATCHET_CLIENT_TLS_SERVER_NAME") || "" end |
Instance Attribute Details
#cert_file ⇒ String?
Returns Path to client certificate file for mTLS.
32 |
# File 'lib/hatchet/config.rb', line 32 attr_accessor :server_name |
#key_file ⇒ String?
Returns Path to client private key file for mTLS.
32 |
# File 'lib/hatchet/config.rb', line 32 attr_accessor :server_name |
#root_ca_file ⇒ String?
Returns Path to root CA certificate file.
32 |
# File 'lib/hatchet/config.rb', line 32 attr_accessor :server_name |
#server_name ⇒ String
Returns Server name for TLS verification.
32 33 34 |
# File 'lib/hatchet/config.rb', line 32 def server_name @server_name end |
#strategy ⇒ String
Returns TLS strategy (“tls”, “mtls”, “insecure”).
32 |
# File 'lib/hatchet/config.rb', line 32 attr_accessor :server_name |