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

[Docs]: Update Build Handler section #9209

Open
StpMax opened this issue May 14, 2024 · 0 comments
Open

[Docs]: Update Build Handler section #9209

StpMax opened this issue May 14, 2024 · 0 comments
Labels
documentation Documentation needs to be added or changed

Comments

@StpMax
Copy link
Collaborator

StpMax commented May 14, 2024

Short description of what should be added or improved

Changes in this PR allow to hide sensitive information in a query response. In order to make this possible, arguments that should be hidden need to be properly defined in handler files:

  1. For DB handlers, connection_args and connection_args_example should be placed in separate file from file with handler class (for example). Import of connection_args and connection_args_example should be placed outside of try/catch block in __init__.py (for example).
  2. For connection_args a new property has been added: secret. When it set to True, then this field will be replaced to ****** in query responses (for example).
  3. For 'ML' handlers creation and using arguments should be described in same way and exported as creation_args and model_using_args (names are not best, may be changed in future, example here and here)

This is not mandatory for handlers, but when connection_args are separated from the handler class, they can be read even if the handler class is broken. Therefore, the connection_args of this handler can be used in a microservice architecture without having to import the dependencies of the handler. Additionally, if this handler were to fail (for example, if one of its dependencies were to update incorrectly), the secret would still be hidden, as we can still access the connection_args.

Video or screenshots

No response

Anything else?

No response

@StpMax StpMax added the documentation Documentation needs to be added or changed label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation needs to be added or changed
Projects
None yet
Development

No branches or pull requests

1 participant