zhangzhonglai commented on PR #7045:
URL: https://github.com/apache/nifi/pull/7045#issuecomment-1595949840

   Thanks for your reply, @nandorsoma. In our case, it's a bit complicated, we 
use NiFi in AWS EKS. Due to permissions issues, the ops will provide me with a 
service account that has the IAM role authenticated by OIDC, this service 
account will add an ENV: `AWS_WEB_IDENTITY_TOKEN_FILE : 
/var/run/secrets/eks.amazonaws.com/serviceaccount/token`  to the Pod. In the 
NiFi, I use the `AWSCredentialsProviderControllerService` processor and by 
setting `Use Default Credentials` to `true`, then I can read the temporary 
permissions provided by the STS to access AWS related services. Without this 
environment variable, the `AWSCredentialsProviderControllerService` will report 
an error: 
   ```
   2023-03-14 15:56:44,700 DEBUG [Timer-Driven Process Thread-2] c.a.auth. 
AWSCredentialsProviderChain Unable to load credentials from 
WebIdentityTokenCredentialsProvider: To use assume role profiles the 
aws-java-sdk- sts module must be on the class path. 
   ```
   I think the key is the AWS_WEB_IDENTITY_TOKEN_FILE environment variable, 
which the AWS client will use to get the information it needs.
   
   Some related urls:
   
   * 
https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html
   * https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html


-- 
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]

Reply via email to