private String signIdIfRequired(RestRequest restRequest, String blobId) throws RestServiceException {
      @SuppressWarnings("unchecked")
      Map<String, String> metadata =
          (Map<String, String>) restRequest.getArgs().get(RestUtils.InternalKeys.SIGNED_ID_METADATA_KEY);
      return metadata != null ? idSigningService.getSignedId(blobId, metadata) : blobId;
    }
If {@link RestUtils.InternalKeys#SIGNED_ID_METADATA_KEY} is set in the {@link RestRequest}, return a signed id.
Otherwise, return the provided blob ID.
@param restRequest the {@link RestRequest} that might contain the signed ID metadata.
@param blobId the blob ID to potentially sign.
@return the signed ID, if required. Otherwise, just the provided blob ID.
@throws RestServiceException if building the signed ID fails.
ambry-frontend/src/main/java/com/github/ambry/frontend/AmbryIdConverterFactory.java