munendrasn opened a new pull request, #14136:
URL: https://github.com/apache/iceberg/pull/14136

   Similar to AWS, `adls.token-credential-provider` can be used to specify the 
`TokenCredential` provider.
   This is useful where user can configure custom token credential or in-built 
TokenCredential impl like `ClientSecretCredential` - where specifying 
clientId,secret not possible via env variables like federation.
   
   In built-one support auto-refresh of access-token on the expiry. 
   
   ```java
   public class ClientSecretCredentialProvider implements 
AzureTokenCredentialProvider {
   
     private static final String AZURE_CLIENT_ID = "azure.client-id";
     private static final String AZURE_TENANT_ID = "azure.tenant-id";
     private static final String AZURE_CLIENT_SECRET = "azure.client-secret";
   
     private String clientId;
     private String clientSecret;
     private String tenantId;
   
   
     @Override
     public TokenCredential credential() {
       return new ClientSecretCredentialBuilder()
           .tenantId(tenantId)
           .clientId(clientId)
           .clientSecret(clientSecret)
           .build();
     }
   
     @Override
     public void initialize(Map<String, String> properties) {
       this.clientId = properties.get(AZURE_CLIENT_ID);
       this.clientSecret = properties.get(AZURE_CLIENT_SECRET);
       this.tenantId = properties.get(AZURE_TENANT_ID);
     }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to