Class: VpcCriticalPortsAudit
- Defined in:
- lib/scripts/ec2/vpc_critical_ports_audit.rb
Overview
Checks for all security groups if sensible ports are opened for the wide public.
Defined Under Namespace
Classes: CheckingSensiblePorts, CriticalPortsAuditState, Done, RetrievingSecurityGroups
Constant Summary
Constants inherited from Ec2Script
Ec2Script::CS_AWS_TIMEOUT, Ec2Script::CS_SEC_GRP_DESC, Ec2Script::CS_SEC_GRP_NAME
Instance Method Summary collapse
- #check_input_parameters ⇒ Object
-
#initialize(input_params) ⇒ VpcCriticalPortsAudit
constructor
Input parameters * ec2_api_handler => object that allows to access the EC2 API * :critical_ports => arrays of ports to be checked.
- #load_initial_state ⇒ Object
Methods inherited from Ec2Script
#get_execution_result, #post_message, #register_progress_message_listener, #register_state_change_listener, #start_script
Constructor Details
#initialize(input_params) ⇒ VpcCriticalPortsAudit
Input parameters
-
ec2_api_handler => object that allows to access the EC2 API
-
:critical_ports => arrays of ports to be checked
17 18 19 |
# File 'lib/scripts/ec2/vpc_critical_ports_audit.rb', line 17 def initialize(input_params) super(input_params) end |
Instance Method Details
#check_input_parameters ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/scripts/ec2/vpc_critical_ports_audit.rb', line 21 def check_input_parameters() if @input_params[:ec2_api_handler] == nil raise Exception.new("no EC2 handler specified") end #if @input_params[:critical_ports] == nil # raise Exception.new("no ports specified") #end end |
#load_initial_state ⇒ Object
30 31 32 |
# File 'lib/scripts/ec2/vpc_critical_ports_audit.rb', line 30 def load_initial_state() CriticalPortsAuditState.load_state(@input_params) end |