Class S3SecretRequestHelper

java.lang.Object
org.apache.hadoop.ozone.om.request.s3.security.S3SecretRequestHelper

public final class S3SecretRequestHelper extends Object
Common helper function for S3 secret requests.
  • Method Details

    • getOrCreateUgi

      public static org.apache.hadoop.security.UserGroupInformation getOrCreateUgi(String accessId)
      Retrieves thread-local UGI for request or construct new one based on provided accessId.
      Parameters:
      accessId - user identifier from request.
      Returns:
      UserGroupInformation instance.
    • checkAccessIdSecretOpPermission

      public static void checkAccessIdSecretOpPermission(OzoneManager ozoneManager, org.apache.hadoop.security.UserGroupInformation ugi, String accessId) throws IOException
      Checks whether the ugi has the permission to operate (get secret, set secret, revoke secret) on the given access ID. Throws OMException if the UGI doesn't have the permission.
      Throws:
      IOException