Commit 71e207d5 authored by Rucha Deshpande's avatar Rucha Deshpande
Browse files

Bug Fix: Update SSM parameter retrieval

parent d9459e9e
......@@ -101,22 +101,9 @@ public class ServiceAccountJwtAwsClientImpl implements IServiceAccountJwtClient
GetParameterRequest paramRequest = new GetParameterRequest()
.withName(client_credentials_client_id)
.withWithDecryption(true);
GetParameterResult paramResult = new GetParameterResult();
paramResult = ssmManager.getParameter(paramRequest);
List<Parameter> paramsResultList = new ArrayList<>();
List<String> paramsResultListInvalid = new ArrayList<>();
paramsResultList = paramResult.getParameters();
paramsResultListInvalid = paramResult.getInvalidParameters();
if(paramsResultListInvalid.size() >0)
{
log.error("Notification Service: SSM did not retrieve all parameters");
}
for (Parameter s : paramsResultList) {
if (s.getName().equalsIgnoreCase(client_credentials_client_id)) {
client_credentials_clientid = s.getValue();
}
}
GetParameterResult paramResult = ssmManager.getParameter(paramRequest);
Parameter paramsResult = paramResult.getParameter();
client_credentials_clientid = paramsResult.getValue();
client_credentials_secret = getSecret(client_secret_secretName,amazonRegion,client_secret_key);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment