private Callback<Void> securityPostProcessRequestCallback() {
      return buildCallback(frontendMetrics.putSecurityPostProcessRequestMetrics, securityCheckResult -> {
        try {
          RequestPath requestPath = (RequestPath) restRequest.getArgs().get(REQUEST_PATH);
          NamedBlobPath namedBlobPath = NamedBlobPath.parse(requestPath, restRequest.getArgs());
          String bucket = namedBlobPath.getContainerName();
          String key = namedBlobPath.getBlobName();
          String uploadId = (String) restRequest.getArgs().get(UPLOAD_ID_QUERY_PARAM);
          LOGGER.debug(
              "Sending response for listing parts of a multipart upload. Bucket = {}, Key = {}, Upload Id = {}", bucket,
              key, uploadId);
          ListPartsResult listPartsResult = new ListPartsResult(bucket, key, uploadId);
          ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
          objectMapper.writeValue(outputStream, listPartsResult);
          ReadableStreamChannel channel =
              new ByteBufferReadableStreamChannel(ByteBuffer.wrap(outputStream.toByteArray()));
          restResponseChannel.setHeader(Headers.DATE, new GregorianCalendar().getTime());
          restResponseChannel.setHeader(Headers.CONTENT_TYPE, XML_CONTENT_TYPE);
          restResponseChannel.setHeader(Headers.CONTENT_LENGTH, channel.getSize());
          finalCallback.onCompletion(channel, null);
        } catch (RestServiceException | IOException e) {
          finalCallback.onCompletion(null, e);
        }
      }, uri, LOGGER, finalCallback);
    }
After {@link SecurityService#postProcessRequest} finishes, return response for the request.
@return a {@link Callback} to be used with {@link SecurityService#postProcessRequest}.
ambry-frontend/src/main/java/com/github/ambry/frontend/s3/S3MultipartListPartsHandler.java