MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / add_record_audit_data

Function add_record_audit_data

keepercommander/record_management.py:334–348  ·  view source on GitHub ↗
(params, record)

Source from the content-addressed store, hash-verified

332
333
334def add_record_audit_data(params, record): # type: (KeeperParams, vault.KeeperRecord) -> None
335 if params.enterprise_ec_key:
336 audit_data = vault_extensions.extract_audit_data(record)
337 if audit_data:
338 record_audit_rq = record_pb2.RecordAddAuditData()
339 record_audit_rq.record_uid = utils.base64_url_decode(record.record_uid)
340 record_audit_rq.revision = record.revision
341 record_audit_rq.data = crypto.encrypt_ec(
342 json.dumps(audit_data).encode('utf-8'), params.enterprise_ec_key)
343 audit_rq = record_pb2.AddAuditDataRequest()
344 audit_rq.records.append(record_audit_rq)
345 try:
346 api.communicate_rest(params, audit_rq, 'vault/record_add_audit_data')
347 except Exception as e:
348 logging.info('Store audit data error: %s', e)

Callers 2

add_record_to_folderFunction · 0.70
update_recordFunction · 0.70

Calls 1

infoMethod · 0.45

Tested by

no test coverage detected