-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: 1.3.0 aws-provider breaks pod identity credential resolution #1252
Comments
Can you try the following:
|
I tried the above ProviderConfig using the 1.3.0 aws-sqs provider and also updated my IAM role to allow the
Double checked I have the audience set correctly on the AWS OIDC provider for the cluster
|
Alrighty I think I got this fixed after decoding the token here: Once I added that to my OIDC configuration for the cluster the sqs queue was able to be created. "ClientIDList": [
"sts.amazonaws.com",
"pods.eks.amazonaws.com"
], So for anyone else trying to use pod identity here's my final setup to get it working with 1.3.0
IAM role trust policy for my {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::<ACCOUNT_ID>:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/UNIQUE_ID"
},
"Action": "sts:AssumeRoleWithWebIdentity"
},
{
"Effect": "Allow",
"Principal": {
"Service": "pods.eks.amazonaws.com"
},
"Action": [
"sts:AssumeRole",
"sts:TagSession"
]
}
]
} |
@david-kirby your solution would work, but then it is not pod identity solution, rather a workaround that fixes pod identity for IRSA (since I still see the IRSA oidc). |
Thank you @david-kirby for sharing this information. Not sure if I did something incorrectly, but to get this fully working, I needed to have a different trust relationship on the IAM role. This is what mine ended up looking like. {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::<ACCOUNT_ID>:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/<UNIQUE_ID>"
},
"Action": "sts:AssumeRoleWithWebIdentity"
},
{
"Effect": "Allow",
"Principal": {
"Service": "pods.eks.amazonaws.com"
},
"Action": [
"sts:AssumeRole",
"sts:TagSession"
]
},
{
"Effect": "Allow",
"Action": "sts:AssumeRoleWithWebIdentity",
"Principal": {
"Federated": "arn:aws:iam::<ACCOUNT_ID>:oidc-provider/oidc.eks.us-west-1.amazonaws.com/id/<UNIQUE_ID>"
},
"Condition": {
"StringEquals": {
"oidc.eks.us-west-1.amazonaws.com/id/<UNIQUE_ID>:aud": [
"pods.eks.amazonaws.com"
]
}
}
}
]
} |
pod identity option: #1459 |
Is there an existing issue for this?
Affected Resource(s)
Resource MRs required to reproduce the bug
In short, the below manifests:
crossplane
prod
and to use IRSA for credentials (IMPORTANT NOTE: This is working with a Pod Association configuration in EKS. The IAM role is not configured for IRSA and instead it's configured for Pod Identity)Steps to Reproduce
I had the above manifests deployed, but upon updating the sqs provider to 1.3.0 and deploying a new queue or deleting/recreating the example, the queue cannot be created.
What happened?
Using version 1.2.1, the queue is created. After upgrading to 1.3.0, the resource does not get created. I tested this with other resources as well (sns, eks:clusterauth) and encountered the same error message whenever the provider version being used was 1.3.0
Relevant Error Output Snippet
The text was updated successfully, but these errors were encountered: