Re: Endpoint error when connect to AWS Secret Manager

64 views
Skip to first unread message

Phacius Phat

unread,
Dec 19, 2023, 12:05:49 AM12/19/23
to CAS Community, Lê Tuấn Diệp Phát
I have added these configs to my CAS config file:

cas.spring.cloud.aws.secrets-manager.credential-access-key={my aws access key}
cas.spring.cloud.aws.secrets-manager.credential-secret-key={my aws secret key}
cas.spring.cloud.aws.secrets-manager.endpoint={my aws endpoint}
cas.spring.cloud.aws.secrets-manager.region={my aws region}

But it still can't authenticate with AWS so I added these configs to my environment (you can see these below) so that it can authenticate now but I got the endpoint error like I said in my post.

AWS_REGION={region}; AWS_ACCESS_KEY_ID={access key}; AWS_SECRET_ACCESS_KEY={secret key}; AWS_ENDPOINT={endpoint}



On Monday 18 December 2023 at 12:45:44 UTC+7 Lê Tuấn Diệp Phát wrote:
Hi,
On my CAS, I've set to connect AWS Secret Manager following this: CAS - Configuration Server (apereo.github.io)

However I got a problem with the endpoint, you can read the error below: 

ERROR [org.apereo.cas.config.AmazonSecretsManagerCloudConfigBootstrapConfiguration] - <Received an UnknownHostException when attempting to interact with a service. See cause for the exact endpoint that is failing to resolve. If this is happening on an endpoint that previously worked, there may be a network connectivity issue or your DNS cache could be storing endpoints for too long. SdkClientException.java:build:102 HelpfulUnknownHostExceptionInterceptor.java:modifyException:59 ExecutionInterceptorChain.java:modifyException:202

I tried to set the endpoint like these in my environment but it still did not work.
Do I miss any step? or configuration for CAS or AWS?

Thanks for reply.


Phacius Phat

unread,
Dec 19, 2023, 12:05:49 AM12/19/23
to CAS Community
Hi,
On my CAS, I've set to connect AWS Secret Manager following this: CAS - Configuration Server (apereo.github.io)

However I got a problem with the endpoint, you can read the error below:

ERROR [org.apereo.cas.config.AmazonSecretsManagerCloudConfigBootstrapConfiguration] -
<Received an UnknownHostException when attempting to interact with a service. See cause for the exact endpoint that is failing to resolve.
If this is happening on an endpoint that previously worked, there may be a network connectivity issue or your DNS cache could be storing endpoints for too long.
SdkClientException.java:build:102
HelpfulUnknownHostExceptionInterceptor.java:modifyException:59
ExecutionInterceptorChain.java:modifyException:202

I tried to set the endpoint like these in my environment but it still did not work.
https://secretsmanager.{region}.amazonaws.com/
Secret manager ARN
I have added these configs to my CAS config file:

cas.spring.cloud.aws.secrets-manager.credential-access-key={my aws access key}
cas.spring.cloud.aws.secrets-manager.credential-secret-key={my aws secret key}
cas.spring.cloud.aws.secrets-manager.endpoint={my aws endpoint}
cas.spring.cloud.aws.secrets-manager.region={my aws region}

But it still can't authenticate with AWS so I added these configs to my environment (you can see these below) so that it can authenticate now but I got the endpoint error like I said in my post.

AWS_REGION={region}; AWS_ACCESS_KEY_ID={access key}; AWS_SECRET_ACCESS_KEY={secret key}; AWS_ENDPOINT={endpoint}

Reply all
Reply to author
Forward
0 new messages