Class: Contrast::Agent::Protect::Policy::Policy

Inherits:
Contrast::Agent::Patching::Policy::Policy show all
Defined in:
lib/contrast/agent/protect/policy/policy.rb

Overview

This is just a holder for our policy. Takes the policy JSON and converts it into hashes that we can access nicely

Constant Summary

Constants inherited from Contrast::Agent::Patching::Policy::Policy

Contrast::Agent::Patching::Policy::Policy::PROPAGATION_KEY, Contrast::Agent::Patching::Policy::Policy::RULES_KEY, Contrast::Agent::Patching::Policy::Policy::SOURCES_KEY, Contrast::Agent::Patching::Policy::Policy::TRIGGERS_KEY

Instance Attribute Summary

Attributes inherited from Contrast::Agent::Patching::Policy::Policy

#propagators, #providers, #sources, #triggers

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Contrast::Agent::Patching::Policy::Policy

#add_node, #find_node, #find_propagator_node, #find_source_node, #find_triggers_by_rule, #from_hash_string, #initialize, #module_names, policy_json

Methods included from Components::Logger::InstanceMethods

#cef_logger, #logger

Constructor Details

This class inherits a constructor from Contrast::Agent::Patching::Policy::Policy

Class Method Details

.policy_folderObject



22
23
24
# File 'lib/contrast/agent/protect/policy/policy.rb', line 22

def self.policy_folder
  'protect'
end

Instance Method Details

#disabled_globally?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/contrast/agent/protect/policy/policy.rb', line 26

def disabled_globally?
  ::Contrast::PROTECT.forcibly_disabled?
end

#node_typeObject



30
31
32
# File 'lib/contrast/agent/protect/policy/policy.rb', line 30

def node_type
  Contrast::Agent::Protect::Policy::TriggerNode
end