Configuring OAuth with core-site.xml

Configuring your OAuth credentials in core-site.xml is insecure. Cloudera recommends that you only use this method for development environments or other environments where security is not a concern.

Perform the following steps to connect your cluster to ADLS Gen2:

  1. In the Cloudera Manager Admin Console, search for the following property: Cluster-wide Advanced Configuration Snippet (Safety Valve) for core-site.xml. .
  2. Add the following properties and values:
    Table 1. OAuth Properties
    Name Value
    fs.azure.account.auth.type OAuth
    fs.azure.account.oauth.provider.type org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider
    fs.azure.account.oauth2.client.endpoint Provide your tenant ID: https://login.microsoftonline.com/<Tenant_ID>/oauth2/token
    fs.azure.account.oauth2.client.id Provide your <Client_ID>
    fs.azure.account.oauth2.client.secret Provide your <Client_Secret>
In addition, you can also provide account-specific keys. To do this, you need to add the following suffix to the key:
.<Account>.dfs.core.windows.net