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

Encryption Attributes Cause Exception #130

Open
dsiegal opened this issue Mar 7, 2018 · 3 comments
Open

Encryption Attributes Cause Exception #130

dsiegal opened this issue Mar 7, 2018 · 3 comments

Comments

@dsiegal
Copy link

dsiegal commented Mar 7, 2018

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]

@adamw
Copy link
Member

adamw commented Mar 8, 2018

I think these attributes are not supported yet, hence the exception. Maybe unsupported attributes should be silently ignored even when setting, though this might be against the SQS spec. So it would be best to add support for them.

@Drozenbo
Copy link

Has any progress been made on addressing this issue, or is there any workaround for this issue besides having to flag functionality between testing and production code when setting those attributes?

@adamw
Copy link
Member

adamw commented Aug 13, 2020

@Drozenbo not yet, but maybe you'd like to try fixing the problem? If you'd have problems with the codebase I'll be happy to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants