private Callback<Void> securityPostProcessRequestCallback() {
      return buildCallback(frontendMetrics.putSecurityPostProcessRequestMetrics, securityCheckResult -> {
        // Return a UUID as upload session ID.
        String uploadId = UUID.randomUUID().toString();
        RequestPath requestPath = (RequestPath) restRequest.getArgs().get(REQUEST_PATH);
        NamedBlobPath namedBlobPath = NamedBlobPath.parse(requestPath, restRequest.getArgs());
        String bucket = namedBlobPath.getContainerName();
        String key = namedBlobPath.getBlobName();
        InitiateMultipartUploadResult initiateMultipartUploadResult =
            new InitiateMultipartUploadResult(bucket, key, uploadId);
        LOGGER.debug("Sending response for CreateMultipartUpload {}", initiateMultipartUploadResult);
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        objectMapper.writeValue(outputStream, initiateMultipartUploadResult);
        ReadableStreamChannel channel =
            new ByteBufferReadableStreamChannel(ByteBuffer.wrap(outputStream.toByteArray()));
        restResponseChannel.setStatus(ResponseStatus.Ok);
        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);
      }, 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/S3MultipartCreateUploadHandler.java