jason810496 commented on code in PR #58659:
URL: https://github.com/apache/airflow/pull/58659#discussion_r2639169518
##########
airflow-core/src/airflow/cli/cli_config.py:
##########
@@ -790,6 +790,20 @@ def string_lower_type(val):
("option",),
help="The option name",
)
+ARG_NON_SENSITIVE = Arg(
+ ("--non-sensitive",),
+ action="store_true",
+ help="When used with --show-values, hide sensitive values (passwords,
keys, tokens, etc.) and only show non-sensitive configuration values.",
+)
+ARG_CONFIG_SHOW_VALUES = Arg(
+ ("--show-values",),
+ action="store_true",
+ help=(
+ "Show configuration values. "
+ "By default only option names are shown and values (including
potentially "
+ "sensitive ones) are hidden."
+ ),
+)
Review Comment:
How about removing `--show-values` flag to remain the behavior as is
(showing the value by default without the `--show-values`) to minimize breaking
change to user?
Then we might need to change the `--non-sensitive` somehow like
`--show-sensitive` and `--show-sensitive` will be default as False.
##########
shared/configuration/src/airflow_shared/configuration/parser.py:
##########
@@ -1595,29 +1595,39 @@ def _write_value(
needs_separation: bool,
only_defaults: bool,
section_to_write: str,
+ non_sensitive: bool,
+ is_sensitive: bool,
Review Comment:
We might need to rename `non_sensitive` parameter under this context, as we
also have `is_sensitive` parameter for the same function, so the purpose of
`non_sensitive` might be unclear.
Maybe we could name as `hide_sensitive`, `redact_sensitive` or `show_values`
etc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]