Skip to content
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

AWS Cloud SDK needs support for SessionToken for SQS #1015

Closed
somal-vora opened this issue Jan 10, 2024 · 7 comments
Closed

AWS Cloud SDK needs support for SessionToken for SQS #1015

somal-vora opened this issue Jan 10, 2024 · 7 comments
Labels
status: waiting-for-feedback Waiting for feedback from issuer

Comments

@somal-vora
Copy link

Type: Bug

Component: AWS Cloud SQS

Describe the bug
We are using awsspringcloud.version 3.0.3 in our service and trying to use SQS in it using SqsTemplate. For tests, we are using localstack 3.0.2 and testcontainers.version as 1.19.3. I have attached 3 classes for reference.

It seems we can setup just access key and secret key with aws cloud library, but there is no way to setup session token.

  1. spring.cloud.aws.credentials.secret-key
  2. spring.cloud.aws.credentials.access-key

But, unfortunately, there is no support for session-token yet. Hence, I always get session token invalid when I try do Sqstemplate.send. Because of which my test always fails since there is no way to add environment variable or set java property for session token with AWS cloud sdk currently.

Sample
Here is example of my test class with AWSCloud + testcontainers + localstack.
SqsQueueServiceTest.java.zip

@tomazfernandes
Copy link
Contributor

No clue on this one, but it looks like a feature out of SQS's scope and rather a core one.

@maciejwalkowiak WDYT?

@somal-vora
Copy link
Author

Thanks @tomazfernandes for taking a look. We connected with SQS team initially, and they recommended to start request in this repo as sessionKey is missing with cloud sdk.

@tomazfernandes
Copy link
Contributor

Sure, I mean SCAWS core, not AWS SDK 🙂

@maciejwalkowiak
Copy link
Contributor

Yes, this is part of the core. @somal-vora can you explain exactly what's missing? We do have support for STS. If you need something that we do not support, you can also configure custom credentials provider bean: https://docs.awspring.io/spring-cloud-aws/docs/3.1.0/reference/html/index.html#custom-awscredentialsprovider

@somal-vora
Copy link
Author

@maciejwalkowiak
I believe to have AWSCloud + testcontainers + localstack work, we need to have a way to add Session Key too. In Cloud SDK, there is no way to send session key properties yet. It seems SQS, you need session token, without it, it can't work I think.

@maciejwalkowiak
Copy link
Contributor

@somal-vora we do support STS, we have a way to provide custom credentials provider. I am not sure what's missing exactly. Can you draft a PR that helps me to understand what you mean?

@maciejwalkowiak maciejwalkowiak added the status: waiting-for-feedback Waiting for feedback from issuer label Sep 26, 2024
@somal-vora
Copy link
Author

Closing this ask since we are unblocked now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback Waiting for feedback from issuer
Projects
None yet
Development

No branches or pull requests

3 participants