seanghaeli commented on code in PR #76332:
URL: https://github.com/apache/airflow/pull/76332#discussion_r4529626075


##########
providers/amazon/src/airflow/providers/amazon/aws/executors/eks/_client_factory.py:
##########
@@ -138,14 +175,21 @@ def _configure_eks_auth(
     def refresh_api_key(config: client.Configuration | 
async_client.Configuration) -> None:
         nonlocal token, refresh_at
         if token is None or time.monotonic() >= refresh_at:
+            # Sign with the credentials the connection resolves to now: only a 
new session picks up
+            # static keys rotated outside the process, such as in a rewritten 
credentials file.
             token = fetch_access_token_for_cluster(
-                cluster_name, sts_url, region_name=session.region_name, 
session=session
+                cluster_name, sts_url, region_name=session.region_name, 
session=eks_hook.get_session()

Review Comment:
   That being said, any deployment I can think of use a role rather than keys 
stored in the connection.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to