feat: independent session banner setting #396
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Control the display of the session banner when setting a new session independently to the "logger.hideSensitive" setting.
In go-c8y-cli v2.40.0, the default value of the "logger.hideSensitive" setting was change from
false
totrue
in order to prevent leakage of sensitive information when users are screensharing. However the new default value had negative user impact as it would obfuscate the session information when a user is activating a session (e.g. viaset-session
) which resulted in the user being unsure if the session activate was successful and unsure which session was selected.Providing feedback to the user when setting a session is critical in most cases as it ensure they have the correct context (e.g. target Cumulocity instance) before they start interacting with the Cumulocity instance.
Given this background, a new setting has been created to control the display of the session information when activating a session, and the default value is to display the session information (e.g. host, tenant, username etc.).
Example
If you want to hide the displayed session information you have two options:
Option 1: Hide the session banner information
Option 2: Skip printing of the entire banner when setting a session
You can add the
--no-banner
flag when setting the session, which will skip the printing of the session banner. The user will still get feedback that the command successfully activated a session by a simple message containing no sensitive information.Output