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

Support for RDS IAM Authentication tokens #285

Open
samongyr-sq opened this issue May 13, 2024 · 3 comments
Open

Support for RDS IAM Authentication tokens #285

samongyr-sq opened this issue May 13, 2024 · 3 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@samongyr-sq
Copy link
Collaborator

Attempting to use spirit with an account that uses RDS IAM DB Authentication results in an error like

spirit: error: this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN

The same error arises when running with LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1

It would be neat if we could workaround this error with either the env var or a --enable-cleartext-plugin equivalent CLI option

@morgo
Copy link
Collaborator

morgo commented May 14, 2024

I took a look at this today. It's going to be a more difficult fix unfortunately :(

  • Spirit can be modified easily, but it depends on canal/go-mysql for binlog reading.
  • Canal only supports the basic auth plugins.

I modified spirit to try it, and as expected it fails to subscribe to the binlog:

ERRO[0013] canal start sync binlog err: start sync replication at binlog (mysql-bin-changelog.000003, 267160) error ERROR 1105 (HY000): Failed to register slave; too long 'report-password'
ERRO[0013] canal has failed. error: start sync replication at binlog (mysql-bin-changelog.000003, 267160) error ERROR 1105 (HY000): Failed to register slave; too long 'report-password'
panic: canal has failed

goroutine 15 [running]:
github.com/cashapp/spirit/pkg/repl.(*Client).startCanal(0x1400047c000)
	/Users/mtocker/go/src/github.com/cashapp/spirit/pkg/repl/client.go:376 +0x234
created by github.com/cashapp/spirit/pkg/repl.(*Client).Run in goroutine 1
	/Users/mtocker/go/src/github.com/cashapp/spirit/pkg/repl/client.go:333 +0x4e0
exit status 2

@morgo morgo added the enhancement New feature or request label May 14, 2024
@samongyr-sq
Copy link
Collaborator Author

Unfortunately, it appears that this is a MySQL limitation

@morgo morgo added the wontfix This will not be worked on label May 30, 2024
@morgo
Copy link
Collaborator

morgo commented May 30, 2024

This is unfortunate :( I've added the tag won't fix, since we are blocked by MySQL functionality.

If someone sees a way around it, I'm happy to remove the tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants