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

Hide sensitive connection args #9192

Merged
merged 25 commits into from May 16, 2024
Merged

Hide sensitive connection args #9192

merged 25 commits into from May 16, 2024

Conversation

StpMax
Copy link
Collaborator

@StpMax StpMax commented May 9, 2024

Description

This PR allows to hide sensitive information from:

  • engine connection arguments
  • model 'using' arguments
  • database connection arguments

By default any listed arguments will be replaced with '******'. This behavior can be controlled by setting the show_secrets variable:

set show_secrets=true;  -- by default
set show_secrets=false;

Also, the connection_args and connection_args_example are extracted from the file with the handler and saved in a separate file. This allows us to process the arguments even if the handler cannot be imported.

https://www.loom.com/share/630eec6626fc4e5c9b384504080b4541

Close #8623

Doc issue #9209

Type of change

(Please delete options that are not relevant)

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ⚡ New feature (non-breaking change which adds functionality)
  • 📢 Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • 📄 This change requires a documentation update

Verification Process

To ensure the changes are working as expected:

  • Test Location: Specify the URL or path for testing.
  • Verification Steps: Outline the steps or queries needed to validate the change. Include any data, configurations, or actions required to reproduce or see the new functionality.

Additional Media:

  • I have attached a brief loom video or screenshots showcasing the new functionality or change.

Checklist:

  • My code follows the style guidelines(PEP 8) of MindsDB.
  • I have appropriately commented on my code, especially in complex areas.
  • Necessary documentation updates are either made or tracked in issues.
  • Relevant unit and integration tests are updated or added.

@StpMax StpMax marked this pull request as ready for review May 14, 2024 16:08
Copy link
Member

@ZoranPandovski ZoranPandovski left a comment

Choose a reason for hiding this comment

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

The only concern I have is that this PR affects all integrations and we don't have tests to verify if they work. Let me run some of the old health checks that we had for more then 30 integrations on this branch

@StpMax
Copy link
Collaborator Author

StpMax commented May 15, 2024

@ZoranPandovski it does not change integrations itself, only move connection_args outside from handler's file, so should not break anything

@ZoranPandovski
Copy link
Member

Yes, it only affects the GUI form, so e2e tests on GUI work with this PR. We can merge it

@StpMax StpMax merged commit 3846248 into main May 16, 2024
12 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.

[Bug]: OpenAI's API Token is Visible
2 participants