Skip to content

Conversation

@abhijeets25012-tech
Copy link

This PR enhances the Airflow CLI connections_list command by introducing a new optional flag --show-values. By default, sensitive fields like passwords and extra data are hidden for security reasons. When this flag is used, the command will display all connection details, including sensitive values.

Changes included:

Added --show-values optional argument to the connections_list command.

Updated _connection_mapper function to accept a show_values parameter.

Adjusted CLI output to show sensitive fields only when the flag is provided.

Benefits:

Provides flexibility for administrators to view full connection details from the CLI when needed.

Maintains security by hiding sensitive values by default.

Tested:

Verified that connections_list without --show-values hides passwords and extras.

Verified that connections_list --show-values displays all fields correctly.

"""List all connections at the command line."""
with create_session() as session:
query = select(Connection)
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have some conflicts here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestion I will fix it

@potiuk
Copy link
Member

potiuk commented Dec 31, 2025

That's not exactly what we wanted. The list command shoudl just list connection without any values by default (not even sensitive). And it should use redact from secrets masker to hide sensitive data when --hide-sensitive is used additonally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants