Class: TCellAgent::Configuration
- Inherits:
-
Object
- Object
- TCellAgent::Configuration
- Defined in:
- lib/tcell_agent/configuration.rb
Instance Attribute Summary collapse
-
#agent_home_dir ⇒ Object
Returns the value of attribute agent_home_dir.
-
#agent_home_owner ⇒ Object
Returns the value of attribute agent_home_owner.
-
#agent_log_dir ⇒ Object
Returns the value of attribute agent_log_dir.
-
#allow_payloads ⇒ Object
Returns the value of attribute allow_payloads.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#appfirewall_payloads_logger ⇒ Object
Returns the value of attribute appfirewall_payloads_logger.
-
#base_dir ⇒ Object
Returns the value of attribute base_dir.
-
#cache_filename ⇒ Object
Returns the value of attribute cache_filename.
-
#config_filename ⇒ Object
Returns the value of attribute config_filename.
-
#demomode ⇒ Object
Returns the value of attribute demomode.
-
#disable_all ⇒ Object
Returns the value of attribute disable_all.
-
#enable_event_consumer ⇒ Object
Returns the value of attribute enable_event_consumer.
-
#enable_event_manager ⇒ Object
Returns the value of attribute enable_event_manager.
-
#enable_instrumentation ⇒ Object
Returns the value of attribute enable_instrumentation.
-
#enable_intercept_requests ⇒ Object
Returns the value of attribute enable_intercept_requests.
-
#enable_policy_polling ⇒ Object
Returns the value of attribute enable_policy_polling.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#enabled_instrumentations ⇒ Object
Returns the value of attribute enabled_instrumentations.
-
#event_batch_size_limit ⇒ Object
Returns the value of attribute event_batch_size_limit.
-
#event_time_limit_seconds ⇒ Object
Returns the value of attribute event_time_limit_seconds.
-
#exp_config_settings ⇒ Object
Returns the value of attribute exp_config_settings.
-
#fetch_policies_from_tcell ⇒ Object
Returns the value of attribute fetch_policies_from_tcell.
-
#hmac_key ⇒ Object
Returns the value of attribute hmac_key.
-
#host_identifier ⇒ Object
Returns the value of attribute host_identifier.
-
#instrument_for_events ⇒ Object
Returns the value of attribute instrument_for_events.
-
#js_agent_api_base_url ⇒ Object
Returns the value of attribute js_agent_api_base_url.
-
#js_agent_url ⇒ Object
Returns the value of attribute js_agent_url.
-
#log_file_name ⇒ Object
Returns the value of attribute log_file_name.
-
#log_tag ⇒ Object
Returns the value of attribute log_tag.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#logging_options ⇒ Object
Returns the value of attribute logging_options.
-
#max_csp_header_bytes ⇒ Object
Returns the value of attribute max_csp_header_bytes.
-
#max_data_ex_db_records_per_request ⇒ Object
Returns the value of attribute max_data_ex_db_records_per_request.
-
#password_hmac_key ⇒ Object
Returns the value of attribute password_hmac_key.
-
#preload_policy_filename ⇒ Object
Returns the value of attribute preload_policy_filename.
-
#reverse_proxy ⇒ Object
Returns the value of attribute reverse_proxy.
-
#reverse_proxy_ip_address_header ⇒ Object
Returns the value of attribute reverse_proxy_ip_address_header.
-
#tcell_api_url ⇒ Object
Returns the value of attribute tcell_api_url.
-
#tcell_input_url ⇒ Object
Returns the value of attribute tcell_input_url.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#allow_unencrypted_appfirewall_payloads ⇒ Object
keep this around in case the value was read as well.
-
#allow_unencrypted_appfirewall_payloads=(val) ⇒ Object
old value could be set via initializers, this makes sure those initializers still work properly.
- #appfirewall_payloads_log_filename ⇒ Object
- #cache_filename_with_app_id ⇒ Object
-
#initialize(filename = "config/tcell_agent.config", useapp = nil) ⇒ Configuration
constructor
A new instance of Configuration.
- #log_filename ⇒ Object
- #read_config_from_file(filename) ⇒ Object
- #read_config_using_env ⇒ Object
- #should_consume_event? ⇒ Boolean
- #should_instrument? ⇒ Boolean
- #should_instrument_authlogic? ⇒ Boolean
- #should_instrument_devise? ⇒ Boolean
- #should_instrument_doorkeeper? ⇒ Boolean
- #should_intercept_requests? ⇒ Boolean
- #should_start_event_manager? ⇒ Boolean
- #should_start_policy_poll? ⇒ Boolean
Constructor Details
#initialize(filename = "config/tcell_agent.config", useapp = nil) ⇒ Configuration
Returns a new instance of Configuration.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/tcell_agent/configuration.rb', line 108 def initialize(filename="config/tcell_agent.config", useapp=nil) # These will be set when the agent starts up, to give rails initializers # a chance to run @cache_filename = nil @agent_log_dir = nil @log_tag = nil @logger = nil @appfirewall_payloads_logger = nil @version = 0 @exp_config_settings = true @demomode = false @fetch_policies_from_tcell = true @instrument_for_events = true @disable_all = false @enabled = true @enable_event_manager = true @enable_event_consumer = true @enable_policy_polling = true @enable_instrumentation = true @enable_intercept_requests = true @enabled_instrumentations = { :doorkeeper => true, :devise => true, :authlogic => true } @log_file_name = "tcell_agent.log" @event_batch_size_limit = 50 @event_time_limit_seconds = 15 @max_data_ex_db_records_per_request = 1000 @reverse_proxy = true @reverse_proxy_ip_address_header = nil @allow_payloads = true @max_csp_header_bytes = nil @password_hmac_key = nil @agent_home_dir = ENV["TCELL_AGENT_HOME"] || File.join(Dir.getwd, "tcell") @config_filename = ENV["TCELL_AGENT_CONFIG"] || File.join(Dir.getwd, filename) read_config_from_file(@config_filename) read_config_using_env if @demomode @event_batch_size_limit = 2 @event_time_limit_seconds = 5 end if ENV["TCELL_AGENT_ALLOW_UNENCRYPTED_APPSENSOR_PAYLOADS"] puts "tCell.io Agent: [DEPRECATED] TCELL_AGENT_ALLOW_UNENCRYPTED_APPSENSOR_PAYLOADS is deprecated and will be removed in a future release. Please switch to TCELL_AGENT_ALLOW_PAYLOADS." end if (ENV["TCELL_AGENT_ALLOW_UNENCRYPTED_APPFIREWALL_PAYLOADS"]) puts "tCell.io Agent: [DEPRECATED] TCELL_AGENT_ALLOW_UNENCRYPTED_APPFIREWALL_PAYLOADS is deprecated and will be removed in a future release. Please switch to TCELL_AGENT_ALLOW_PAYLOADS." end if (ENV["TCELL_AGENT_ALLOW_UNENCRYPTED_APPSENSOR_PAYLOADS"] != nil) @allow_payloads = [true, "true", "yes", "1"].include?(ENV["TCELL_AGENT_ALLOW_UNENCRYPTED_APPSENSOR_PAYLOADS"]) end if (ENV["TCELL_AGENT_ALLOW_UNENCRYPTED_APPFIREWALL_PAYLOADS"] != nil) @allow_payloads = [true, "true", "yes", "1"].include?(ENV["TCELL_AGENT_ALLOW_UNENCRYPTED_APPFIREWALL_PAYLOADS"]) end if (ENV["TCELL_AGENT_ALLOW_PAYLOADS"] != nil) @allow_payloads = [true, "true", "yes", "1"].include?(ENV["TCELL_AGENT_ALLOW_PAYLOADS"]) end @tcell_api_url ||= "https://api.tcell.io/api/v1" @tcell_input_url ||= "https://input.tcell.io/api/v1" @js_agent_api_base_url ||= nil @js_agent_url ||= "https://jsagent.tcell.io/tcellagent.min.js" if (@host_identifier == nil) begin @host_identifier = (Socket.gethostname() || "localhost") rescue StandardError @host_identifier = "host_identifier_not_found" end end @uuid = SecureRandom.uuid end |
Instance Attribute Details
#agent_home_dir ⇒ Object
Returns the value of attribute agent_home_dir.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def agent_home_dir @agent_home_dir end |
#agent_home_owner ⇒ Object
Returns the value of attribute agent_home_owner.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def agent_home_owner @agent_home_owner end |
#agent_log_dir ⇒ Object
Returns the value of attribute agent_log_dir.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def agent_log_dir @agent_log_dir end |
#allow_payloads ⇒ Object
Returns the value of attribute allow_payloads.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def allow_payloads @allow_payloads end |
#api_key ⇒ Object
Returns the value of attribute api_key.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def api_key @api_key end |
#app_id ⇒ Object
Returns the value of attribute app_id.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def app_id @app_id end |
#appfirewall_payloads_logger ⇒ Object
Returns the value of attribute appfirewall_payloads_logger.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def appfirewall_payloads_logger @appfirewall_payloads_logger end |
#base_dir ⇒ Object
Returns the value of attribute base_dir.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def base_dir @base_dir end |
#cache_filename ⇒ Object
Returns the value of attribute cache_filename.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def cache_filename @cache_filename end |
#config_filename ⇒ Object
Returns the value of attribute config_filename.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def config_filename @config_filename end |
#demomode ⇒ Object
Returns the value of attribute demomode.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def demomode @demomode end |
#disable_all ⇒ Object
Returns the value of attribute disable_all.
52 53 54 |
# File 'lib/tcell_agent/configuration.rb', line 52 def disable_all @disable_all end |
#enable_event_consumer ⇒ Object
Returns the value of attribute enable_event_consumer.
52 53 54 |
# File 'lib/tcell_agent/configuration.rb', line 52 def enable_event_consumer @enable_event_consumer end |
#enable_event_manager ⇒ Object
Returns the value of attribute enable_event_manager.
52 53 54 |
# File 'lib/tcell_agent/configuration.rb', line 52 def enable_event_manager @enable_event_manager end |
#enable_instrumentation ⇒ Object
Returns the value of attribute enable_instrumentation.
52 53 54 |
# File 'lib/tcell_agent/configuration.rb', line 52 def enable_instrumentation @enable_instrumentation end |
#enable_intercept_requests ⇒ Object
Returns the value of attribute enable_intercept_requests.
52 53 54 |
# File 'lib/tcell_agent/configuration.rb', line 52 def enable_intercept_requests @enable_intercept_requests end |
#enable_policy_polling ⇒ Object
Returns the value of attribute enable_policy_polling.
52 53 54 |
# File 'lib/tcell_agent/configuration.rb', line 52 def enable_policy_polling @enable_policy_polling end |
#enabled ⇒ Object
Returns the value of attribute enabled.
52 53 54 |
# File 'lib/tcell_agent/configuration.rb', line 52 def enabled @enabled end |
#enabled_instrumentations ⇒ Object
Returns the value of attribute enabled_instrumentations.
60 61 62 |
# File 'lib/tcell_agent/configuration.rb', line 60 def enabled_instrumentations @enabled_instrumentations end |
#event_batch_size_limit ⇒ Object
Returns the value of attribute event_batch_size_limit.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def event_batch_size_limit @event_batch_size_limit end |
#event_time_limit_seconds ⇒ Object
Returns the value of attribute event_time_limit_seconds.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def event_time_limit_seconds @event_time_limit_seconds end |
#exp_config_settings ⇒ Object
Returns the value of attribute exp_config_settings.
62 63 64 |
# File 'lib/tcell_agent/configuration.rb', line 62 def exp_config_settings @exp_config_settings end |
#fetch_policies_from_tcell ⇒ Object
Returns the value of attribute fetch_policies_from_tcell.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def fetch_policies_from_tcell @fetch_policies_from_tcell end |
#hmac_key ⇒ Object
Returns the value of attribute hmac_key.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def hmac_key @hmac_key end |
#host_identifier ⇒ Object
Returns the value of attribute host_identifier.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def host_identifier @host_identifier end |
#instrument_for_events ⇒ Object
Returns the value of attribute instrument_for_events.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def instrument_for_events @instrument_for_events end |
#js_agent_api_base_url ⇒ Object
Returns the value of attribute js_agent_api_base_url.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def js_agent_api_base_url @js_agent_api_base_url end |
#js_agent_url ⇒ Object
Returns the value of attribute js_agent_url.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def js_agent_url @js_agent_url end |
#log_file_name ⇒ Object
Returns the value of attribute log_file_name.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def log_file_name @log_file_name end |
#log_tag ⇒ Object
Returns the value of attribute log_tag.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def log_tag @log_tag end |
#logger ⇒ Object
Returns the value of attribute logger.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def logger @logger end |
#logging_options ⇒ Object
Returns the value of attribute logging_options.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def end |
#max_csp_header_bytes ⇒ Object
Returns the value of attribute max_csp_header_bytes.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def max_csp_header_bytes @max_csp_header_bytes end |
#max_data_ex_db_records_per_request ⇒ Object
Returns the value of attribute max_data_ex_db_records_per_request.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def max_data_ex_db_records_per_request @max_data_ex_db_records_per_request end |
#password_hmac_key ⇒ Object
Returns the value of attribute password_hmac_key.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def password_hmac_key @password_hmac_key end |
#preload_policy_filename ⇒ Object
Returns the value of attribute preload_policy_filename.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def preload_policy_filename @preload_policy_filename end |
#reverse_proxy ⇒ Object
Returns the value of attribute reverse_proxy.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def reverse_proxy @reverse_proxy end |
#reverse_proxy_ip_address_header ⇒ Object
Returns the value of attribute reverse_proxy_ip_address_header.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def reverse_proxy_ip_address_header @reverse_proxy_ip_address_header end |
#tcell_api_url ⇒ Object
Returns the value of attribute tcell_api_url.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def tcell_api_url @tcell_api_url end |
#tcell_input_url ⇒ Object
Returns the value of attribute tcell_input_url.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def tcell_input_url @tcell_input_url end |
#uuid ⇒ Object
Returns the value of attribute uuid.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def uuid @uuid end |
#version ⇒ Object
Returns the value of attribute version.
24 25 26 |
# File 'lib/tcell_agent/configuration.rb', line 24 def version @version end |
Instance Method Details
#allow_unencrypted_appfirewall_payloads ⇒ Object
keep this around in case the value was read as well
326 327 328 |
# File 'lib/tcell_agent/configuration.rb', line 326 def allow_unencrypted_appfirewall_payloads @allow_payloads end |
#allow_unencrypted_appfirewall_payloads=(val) ⇒ Object
old value could be set via initializers, this makes sure those initializers still work properly
322 323 324 |
# File 'lib/tcell_agent/configuration.rb', line 322 def allow_unencrypted_appfirewall_payloads=(val) @allow_payloads = val end |
#appfirewall_payloads_log_filename ⇒ Object
335 336 337 338 |
# File 'lib/tcell_agent/configuration.rb', line 335 def appfirewall_payloads_log_filename @agent_log_dir ||= File.join(@agent_home_dir, "logs") File.join(@agent_log_dir, "tcell_agent_payloads.log") end |
#cache_filename_with_app_id ⇒ Object
197 198 199 200 201 202 203 204 205 |
# File 'lib/tcell_agent/configuration.rb', line 197 def cache_filename_with_app_id @cache_filename ||= File.join(@agent_home_dir, "cache", "tcell_agent.cache") if @app_id "#{@cache_filename}.#{@app_id}" else @cache_filename end end |
#log_filename ⇒ Object
330 331 332 333 |
# File 'lib/tcell_agent/configuration.rb', line 330 def log_filename @agent_log_dir ||= File.join(@agent_home_dir, "logs") File.join(@agent_log_dir, @log_file_name) end |
#read_config_from_file(filename) ⇒ Object
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/tcell_agent/configuration.rb', line 221 def read_config_from_file(filename) if File.file?(filename) #puts "tCell.io: Loading from file" begin config_text = File.open(filename).read config = JSON.parse(config_text) = TCellAgent::Config::Validate.(config) .each do || puts end if (config["version"] == 1) # Required app_data = config["applications"][0] #Default @version = 1 @app_id = app_data["app_id"] @api_key = app_data["api_key"] # Optional @preload_policy_filename = app_data.fetch("preload_policy_filename", nil) @disable_all = app_data.fetch("disable_all", @disable_all) @enabled = app_data.fetch("enabled", @enabled) @enable_event_manager = app_data.fetch("enable_event_manager", @enable_event_manager) @enable_event_consumer = app_data.fetch("enable_event_consumer", @enable_event_consumer) @enable_policy_polling = app_data.fetch("enable_policy_polling", @enable_policy_polling) @enable_instrumentation = app_data.fetch("enable_instrumentation", @enable_instrumentation) @enable_intercept_requests = app_data.fetch("enable_intercept_requests", @enable_intercept_requests) @fetch_policies_from_tcell = app_data.fetch("fetch_policies_from_tcell", @fetch_policies_from_tcell) @instrument_for_events = app_data.fetch("instrument_for_events", @instrument_for_events) @agent_home_owner = app_data.fetch("agent_home_owner", @agent_home_owner) = app_data.fetch("logging_options", {}) @agent_log_dir = app_data.fetch("log_dir", @agent_log_dir) @log_file_name = .fetch("filename", @log_file_name) @tcell_api_url = app_data.fetch("tcell_api_url", @tcell_api_url) @tcell_input_url = app_data.fetch("tcell_input_url", @tcell_input_url) @max_csp_header_bytes = app_data.fetch("max_csp_header_bytes", @max_csp_header_bytes) @allow_payloads = app_data.fetch( 'allow_unencrypted_appsensor_payloads', @allow_payloads ) @allow_payloads = app_data.fetch( 'allow_unencrypted_appfirewall_payloads', @allow_payloads ) @allow_payloads = app_data.fetch( 'allow_payloads', @allow_payloads ) data_exposure = app_data.fetch('data_exposure', {}) @max_data_ex_db_records_per_request = data_exposure.fetch('max_data_ex_db_records_per_request', @max_data_ex_db_records_per_request) @enabled_instrumentations = app_data.fetch('enabled_instrumentations', @enabled_instrumentations) @reverse_proxy = app_data.fetch('reverse_proxy', @reverse_proxy) @reverse_proxy_ip_address_header = app_data.fetch('reverse_proxy_ip_address_header', @reverse_proxy_ip_address_header) @host_identifier = app_data.fetch("host_identifier", @host_identifier) @hmac_key = app_data.fetch("hmac_key", @hmac_key) @password_hmac_key = app_data.fetch("password_hmac_key", @password_hmac_key) @uuid = SecureRandom.uuid if (@uuid == nil) @uuid = "secure-random-failed" end if app_data.key?("js_agent_api_base_url") @js_agent_api_base_url = app_data["js_agent_api_base_url"] end if app_data.key?("js_agent_url") @js_agent_url = app_data["js_agent_url"] end @demomode = app_data.fetch('demomode', @demomode) else puts " ********* ********* ********* *********" puts "* tCell.io *" puts "* Unsupported config file version *" puts " ********* ********* ********* *********" end rescue StandardError => e puts " ********* ********* ********* *********" puts "* tCell.io *" puts "* Could not load config file *" puts " ********* ********* ********* *********" puts e end #begin end # filename exist end |
#read_config_using_env ⇒ Object
207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/tcell_agent/configuration.rb', line 207 def read_config_using_env @app_id = ENV["TCELL_AGENT_APP_ID"] || @app_id @api_key = ENV["TCELL_AGENT_API_KEY"] || @api_key @hmac_key = ENV["TCELL_HMAC_KEY"] || @hmac_key @password_hmac_key = ENV["TCELL_PASSWORD_HMAC_KEY"] || @password_hmac_key @host_identifier = ENV["TCELL_AGENT_HOST_IDENTIFIER"] || @host_identifier @tcell_api_url = ENV["TCELL_API_URL"] || @tcell_api_url @tcell_input_url = ENV["TCELL_INPUT_URL"] || @tcell_input_url @demomode = ENV["TCELL_DEMOMODE"] || @demomode @agent_home_owner = ENV["TCELL_AGENT_HOME_OWNER"] || @agent_home_owner @agent_log_dir = ENV["TCELL_AGENT_LOG_DIR"] || @agent_log_dir end |
#should_consume_event? ⇒ Boolean
68 69 70 |
# File 'lib/tcell_agent/configuration.rb', line 68 def should_consume_event? @enabled && @enable_event_manager && @enable_event_consumer end |
#should_instrument? ⇒ Boolean
76 77 78 |
# File 'lib/tcell_agent/configuration.rb', line 76 def should_instrument? @enabled && @enable_instrumentation && @instrument_for_events # instrument_for_events = legacy end |
#should_instrument_authlogic? ⇒ Boolean
100 101 102 103 104 105 106 |
# File 'lib/tcell_agent/configuration.rb', line 100 def should_instrument_authlogic? if @enabled_instrumentations.has_key?('authlogic') || @enabled_instrumentations.has_key?(:authlogic) !!(@enabled_instrumentations['authlogic'] || @enabled_instrumentations[:authlogic]) else true end end |
#should_instrument_devise? ⇒ Boolean
92 93 94 95 96 97 98 |
# File 'lib/tcell_agent/configuration.rb', line 92 def should_instrument_devise? if @enabled_instrumentations.has_key?('devise') || @enabled_instrumentations.has_key?(:devise) !!(@enabled_instrumentations['devise'] || @enabled_instrumentations[:devise]) else true end end |
#should_instrument_doorkeeper? ⇒ Boolean
84 85 86 87 88 89 90 |
# File 'lib/tcell_agent/configuration.rb', line 84 def should_instrument_doorkeeper? if @enabled_instrumentations.has_key?('doorkeeper') || @enabled_instrumentations.has_key?(:doorkeeper) !!(@enabled_instrumentations['doorkeeper'] || @enabled_instrumentations[:doorkeeper]) else true end end |
#should_intercept_requests? ⇒ Boolean
80 81 82 |
# File 'lib/tcell_agent/configuration.rb', line 80 def should_intercept_requests? @enabled && @enable_instrumentation && @enable_intercept_requests end |
#should_start_event_manager? ⇒ Boolean
64 65 66 |
# File 'lib/tcell_agent/configuration.rb', line 64 def should_start_event_manager? @enabled && @enable_event_manager end |
#should_start_policy_poll? ⇒ Boolean
72 73 74 |
# File 'lib/tcell_agent/configuration.rb', line 72 def should_start_policy_poll? @enabled && @enable_policy_polling && @fetch_policies_from_tcell # fetch_policies_from_tcel = legacy end |