Restore options from pmm1: --defaults-file with encrypted credentials

Description

The following have not been implemented:

  • --defaults-file

The absence of the ability to use a Mysql Config (my.cnf) file for connection config is bad for automation:

  • it forces a password to be set in the command line

  • it leads to the possibility that the password appears in logs and is shipped off somewhere

  • it removes the ability to check if a password should change by detecting a change in the cnf file

Use case

As PMM user I need to be able to specify  --defaults-file flag as a path to .cnf file and keep my credentials enrypted so that I can skip passing --user-name and --password  options while adding DB and they will be extracted from config file 

 

UI:

 

 Also, Feature should be available by API (for future UI  improvements) and follow common logic - implement logic in pmm-agent, not  pmm-admin 

Note:

  • this is username and password related. We are not adding support of other fields from config file

  • If password changed  - user need to re-add Service to the system, as it goes with usual --password/–username  flags 

Out of scope:

  • Handling non-encrypted credentials.

Suggested solution:

 

Related PR:

https://github.com/percona/pmm-admin/pull/171

How to test

None

How to document

None

Smart Checklist

Activity

Show:

Przemyslaw Kadej May 30, 2022 at 10:43 PM

On hold: waiting for to be merged.

AM October 17, 2021 at 9:48 PM

Please take a look on this [PR|https://github.com/percona/pmm-admin/pull/165.]

Alexander Blinkov July 13, 2020 at 1:39 PM
Edited

Should be groomed after implementation of https://jira.percona.com/browse/PMM-4879

Duplicate

Details

Assignee

Reporter

Priority

Components

Needs QA

Yes

Planned Version/s

Story Points

Sprint

Affects versions

Smart Checklist

Created June 9, 2020 at 1:37 PM
Updated March 6, 2024 at 4:19 AM
Resolved August 1, 2022 at 1:13 PM