docs: def resolve_secrets(self):
          """Retrieve handles for all basic:secret: fields on input.
  
          The process must have the ``secrets`` resource requirement
          specified in order to access any secrets. Otherwise this method
          will raise a ``PermissionDenied`` exception.
  
          :return: A dictionary of secrets where key is the secret handle
              and value is the secret value.
          """
          secrets = {}
          for field_schema, fields in iterate_fields(self.input, self.process.input_schema):  # pylint: disable=no-member
              if not field_schema.get('type', '').startswith('basic:secret:'):
                  continue
  
              name = field_schema['name']
              value = fields[name]
              try:
                  handle = value['handle']
              except KeyError:
                  continue
  
              try:
                  secrets[handle] = Secret.objects.get_secret(
                      handle,
                      contributor=self.contributor
                  )
              except Secret.DoesNotExist:
                  raise PermissionDenied("Access to secret not allowed or secret does not exist")
  
          # If the process does not not have the right requirements it is not
          # allowed to access any secrets.
          allowed = self.process.requirements.get('resources', {}).get('secrets', False)  # pylint: disable=no-member
          if secrets and not allowed:
              raise PermissionDenied(
                  "Process '{}' has secret inputs, but no permission to see secrets".format(
                      self.process.slug  # pylint: disable=no-member
                  )
              )
  
          return secrets