Error while getting AWS dynamic secret : The security token included in the request is invalid

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Error while getting AWS dynamic secret : The security token included in the request is invalid

Hi,

We are creating AWS dynamic secrets and onboarding it on Conjur Cloud using

https://docs.cyberark.com/conjur-cloud/latest/en/Content/ConjurCloud/APIs/ccl-api-secrets-dynamic.htm#Updateadynamicsecret

 

We create aws issuer using https://docs.cyberark.com/conjur-cloud/latest/en/Content/Developer/Conjur_API_issuer-ephemerals.htm , but it does not have provision to pass aws session token. Without aws session token we will not able to generate secrets on our aws instance.

 

After configuring dynamic secret by following these steps, we get below error

{

"error": {

"code": "unprocessable_entity",

"message": "Failed to create the dynamic secret. Code: ESE00002E, Message: Failed to create the ephemeral secret, description: An error occurred while assuming the AWS IAM role: [operation error STS: AssumeRole, https response error StatusCode: 403, RequestID: 4cc321ba-f062-4fc5-bddc-a63d0685ab7d, api error InvalidClientTokenId: The security token included in the request is invalid.]"

}

}

 

Please help or let us know if we are missing anything

 

Thanks

1 REPLY 1

L7 Applicator

Hi @Deepesh Kumar​ 

 

I can think of few areas to check

 

  • Please check that the AWS credentials are correct and have the necessary permissions
  • The IAM role you are trying to assume must have a trust relationship that allows the AWS account or the IAM user/role making the AssumeRole request to assume it
  • Please verify that the role policy attached to the AWS role you are trying to assume includes the necessary permissions to create the secrets.

 

Please enable (if not already) AWS CloudTrail logging to monitor and debug the requests being made to AWS STS. This can provide more insights into why the AssumeRole request is failing.

 

Also please manually validate the AWS credentials using the AWS CLI.

 

Hope it helps !

  • 348 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!