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

DM to read password from environment #11666

Open
mzhang77 opened this issue Oct 16, 2024 · 1 comment
Open

DM to read password from environment #11666

mzhang77 opened this issue Oct 16, 2024 · 1 comment
Labels
area/dm Issues or PRs related to DM. type/feature Issues about a new feature

Comments

@mzhang77
Copy link

Is your feature request related to a problem?

ight now, dm requires storing password in config file:

## ******** Downstream TiDB instance configuration ********** 
target-database: 
# Configuration of the downstream database instance. 
host: "n.n.n.n" 
port: 4000 
user: "root" 
password: "NElUoZylDevEjgPKvcJdF0Akdn2D"
# If the password is not null, it is recommended to use a password encrypted with dmctl.

This is still unsafe.

Describe the feature you'd like

DM to read password from environment variable. For example:

password: env("DM_PASSWORD")

When use it, user need to set the environment variable first:

export DM_PASSWORD=password
dmctl start-task ... 

Describe alternatives you've considered

There are ways to workaround this security breach, but it's nice if DM can handle it.

Teachability, Documentation, Adoption, Migration Strategy

No response

@mzhang77 mzhang77 added the type/feature Issues about a new feature label Oct 16, 2024
@lance6716 lance6716 added the area/dm Issues or PRs related to DM. label Oct 17, 2024
@lance6716
Copy link
Contributor

lance6716 commented Oct 17, 2024

A DM worker may replicate to different TiDB cluster with different password. And I'm not sure if environment variables are loaded at process start. If so, when need to change downstream password we need to restart DM workers. 🤔

also cc @OliverS929

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. type/feature Issues about a new feature
Projects
None yet
Development

No branches or pull requests

2 participants