db-migrate / db-migrate/node-db-migrate
using token as password
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 361
- PR merge metrics
- No merged PRs in 30d
Description
## 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](https://github.com/sidorares/node-mysql2/issues/1175) 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:
Contributor guide
Assessment
This issue has not been assessed yet.