Module: Conjur::Policy::Executor::Annotate

Included in:
CreateRecord, CreateResource, Update
Defined in:
lib/conjur/policy/executor/base.rb

Instance Method Summary collapse

Instance Method Details

#annotateObject



36
37
38
39
40
41
42
43
44
# File 'lib/conjur/policy/executor/base.rb', line 36

def annotate
  Array(annotate_record.annotations).each do |k,v|
    action({
      'method' => 'put',
      'path' => update_annotation_path,
      'parameters' => { "name" => k, "value" => v }
    })
  end
end

#update_annotation_pathObject



46
47
48
49
50
51
# File 'lib/conjur/policy/executor/base.rb', line 46

def update_annotation_path
  [ "authz", annotate_record.,
      "annotations",
      annotate_record.resource_kind,
      CGI.escape(annotate_record.id) ].join('/')
end