private void validateAccountAndContainer(Map<String, CloudBlobMetadata> cloudBlobMetadataMap,
      List<? extends StoreKey> storeKeys) throws StoreException {
    for (StoreKey key : storeKeys) {
      CloudBlobMetadata cloudBlobMetadata = cloudBlobMetadataMap.get(key.getID());
      // validate accountId and containerId
      if (!key.isAccountContainerMatch((short) cloudBlobMetadata.getAccountId(),
          (short) cloudBlobMetadata.getContainerId())) {
        if (storeConfig.storeValidateAuthorization) {
          throw new StoreException("GET authorization failure. Key: " + key.getID() + " Actual accountId: "
              + cloudBlobMetadata.getAccountId() + " Actual containerId: " + cloudBlobMetadata.getAccountId(),
              StoreErrorCodes.AuthorizationFailure);
        } else {
          logger.warn("GET authorization failure. Key: {} Actually accountId: {} Actually containerId: {}", key.getID(),
              cloudBlobMetadata.getAccountId(), cloudBlobMetadata.getContainerId());
        }
      }
    }
  }
Validate account id and container id for blobs in {@link CloudBlobMetadata} map match those in {@link StoreKey} list.
@param cloudBlobMetadataMap {@link Map} of {@link CloudBlobMetadata}.
@param storeKeys {@link List} of {@link StoreKey}s.
ambry-cloud/src/main/java/com/github/ambry/cloud/CloudBlobStore.java