Skip to content

Commit

Permalink
depr(app): Mark configs moved to service as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
daryllimyt committed Jan 9, 2025
1 parent a665497 commit d0ed2c9
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tracecat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@
TRACECAT__DB_PORT = os.environ.get("TRACECAT__DB_PORT")

# === Auth config === #
# Infrastructure config
TRACECAT__AUTH_TYPES = {
AuthType(t.lower())
for t in os.environ.get("TRACECAT__AUTH_TYPES", "basic,google_oauth").split(",")
}
"""The set of allowed auth types on the platform. If an auth type is not in this set,
it cannot be enabled."""

TRACECAT__AUTH_REQUIRE_EMAIL_VERIFICATION = os.environ.get(
"TRACECAT__AUTH_REQUIRE_EMAIL_VERIFICATION", ""
).lower() in ("true", "1") # Default to False
Expand All @@ -74,6 +78,8 @@
((domains := os.getenv("TRACECAT__AUTH_ALLOWED_DOMAINS")) and domains.split(","))
or []
)
"""Deprecated: This config has been moved into the settings service"""

TRACECAT__AUTH_MIN_PASSWORD_LENGTH = int(
os.environ.get("TRACECAT__AUTH_MIN_PASSWORD_LENGTH") or 12
)
Expand All @@ -93,10 +99,16 @@

# SAML SSO
SAML_IDP_CERTIFICATE = os.environ.get("SAML_IDP_CERTIFICATE")
"""Deprecated: This config has been removed"""

SAML_IDP_METADATA_URL = os.environ.get("SAML_IDP_METADATA_URL")
"""Deprecated: This config has been moved into the settings service"""

SAML_SP_ACS_URL = os.environ.get(
"SAML_SP_ACS_URL", "http://localhost/api/auth/saml/acs"
)
"""Deprecated: This config has been moved into the settings service"""

XMLSEC_BINARY_PATH = os.environ.get("XMLSEC_BINARY_PATH", "/usr/bin/xmlsec1")

# === CORS config === #
Expand Down Expand Up @@ -146,15 +158,20 @@
"TRACECAT__ALLOWED_GIT_DOMAINS", "github.com,gitlab.com,bitbucket.org"
).split(",")
)
"""Deprecated: This config has been moved into the settings service"""
# If you wish to use a remote registry, set the URL here
# If the url is unset, this will be set to None
TRACECAT__REMOTE_REPOSITORY_URL = (
os.environ.get("TRACECAT__REMOTE_REPOSITORY_URL") or None
)
"""Deprecated: This config has been moved into the settings service"""
TRACECAT__REMOTE_REPOSITORY_PACKAGE_NAME = os.getenv(
"TRACECAT__REMOTE_REPOSITORY_PACKAGE_NAME"
)
"""If not provided, the package name will be inferred from the git remote URL."""
"""If not provided, the package name will be inferred from the git remote URL.
Deprecated: This config has been moved into the settings service
"""

# === Email settings === #
TRACECAT__ALLOWED_EMAIL_ATTRIBUTES = os.environ.get(
Expand Down

0 comments on commit d0ed2c9

Please sign in to comment.