SmartData 3.4.0 and later support the JindoFS OSS Credential Provider, which encrypts and stores your AccessKey information in a file to prevent exposure.
Limitations
JindoRangerCredentialsProvider and AssumeRoleStsCredentialsProvider are available only in SmartData 3.8.0 and later.
Configure the JindoFS OSS Credential Provider
- Navigate to the configuration page of the SmartData service.
- Log on to the E-MapReduce console.
- In the top navigation bar, select the region and resource group as required.
- Click the Clusters tab.
- On the Clusters page, click Details in the row of the target cluster.
- In the left-side navigation pane, click .
- Click the Configure tab.
- Log on to the E-MapReduce console.
- Configure the provider by using one of the following methods.
Configuration method Description Global configuration (applies to all buckets) In the configuration search box, search for the parameter fs.jfs.cache.oss.credentials.provider. Append the implementation class of AliyunCredentialsProvider to the parameter value. If you specify multiple classes, separate them with commas (,). The system tries each provider sequentially until it finds valid credentials. For more information about 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 To add a configuration item: - On the smartdata-site tab, click Custom Configuration in the upper-right corner.Important For JindoRangerCredentialsProvider, you must add the custom configuration on the namespace tab.
- In the Add Configuration Item dialog box, set Key to fs.jfs.cache.oss.bucket.XXX.credentials.provider and Value to the implementation class of com.aliyun.emr.fs.auth.AliyunCredentialsProvider. If you specify multiple classes, separate them with commas (,). The system tries each provider sequentially until it finds valid credentials. For more information about other 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.
Note In fs.jfs.cache.oss.bucket.XXX.credentials.provider, XXX is a placeholder for the name of your OSS bucket. - Click OK.
- On the smartdata-site tab, click Custom Configuration in the upper-right corner.
- 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
Select a provider based on your requirements.
| Type | Description |
| TemporaryAliyunCredentialsProvider | Use this provider to access OSS by using a time-bound access key and security token. Set the fs.jfs.cache.oss.credentials.provider parameter to com.aliyun.emr.fs.auth.TemporaryAliyunCredentialsProvider. You must also add the following parameters on the smartdata-site tab:
|
| SimpleAliyunCredentialsProvider | Use this provider to access OSS by using a long-term access key. Set the fs.jfs.cache.oss.credentials.provider parameter to com.aliyun.emr.fs.auth.SimpleAliyunCredentialsProvider. You must also add the following parameters on the smartdata-site tab:
|
| EnvironmentVariableCredentialsProvider | Configure the following environment variables:
|
| JindoCommonCredentialsProvider | This common provider, once configured, works with both JindoOSS and JindoFS. Set the fs.jfs.cache.oss.credentials.provider parameter to com.aliyun.emr.fs.auth.JindoCommonCredentialsProvider. You must also add the following parameters on the smartdata-site tab:
|
| EcsStsCredentialsProvider | This provider enables password-free access to OSS and does not require an access key. Set the fs.jfs.cache.oss.credentials.provider parameter to com.aliyun.emr.fs.auth.EcsStsCredentialsProvider. |
| JindoRangerCredentialsProvider | Use this provider to control user access to OSS through Ranger. Set the fs.jfs.cache.oss.credentials.provider parameter to com.aliyun.emr.fs.auth.JindoRangerCredentialsProvider. You must also add a configuration item on the namespace tab by setting the namespace.oss.permission.method parameter to ranger. Note After you add the custom configuration for the JindoRangerCredentialsProvider, you must restart the JindoFS Namespace Service. For more information, see Restart the JindoFS Namespace Service. |
| AssumeRoleStsCredentialsProvider | Use this provider to obtain a temporary access key to access OSS by assuming a RAM role. Set the fs.jfs.cache.oss.credentials.provider parameter to com.aliyun.emr.fs.auth.AssumeRoleStsCredentialsProvider. You must also add the following parameters on the smartdata-site tab:
|
Bucket-level configuration
Select a provider based on your requirements.
| Type | Description |
| TemporaryAliyunCredentialsProvider | Use this provider to access OSS by using a time-bound access key and security token. Set the fs.jfs.cache.oss.bucket.XXX.credentials.provider parameter to com.aliyun.emr.fs.auth.TemporaryAliyunCredentialsProvider. You must also add the following parameters on the smartdata-site tab:
|
| SimpleAliyunCredentialsProvider | Use this provider to access OSS by using a long-term access key. Set the fs.jfs.cache.oss.bucket.XXX.credentials.provider parameter to com.aliyun.emr.fs.auth.SimpleAliyunCredentialsProvider. You must also add the following parameters on the smartdata-site tab:
|
| EnvironmentVariableCredentialsProvider | Configure the following environment variables:
|
| JindoCommonCredentialsProvider | This common provider, once configured, works with both JindoOSS and JindoFS. Set the fs.jfs.cache.oss.bucket.XXX.credentials.provider parameter to com.aliyun.emr.fs.auth.JindoCommonCredentialsProvider. You must also add the following parameters on the smartdata-site tab:
|
| EcsStsCredentialsProvider | This provider enables password-free access to OSS and does not require an access key. Set the fs.jfs.cache.oss.bucket.XXX.credentials.provider parameter to com.aliyun.emr.fs.auth.EcsStsCredentialsProvider. |
| JindoRangerCredentialsProvider | Use this provider to control user access to OSS through Ranger. Set the fs.jfs.cache.oss.bucket.XXX.credentials.provider parameter to com.aliyun.emr.fs.auth.JindoRangerCredentialsProvider. You must also add a configuration item on the namespace tab by setting the namespace.oss.permission.method parameter to ranger. Note After you add the custom configuration for the JindoRangerCredentialsProvider, you must restart the JindoFS Namespace Service. For more information, see Restart the JindoFS Namespace Service. |
| AssumeRoleStsCredentialsProvider | Use this provider to obtain a temporary access key to access OSS by assuming a RAM role.
Set the fs.jfs.cache.oss.bucket.XXX.credentials.provider parameter to com.aliyun.emr.fs.auth.AssumeRoleStsCredentialsProvider. You must also add the following parameters on the smartdata-site tab:
|
Restart the JindoFS Namespace Service
After you configure the JindoRangerCredentialsProvider, you must restart the JindoFS Namespace Service.
- On the configuration page of the SmartData service, choose in the upper-right corner.
- In the Cluster Activities dialog box, enter a Description and click OK.
- In the Confirm dialog box, click OK.