Skip to content

Commit cd95402

Browse files
Adding optional parameters required for authentication inside auth_type
Signed-off-by: Naveen Tatikonda <[email protected]>
1 parent 3053b39 commit cd95402

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/logstash/outputs/opensearch/http_client/manticore_adapter.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def get_auth_type(options)
6565
def aws_iam_auth_initialization(options)
6666
aws_access_key_id = options[:auth_type]["aws_access_key_id"] || nil
6767
aws_secret_access_key = options[:auth_type]["aws_secret_access_key"] || nil
68-
session_token = options[:session_token] || nil
69-
profile = options[:profile] || AWS_DEFAULT_PROFILE
70-
instance_cred_retries = options[:instance_profile_credentials_retries] || 0
71-
instance_cred_timeout = options[:instance_profile_credentials_timeout] || 1
68+
session_token = options[:auth_type]["session_token"] || nil
69+
profile = options[:auth_type]["profile"] || AWS_DEFAULT_PROFILE
70+
instance_cred_retries = options[:auth_type]["instance_profile_credentials_retries"] || 0
71+
instance_cred_timeout = options[:auth_type]["instance_profile_credentials_timeout"] || 1
7272
region = options[:auth_type]["region"] || AWS_DEFAULT_REGION
7373
set_aws_region(region)
7474

0 commit comments

Comments
 (0)