Class: Outliers::Resources::Aws::Iam::User

Inherits:
Outliers::Resource show all
Defined in:
lib/outliers/resources/aws/iam/user.rb

Instance Attribute Summary

Attributes inherited from Outliers::Resource

#source

Instance Method Summary collapse

Methods inherited from Outliers::Resource

#id, #initialize, key, #method_missing, verifications

Constructor Details

This class inherits a constructor from Outliers::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Outliers::Resource

Instance Method Details

#mfa_enabled?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/outliers/resources/aws/iam/user.rb', line 16

def mfa_enabled?
  source.mfa_devices.count > 0
end

#no_access_keys?Boolean

Returns:

  • (Boolean)


7
8
9
10
# File 'lib/outliers/resources/aws/iam/user.rb', line 7

def no_access_keys?
  logger.debug "#{id} has #{access_keys.count} access key(s)."
  !access_keys.any?
end

#no_password_set?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/outliers/resources/aws/iam/user.rb', line 12

def no_password_set?
  !source..exists?
end