Performing IAM Authentication for Clusters
Function Description
If IAM authentication is enabled for a CloudTable cluster, you need to use a tenant's AK and SK to perform authentication before performing subsequent operations.
Sample Code
private static boolean IAM_AUTH_MODE = true;
private static String user = "";
private static String ak = "";
private static String sk = "";
public static void login(Configuration conf) throws IOException {
if (IAM_AUTH_MODE) {
UserProviderExtend.loginWithAKSK(conf, user, ak, sk);
}
}
In the life cycle of a process, the UserProviderExtend.loginWithAKSK function needs to be invoked only once.
Last Article: Creating the Configuration Object
Next Article: Creating the Connection Object
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.