Class: Conjur::Command::Policy

Inherits:
DSLCommand show all
Defined in:
lib/conjur/command/policy.rb

Class Method Summary collapse

Methods inherited from DSLCommand

run_script

Methods inherited from Conjur::Command

acting_as_option, annotate_option, api, command, command_impl_for_list, command_options_for_list, current_user, destination_role, display, display_members, give_away_resource, hide_docs, highline, integer?, interactive_option, method_missing, prompt_for_annotations, prompt_for_group, prompt_for_id, prompt_for_idnumber, prompt_for_password, prompt_for_public_key, prompt_to_confirm, read_till_eof, require_arg, retire_options, retire_resource, retire_role, validate_privileges, validate_public_key, validate_retire_privileges

Methods included from IdentifierManipulation

#conjur_account, #full_resource_id, #get_kind_and_id_from_args

Class Method Details

.default_collection_hostnameObject



33
34
35
# File 'lib/conjur/command/policy.rb', line 33

def default_collection_hostname
  Socket.gethostname
end

.default_collection_nameObject



37
38
39
# File 'lib/conjur/command/policy.rb', line 37

def default_collection_name
  [ default_collection_user, default_collection_hostname ].join('@')
end

.default_collection_userObject



28
29
30
31
# File 'lib/conjur/command/policy.rb', line 28

def default_collection_user
  # More accurate than Etc.getlogin
  Etc.getpwuid(Process.uid).name
end