<#7003 Add singleton `set --interactive SETTING` s...
# meltano-repo-activity
g
#7003 Add singleton
set --interactive SETTING
support, and default to it when a value is not provided
Issue created by aaronsteers Something like this was discussed in our initial launch of
--interactive
, and it came up also today in our spec discussion for allowing encryption of config values at rest. Core feature description 1: Add support for running config set interactively for singleton config operations. Currently, you can configure an entire plugin with the interactive mode, but you can't interactively configure just a single setting. 2: Infer
--interactive
when no value is provided in a singleton
config set
operation
Basically, we'd treat
meltano config tap-mysql set password
as equivalent to
meltano config tap-mysql set --interactive password
. Optional features We can optionally include here, or in a follow-on, some additional value-add interactivity: 3 (optional): Enter
--interactive
whenever
tty
exists and validation fails for provided inputs
This could actually be the means of delivering core feature 2 above. (I.e., gracefully realize that validation fails because nothing is provided, and then prompt the user to provide it.) This would then enter an interactive prompt whenever a string can't be cast to a boolean, or a date cannot be interpreted as such, etc. 4 (optional): Add a prompt to the singleton
--interactive
mode that collects setting information when none is available, and prompt the user to confirm the setting is correctly spelled.
This would provide a 'are you sure?' and 'tell us more...' prompt when an otherwise undefined setting is attempted to be configured. Addl. details This would solve for a (admittedly minor) security-related issue we have presently, where a user adding a Hub-based plugin that does not have settings defined would inadvertantly use cleartext store of
meltano.yml
if they try to set a secret/password field that is not already defined in the
settings
definition as such. Logged here: • #2717 This also protects against a user inadvertantly leaking their credentials if they try to set
meltano config set tap-mysql pass mysecretpassword
if the setting
password
is mispelled as
pass
. As of today, I think Meltano would silently accept the value and put it in the default store, because it does not have any information labeling the mispelling as sensitive. A very simple implementation of this could be:
Copy code
> % meltano config set tap-mysql pass mysecretpass
It looks like you are trying to configure a setting 'pass' which is not defined.
The known settings names are:
- host
- username
- password
- `...`
Would you like to proceed with setting a value for 'pass'? [y]/n: y
Okay, please select the correct setting type from the list below:
1: string
2: password
3: ...
Enter value [1-6]: 2
You've successfully created a setting definition for `pass`.
Enter the value you'd like to store in `pass`: ******
Value for `pass` stored successfully in the `systemdb`: (redacted)
meltano/meltano