Class: Conjur::Policy::Executor::CreateUser

Inherits:
CreateRecord show all
Includes:
PublicKeys
Defined in:
lib/conjur/policy/executor/create.rb

Overview

Sync the user’s public keys using the Pubkeys service. POSTing the public keys to the User service won’t have any effect.

Instance Attribute Summary

Attributes inherited from Base

#actions, #api, #statement

Instance Method Summary collapse

Methods included from PublicKeys

#attribute_names, #public_key_path

Methods inherited from CreateRecord

#annotate_record, #attribute_names, #create_parameters, #create_path, #kind_path

Methods included from Annotate

#annotate, #update_annotation_path

Methods inherited from Create

#record

Methods inherited from Base

#action, #initialize, #resource_path, #role_path

Methods included from Logger

included

Constructor Details

This class inherits a constructor from Conjur::Policy::Executor::Base

Instance Method Details

#executeObject



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/conjur/policy/executor/create.rb', line 61

def execute
  super
  
  Array(record.public_keys).each do |key|
    action({
      'method' => 'post',
      'path' => public_key_path,
      'parameters' => key
    })
  end
end