Class: AmazonMQBrokerUserPasswordRule

Inherits:
BaseRule
  • Object
show all
Defined in:
lib/cfn-nag/custom_rules/AmazonMQBrokerUserPasswordRule.rb

Instance Method Summary collapse

Methods inherited from BaseRule

#audit

Instance Method Details

#audit_impl(cfn_model) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/cfn-nag/custom_rules/AmazonMQBrokerUserPasswordRule.rb', line 23

def audit_impl(cfn_model)
  brokers = cfn_model.resources_by_type('AWS::AmazonMQ::Broker')
  violating_brokers = brokers.select do |mq_broker|
    violating_users?(cfn_model, mq_broker)
  end
  violating_brokers.map(&:logical_resource_id)
end

#rule_idObject



19
20
21
# File 'lib/cfn-nag/custom_rules/AmazonMQBrokerUserPasswordRule.rb', line 19

def rule_id
  'F52'
end

#rule_textObject



10
11
12
13
# File 'lib/cfn-nag/custom_rules/AmazonMQBrokerUserPasswordRule.rb', line 10

def rule_text
  'Amazon MQ Broker resource Users property should exist and its Password property value ' +
  'should not show password in plain text, resolve an unsecure ssm string, or have a default value for parameter.'
end

#rule_typeObject



15
16
17
# File 'lib/cfn-nag/custom_rules/AmazonMQBrokerUserPasswordRule.rb', line 15

def rule_type
  Violation::FAILING_VIOLATION
end