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
Labels
enhancement
New feature or request
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 toTrue
, that when set toFalse
bypasses theinit_db()
call instart_webserver()
in ourmain.py
. If the flag is set toFalse
, 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.
The text was updated successfully, but these errors were encountered: