updated secret config names as well w/ burnettk

This commit is contained in:
jasquat 2023-02-15 17:17:47 -05:00
parent 3e4fc1259f
commit 9b93504945
3 changed files with 5 additions and 5 deletions

View File

@ -206,8 +206,8 @@ def handle_exception(exception: Exception) -> flask.wrappers.Response:
f" {exception.error_code}" f" {exception.error_code}"
) )
organization_slug = current_app.config.get("SENTRY_ORGANIZATION_SLUG") organization_slug = current_app.config.get("SPIFFWORKFLOW_BACKEND_SENTRY_ORGANIZATION_SLUG")
project_slug = current_app.config.get("SENTRY_PROJECT_SLUG") project_slug = current_app.config.get("SPIFFWORKFLOW_BACKEND_SENTRY_PROJECT_SLUG")
if organization_slug and project_slug: if organization_slug and project_slug:
sentry_link = ( sentry_link = (
f"https://sentry.io/{organization_slug}/{project_slug}/events/{id}" f"https://sentry.io/{organization_slug}/{project_slug}/events/{id}"

View File

@ -107,7 +107,7 @@ class AuthorizationService:
) )
received_sign = auth_header.split("sha256=")[-1].strip() received_sign = auth_header.split("sha256=")[-1].strip()
secret = current_app.config["GITHUB_WEBHOOK_SECRET"].encode() secret = current_app.config["SPIFFWORKFLOW_BACKEND_GITHUB_WEBHOOK_SECRET"].encode()
expected_sign = HMAC(key=secret, msg=request.data, digestmod=sha256).hexdigest() expected_sign = HMAC(key=secret, msg=request.data, digestmod=sha256).hexdigest()
if not compare_digest(received_sign, expected_sign): if not compare_digest(received_sign, expected_sign):
raise TokenInvalidError( raise TokenInvalidError(

View File

@ -104,7 +104,7 @@ class GitService:
branch_name_to_use, branch_name_to_use,
git_username, git_username,
git_email, git_email,
current_app.config["GIT_USER_PASSWORD"], current_app.config["SPIFFWORKFLOW_BACKEND_GIT_USER_PASSWORD"],
] ]
return cls.run_shell_command_to_get_stdout(shell_command) return cls.run_shell_command_to_get_stdout(shell_command)
@ -227,7 +227,7 @@ class GitService:
if git_clone_url.startswith("https://"): if git_clone_url.startswith("https://"):
git_clone_url = git_clone_url.replace( git_clone_url = git_clone_url.replace(
"https://", "https://",
f"https://{current_app.config['SPIFFWORKFLOW_BACKEND_GIT_USERNAME']}:{current_app.config['GIT_USER_PASSWORD']}@", f"https://{current_app.config['SPIFFWORKFLOW_BACKEND_GIT_USERNAME']}:{current_app.config['SPIFFWORKFLOW_BACKEND_GIT_USER_PASSWORD']}@",
) )
cmd = ["git", "clone", git_clone_url, destination_process_root] cmd = ["git", "clone", git_clone_url, destination_process_root]