The JindoFS OSS credential provider, available in SmartData 3.4.0 and later, stores encrypted AccessKey information in a file to prevent AccessKey leaks.
Configure the JindoFS OSS Credential Provider
- Navigate to the SmartData service.
- Log in to the Alibaba Cloud EMR console.
- In the top navigation bar, select the required region and resource group.
- Click the Cluster Management tab.
- On the Cluster Management page, click Details for your cluster.
- In the left navigation pane, choose .
- Log in to the Alibaba Cloud EMR console.
- Navigate to the smartdata-site tab.
- Click the Configure tab.
- In the Service Configuration section, click the smartdata-site tab.
- On the smartdata-site tab, add or modify parameters according to your chosen method.
Configuration method Description Global configuration (applies to all buckets) In the configuration search box, search for the fs.jfs.cache.oss.credentials.provider parameter. Append the implementation class of AliyunCredentialsProvider to the parameter value. If you specify multiple classes, separate them with commas (,). The system tries the providers in the specified order until it retrieves valid credentials. For details about the required parameters, see Global Configuration. Example:
com.aliyun.emr.fs.auth.TemporaryAliyunCredentialsProvider, com.aliyun.emr.fs.auth.SimpleAliyunCredentialsProvider,com. aliyun.emr.fs.auth.EnvironmentVariableCredentialsProvider.Bucket-level configuration Add a new configuration item: - On the smartdata-site tab, click Custom Configuration in the upper-right corner.
- In the Add Configuration Item dialog box, set Key to
fs.jfs.cache.oss.bucket.XXX.credentials.providerand Value to the implementation class ofcom.aliyun.emr.fs.auth.AliyunCredentialsProvider. If you specify multiple classes, separate them with commas (,). The system tries the providers in the specified order until it retrieves valid credentials. For details about the required parameters, see Bucket-Level Configuration.Example:
com.aliyun.emr.fs.auth.TemporaryAliyunCredentialsProvider, com.aliyun.emr.fs.auth.SimpleAliyunCredentialsProvider,com. aliyun.emr.fs.auth.EnvironmentVariableCredentialsProvider.NoteXXXis a placeholder for the name of your OSS bucket. - Click OK.
- Save the configuration.
- In the upper-right corner, click Save.
- In the Confirm dialog box, enter a Execution Reason and enable Auto-update Configuration.
- Click OK.
Global configuration
The following table describes each provider type.
| Type | Description |
| TemporaryAliyunCredentialsProvider | Use this provider when authenticating with temporary AccessKey pairs and security tokens.
fs.jfs.cache.oss.credentials.providercom.aliyun.emr.fs.auth.TemporaryAliyunCredentialsProviderAppend to the value of the parameter and add the following parameters:
|
| SimpleAliyunCredentialsProvider | Use this provider when authenticating with long-lived AccessKey pairs.
fs.jfs.cache.oss.credentials.providercom.aliyun.emr.fs.auth.SimpleAliyunCredentialsProviderAppend to the value of the parameter and add the following parameters:
|
| EnvironmentVariableCredentialsProvider | Use this provider to read credentials from environment variables.
fs.jfs.cache.oss.credentials.providercom.aliyun.emr.fs.auth.EnvironmentVariableCredentialsProviderAppend to the value of the parameter and configure the following environment variables:
|
| JindoCommonCredentialsProvider | This provider uses a common configuration that works for both JindoOSS and JindoFS.
fs.jfs.cache.oss.credentials.providercom.aliyun.emr.fs.auth.JindoCommonCredentialsProviderAppend to the value of the parameter and add the following parameters:
|
| InstanceProfileCredentialsProvider | This provider enables password-free access to OSS. No AccessKey pair is required.
You must append com.aliyun.emr.fs.auth.InstanceProfileCredentialsProvider to the value of the fs.jfs.cache.oss.credentials.provider parameter. |
Bucket-level configuration
The following table describes each provider type.
| Type | Description |
| TemporaryAliyunCredentialsProvider | Use this provider when authenticating with temporary AccessKey pairs and security tokens.
fs.jfs.cache.oss.bucket.XXX.credentials.providercom.aliyun.emr.fs.auth.TemporaryAliyunCredentialsProviderSet the value of the parameter to and add the following parameters:
|
| SimpleAliyunCredentialsProvider | Use this provider when authenticating with long-lived AccessKey pairs.
fs.jfs.cache.oss.bucket.XXX.credentials.providercom.aliyun.emr.fs.auth.SimpleAliyunCredentialsProviderSet the value of the parameter to and add the following parameters:
|
| EnvironmentVariableCredentialsProvider | Use this provider to read credentials from environment variables.
fs.jfs.cache.oss.bucket.XXX.credentials.providercom.aliyun.emr.fs.auth.EnvironmentVariableCredentialsProviderSet the value of the parameter to and configure the following environment variables:
|
| JindoCommonCredentialsProvider | This provider uses a common configuration that works for both JindoOSS and JindoFS.
fs.jfs.cache.oss.credentials.providercom.aliyun.emr.fs.auth.JindoCommonCredentialsProviderSet the value of the parameter to and add the following parameters:
|
| InstanceProfileCredentialsProvider | This provider enables password-free access to OSS. No AccessKey pair is required.
Set the fs.jfs.cache.oss.bucket.XXX.credentials.provider parameter to com.aliyun.emr.fs.auth.InstanceProfileCredentialsProvider. |