Description
Feedback
I am trying to get the dynamic providers to work following the official documentation, but I can't get my head why it doesn't.
I first followed the documentation to get the jwks and openid-configuration endpoints to work: https://docs.terrakube.io/user-guide/workspaces/dynamic-provider-credentials#generate-public-and-private-key
Secondly, I followed the documentation for how to set it up in AWS: https://docs.terrakube.io/user-guide/workspaces/dynamic-provider-credentials/aws-dynamic-provider-credentials
Also following the Github TF example: https://github.com/AzBuilder/terrakube/tree/main/dynamic-credential-setup/aws
However, whenever I try to run the example pipeline defined in the example, then I just get this error:
Initializing the backend...
���
��� Error: validating provider credentials: retrieving caller identity from STS: operation error STS: GetCallerIdentity, https response error StatusCode: 403, RequestID: 9d3eb4f3-2d48-4457-913b-c7611dd63c00, api error InvalidClientTokenId: The security token included in the request is invalid.
���
���
���
The role is set up with this trust policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::REDACTED:oidc-provider/terrakube-api-test.wag.tools"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"terrakube-api-test.READCTED:aud": "aws.workload.identity",
"terrakube-api-test.READCTED:sub": "organization:WhiteawayGroup:workspace:terrakube-test-repo"
}
}
}
]
}
The IAM Provider is set up like this:
It generates the JWT just fine, and I'm able to generate a session using STS locally, but it just keeps failing.
Any suggestion on what have gone wrong?