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

[Feature][devlake] mysql connection config from environment variables #7980

Open
2 of 3 tasks
pimperator opened this issue Aug 28, 2024 · 2 comments
Open
2 of 3 tasks
Labels
improvement type/feature-request This issue is a proposal for something new

Comments

@pimperator
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Use case

running the devlake part (not config-ui, not grafana) we need to ingest the value of DB_URL (either from .env file or as environment variable) in order to set up the mysql connection
sadly this contains the full connection string

DB_URL=mysql://username:password@databasehost:3306/database?charset=utf8mb4&parseTime=True&loc=UTC

see https://github.com/apache/incubator-devlake/blob/main/env.example#L26

Usually (like for grafana and opendora) the connection is set up via DB_HOSTNAME, DB_USER, DB_PASSWORD, DB_NAME as environment variables that make us able to put DB_PASSWORD into an encrypted vault.
With the given solution above we need to create the connection string and store all data in a vault. Additionally it needs to be recreated on password reset.

Description

I suggest to use DB_HOSTNAME, DB_USER, DB_PASSWORD, DB_NAME for the database connection setup instead of DB_URL.
This makes us able to store DB_PASSWORD in an encrypted vault and rotate only that vault/value on password rotation.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@pimperator pimperator added the type/feature-request This issue is a proposal for something new label Aug 28, 2024
@dosubot dosubot bot added the improvement label Aug 28, 2024
Copy link

This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Oct 28, 2024
@riipeckx
Copy link

I started something in this PR #8127 :)

@github-actions github-actions bot removed the Stale label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement type/feature-request This issue is a proposal for something new
Projects
None yet
Development

No branches or pull requests

3 participants
@pimperator @riipeckx and others