baolsen commented on a change in pull request #16612:
URL: https://github.com/apache/airflow/pull/16612#discussion_r656774830



##########
File path: airflow/providers/amazon/aws/hooks/base_aws.py
##########
@@ -214,18 +216,42 @@ def _assume_role_with_saml(
             RoleArn=role_arn, PrincipalArn=principal_arn, 
SAMLAssertion=saml_assertion, **assume_role_kwargs
         )
 
-    def _fetch_saml_assertion_using_http_spegno_auth(self, saml_config: 
Dict[str, Any]) -> str:
-        import requests
+    def _get_idp_response(
+        self, saml_config: Dict[str, Any], auth: requests.auth.AuthBase
+    ) -> requests.models.Response:
+        idp_url = saml_config["idp_url"]
+        self.log.info("idp_url= %s", idp_url)
+
+        session = requests.Session()
+

Review comment:
       Example configuration, can be set on the Connection extra along with the 
other attributes needed for assume-role-with-saml:
   
   ```
   "assume_role_with_saml": {
      [...]
      "idp_request_retry_kwargs": {
         "total": 10,
         "backoff_factor":1,
         "status":10,
         "status_forcelist": [400, 429, 500, 502, 503, 504]
      },
      [...]
   }
   ```
   The Retry strategy is triggers when the IDP responds with any HTTP status 
code which is in status_forcelist. 
   Up to 10 retries are attempted, with exponential backoff. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to