From e674c6a695103659b8abf1a33a30049849d1b9a8 Mon Sep 17 00:00:00 2001 From: pratiksha rajendrabhai badheka Date: Wed, 4 Dec 2024 18:05:16 +0530 Subject: [PATCH] fix if clause for approle authentication --- providers/src/airflow/providers/hashicorp/hooks/vault.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/providers/src/airflow/providers/hashicorp/hooks/vault.py b/providers/src/airflow/providers/hashicorp/hooks/vault.py index 0b1b7a102009c..37e409f388af2 100644 --- a/providers/src/airflow/providers/hashicorp/hooks/vault.py +++ b/providers/src/airflow/providers/hashicorp/hooks/vault.py @@ -145,9 +145,8 @@ def __init__( if kwargs: client_kwargs = merge_dicts(client_kwargs, kwargs) - if auth_type == "approle": - if self.connection.login: - role_id = self.connection.login + if auth_type == "approle" and self.connection.login: + role_id = self.connection.login if auth_type == "aws_iam": if not role_id: