using token as password
tamirhad opened this issue · 0 comments
I'm submitting a...
- Bug report
- [x ] Feature request
- Question
Current behavior
current behavior is the password is being used from DBURL or from database.json file.
when trying to set the password as token and ssl to 'Amazon RDS'(in my case) im getting:
Error: Server requests authentication using unknown plugin mysql_clear_password. See TODO: add plugins doco here on how to configure or author authentication plugins.
which is coming from mysql2 i guess.
then tried to pass the token via "authPlugins" as someone suggested here but then I got the following message:
TypeError: authPlugin is not a function
Expected behavior
pass a function to authPlugin option under mysql driver. for exmaple:
authPlugins: { mysql_clear_password: () => () => { return Buffer.from(password + '\0') } }
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
im my case the motivation is to connect to my RDS database using token.
Environment
db-migrate version: 0.11.13
plugins with versions: X.Y.Z
db-migrate driver with versions:
Additional information:
- Node version: v14.18.2
- Platform: alpine-docker
Others: