Using Token-Based Authentication
To use token-based authentication:
Obtain a valid OAuth2 bearer token from the Azure Active Directory service for those valid users who have access to Azure Data Lake Storage account. The token must be obtained for a specific client ID in the application code. For more information, refer to Active Directory Library For Java.
Add the following properties to your
core-site.xml
:<property> <name>fs.adl.oauth2.access.token.provider.type</name> <value>RefreshToken</value> </property> <property> <name>fs.adl.oauth2.client.id</name> <value>CLIENT-ID</value> </property> <property> <name>fs.adl.oauth2.refresh.token</name> <value>REFRESH-TOKEN</value> </property>
Se the value of
fs.adl.oauth2.access.token.provider.type
to "RefreshToken" and set the other two parameters.
Note | |
---|---|
Do not share the client ID or the refresh token. They must be kept secret. |
Next Steps
To make sure that authentication works, try referencing ADLS in the URLs.