softwaremill / softwaremill/elasticmq

Encryption Attributes Cause Exception

Open
#130 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2.9k
Forks
203
Avg merge
1d 7h
Merged PRs (30d)
6

Description

First of all, thanks for contributing elasticmq! It's gonna be great to have SQS-like queues running in developer environments.

Perhaps I'm doing something wrong, but I find if I try to create a queue with encryption attributes (i.e. "KmsMasterKeyId" and/or "KmsDataKeyReusePeriodSeconds"), the attributes are silently ignored (i.e. a subsequent request to GetQueueAttribute shows neither).

Furthermore, if I try to update an existing queue with either attribute, the operation fails with InvalidAttributeNameException (see below). It was a bit difficult to debug, because nowhere does the name of the invalid attribute appear in the exception message.

I can certainly understand if message encryption is outside of elasticmq's scope. It would be nice though if it recognized these as valid attributes and preserved them as such (both on creation and update).

More broadly, it would be great if the README could specify what SQS operations/attributes are currently unsupported (or supported, whichever is easier). It's been a bit of a slog running into them piecemeal.

If you agree, I would be happy to take a whack at contributing a fix for this issue. Thanks.

com.amazonaws.services.sqs.model.InvalidAttributeNameException: InvalidAttributeName; see the SQS docs. (Service: AmazonSQS; Status Code: 400; Error Code: InvalidAttributeName; Request ID: 00000000-0000-0000-0000-000000000000)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1630) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1302) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1056) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) ~[aws-java-sdk-core-1.11.289.jar:na]
	at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:2033) ~[aws-java-sdk-sqs-1.11.289.jar:na]
	at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2009) ~[aws-java-sdk-sqs-1.11.289.jar:na]
	at com.amazonaws.services.sqs.AmazonSQSClient.executeSetQueueAttributes(AmazonSQSClient.java:1779) ~[aws-java-sdk-sqs-1.11.289.jar:na]
	at com.amazonaws.services.sqs.AmazonSQSClient.setQueueAttributes(AmazonSQSClient.java:1754) ~[aws-java-sdk-sqs-1.11.289.jar:na]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the queue-attribute handling for CreateQueue, GetQueueAttributes, and SetQueueAttributes, then review the README's description of supported SQS operations and attributes. Confirm how KmsMasterKeyId and KmsDataKeyReusePeriodSeconds should be preserved or reported, and document the resulting support and error behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, scala
Domain
api, backend, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.