Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using token as password #764

Open
2 tasks
tamirhad opened this issue Dec 12, 2021 · 0 comments
Open
2 tasks

using token as password #764

tamirhad opened this issue Dec 12, 2021 · 0 comments

Comments

@tamirhad
Copy link

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant