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

API: refactor webapp to make use of FastAPI dependecy injection #213

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

UiP9AV6Y
Copy link
Contributor

@UiP9AV6Y UiP9AV6Y commented Jun 4, 2023

unify all interaction with the kubernetes API and the kubeseal binaries in reusable clients, which exist as mock and as productive implementations. the clients are injected using the FastAPI dependency injection system

@UiP9AV6Y
Copy link
Contributor Author

UiP9AV6Y commented Jun 4, 2023

this is a draft. i wanted to get some early feedback to see if this changes is acceptable. i still need to refactor the test suite. this change will replace most of the refactoring done in #206

api/kubeseal_webgui_api/app.py Fixed Show fixed Hide fixed
fetch_sealed_secrets_cert()
if settings.kubeseal_autofetch:
with open(settings.kubeseal_cert, "w") as file:
LOGGER.info("Saving certificate in '%s'", settings.kubeseal_cert)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (certificate)](1) as clear text.
for secret in data.secrets:
LOGGER.info(
"Sealing secret '%s.%s' for namespace '%s' with scope '%s'.",
data.secret,

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (secret)](1) as clear text.
@UiP9AV6Y UiP9AV6Y force-pushed the feature_api_di branch 2 times, most recently from 09d0a1b to 92d9908 Compare June 5, 2023 10:38
unify all interaction with the kubernetes API and the kubeseal
binaries in reusable clients, which exist as mock and as productive
implementations. the clients are injected using the FastAPI
dependency injection system
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