1
0
Fork 0
mirror of https://github.com/IRS-Public/direct-file.git synced 2025-06-27 20:25:52 +00:00

Refactor: Remove explicit AWS credentials from MessageQueueConfiguration

Removes the accessKey and secretKey fields from MessageQueueConfiguration.java and updates application.yaml to enable the use of the AWS SDK's default credential provider chain.

This change enhances security by preventing the direct mapping or hardcoding of sensitive AWS credentials within the application's configuration classes. The application will now rely on more secure methods for credential discovery, such as IAM roles or environment variables, as managed by the DefaultCredentialsProvider.

Key changes:
- Removed `accessKey` and `secretKey` from `MessageQueueConfiguration.java`.
- Set `aws.default-credentials-provider-chain-enabled=true` in `application.yaml`.
- Removed redundant `accessKey` and `secretKey` from `status.messageQueue` in `application.yaml`.
This commit is contained in:
google-labs-jules[bot] 2025-05-30 15:42:01 +00:00
parent 9dd76a786e
commit ae03f78da0
2 changed files with 1 additions and 9 deletions

View file

@ -30,12 +30,6 @@ public class MessageQueueConfiguration {
@NotBlank
private final String region;
@NotBlank
private final String accessKey;
@NotBlank
private final String secretKey;
private final boolean sqsMessageHandlingEnabled;
private final boolean statusChangePublishEnabled;

View file

@ -53,8 +53,6 @@ status:
pending-submission-queue: pending-submission-queue
dlq-pending-submission-queue: dlq-pending-submission-queue
region: us-west-2
accessKey: accessKey
secretKey: secretKey
sqs-message-handling-enabled: false
status-change-publish-enabled: false
sns:
@ -77,7 +75,7 @@ status:
aws:
enabled: false
default-credentials-provider-chain-enabled: false
default-credentials-provider-chain-enabled: true
access-key: accessKey
secret-key: secretKey