Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: independent session banner setting #396

Merged
merged 7 commits into from
Jun 15, 2024

Conversation

reubenmiller
Copy link
Owner

@reubenmiller reubenmiller commented Jun 15, 2024

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 to true 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. via set-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

# Add this to your sehll profile for
eval "$(c8y settings update session.hide true --shell auto)"

# Or you can update for a specific session (after you have set the session)
# then setting the session will not print sensitive session information
c8y settings update session.hide true

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.

set-session --no-banner

Output

$ set-session --no-banner
✓ Session is now active

@reubenmiller reubenmiller force-pushed the feat-session-banner-setting branch from 1c198ad to 6b79f6c Compare June 15, 2024 12:35
@reubenmiller reubenmiller merged commit 7846c4f into v2 Jun 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant