Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

environment var to disable fidesops db integration for certain use cases #545

Closed
adamsachs opened this issue May 20, 2022 · 0 comments · Fixed by #550
Closed

environment var to disable fidesops db integration for certain use cases #545

adamsachs opened this issue May 20, 2022 · 0 comments · Fixed by #550
Assignees
Labels
enhancement New feature or request

Comments

@adamsachs
Copy link
Contributor

Is your feature request related to a specific problem?

Certain targeted uses of Fidesops (e.g. using fidesops as a masking service) make use of APIs that do not require the core application db integration. In use cases that want to leverage only these APIs, it may be desirable to allow admins to deploy the application in a mode that does not require db integration, enabling lighter-weight deployments.

Describe the solution you'd like

An environment variable (e.g. FIDESOPS__DATABASE__ENABLED ?), defaulted to True, that when set to False bypasses the init_db() call in start_webserver() in our main.py. If the flag is set to False, any endpoints that require application db integration (most) will fail; preferably they will fail with a clear error message reported to the user. Any endpoints that do not require application db integration (e.g. the standalone masking endpoint) will continue to operate normally.

Some initial investigation points me to get_db() as potentially a good place to check for the config setting and throw a clearer error message to the user, rather than letting the app attempt to connect to the db and fail ungracefully.

@adamsachs adamsachs added the enhancement New feature or request label May 20, 2022
@adamsachs adamsachs added this to the Masking Engine milestone May 23, 2022
@adamsachs adamsachs self-assigned this May 23, 2022
@adamsachs adamsachs linked a pull request May 23, 2022 that will close this issue
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant