extend bitwarden credential to support vaultwarden (#3268)

This commit is contained in:
LawyZheng
2025-08-22 13:02:12 +08:00
committed by GitHub
parent c54ba42bb9
commit 44d7c73242
3 changed files with 26 additions and 22 deletions

View File

@@ -416,9 +416,9 @@ class WorkflowRunContext:
LOG.error(f"Failed to get Bitwarden login credentials from AWS secrets. Error: {e}")
raise e
if not client_id:
if not client_id and not settings.BITWARDEN_EMAIL:
raise ValueError("Bitwarden client ID not found")
if not client_secret:
if not client_secret and not settings.BITWARDEN_EMAIL:
raise ValueError("Bitwarden client secret not found")
if not master_password:
raise ValueError("Bitwarden master password not found")
@@ -519,9 +519,9 @@ class WorkflowRunContext:
LOG.error(f"Failed to get Bitwarden login credentials from AWS secrets. Error: {e}")
raise e
if not client_id:
if not client_id and not settings.BITWARDEN_EMAIL:
raise ValueError("Bitwarden client ID not found")
if not client_secret:
if not client_secret and not settings.BITWARDEN_EMAIL:
raise ValueError("Bitwarden client secret not found")
if not master_password:
raise ValueError("Bitwarden master password not found")
@@ -586,9 +586,9 @@ class WorkflowRunContext:
LOG.error(f"Failed to get Bitwarden login credentials from AWS secrets. Error: {e}")
raise e
if not client_id:
if not client_id and not settings.BITWARDEN_EMAIL:
raise ValueError("Bitwarden client ID not found")
if not client_secret:
if not client_secret and not settings.BITWARDEN_EMAIL:
raise ValueError("Bitwarden client secret not found")
if not master_password:
raise ValueError("Bitwarden master password not found")