Class S3SecretRequestHelper
java.lang.Object
org.apache.hadoop.ozone.om.request.s3.security.S3SecretRequestHelper
Common helper function for S3 secret requests.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckAccessIdSecretOpPermission(OzoneManager ozoneManager, org.apache.hadoop.security.UserGroupInformation ugi, String accessId) Checks whether the ugi has the permission to operate (get secret, set secret, revoke secret) on the given access ID.static org.apache.hadoop.security.UserGroupInformationgetOrCreateUgi(String accessId) Retrieves thread-local UGI for request or construct new one based on provided accessId.
-
Method Details
-
getOrCreateUgi
Retrieves thread-local UGI for request or construct new one based on provided accessId.- Parameters:
accessId- user identifier from request.- Returns:
UserGroupInformationinstance.
-
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
-