#GOlang auth token rotation

3 messages · Page 1 of 1 (latest)

valid wyvern
#

I was implementing RDS IAM authentication from my Golang service and came across an issue. I am using the init function to call create function where I have created a sync for every 10 mins where every 10 mins the token should get refreshed, it is creating the new token but it's not passing the same to the main function. When the existing thread that was initiated between DB and the service gets killed it is unable to re-authenticate the connection for the second time. Some observations that I have noticed were- When initially deploying the application it is creating the connection to RDS successfully but after some time as soon as the initial thread between service and DB gets killed it's unable to authenticate the reason which I checked was- the address where the token is getting stored. While making an API call the service picks the token from a static address where the initial token gets stored at the time of service deployment. However, while the token gets refreshed every 10 mins its getting stored on dynamic addresses from where the service is unable to pick up the token.

#

GOlang auth token rotation

valid wyvern
#

Here is the go file where actually I am calling and creating the DB function-