def PutNewSecret(self, owner, volume_uuid, secret, metadata):
    if not volume_uuid:
      raise models.AccessError('volume_uuid is required')

    entity = self._CreateNewSecretEntity(owner, volume_uuid, secret)
    for prop_name in entity.properties():
      value = metadata.get(prop_name)
      if value:
        setattr(entity, prop_name, self.SanitizeEntityValue(prop_name, value))

    try:
      entity.put()
      self.AUDIT_LOG_MODEL.Log(
          entity=entity, message='PUT', request=self.request)
    except models.DuplicateEntity:
      logging.info('New entity duplicate active volume with same uuid.')

    self.response.out.write('Secret successfully escrowed!')
Puts a new DuplicityKeyPair entity to Datastore.
dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/server/handlers/__init__.py/AccessHandler.PutNewSecret