Zeglow commented on issue #55841:
URL: https://github.com/apache/airflow/issues/55841#issuecomment-3310684416

   > just want to share some small insights. It looks like the "Login" and the 
"Password" fields are mapped to the "Client ID" and "Client Secret" 
respectively. However, the relabeling somehow doesn't work.
   > 
   > 
[airflow/providers/airbyte/src/airflow/providers/airbyte/hooks/airbyte.py](https://github.com/apache/airflow/blob/e66b237238c6eef1826c001e584a1992b3d879e7/providers/airbyte/src/airflow/providers/airbyte/hooks/airbyte.py#L59-L74)
   > 
   > Lines 59 to 74 in 
[e66b237](/apache/airflow/commit/e66b237238c6eef1826c001e584a1992b3d879e7)
   > 
   >  def get_conn_params(self, conn_id: str) -> Any: 
   >      conn = self.get_connection(conn_id) 
   >   
   >      # Intentionally left the password out, you can modify the log to 
print it out if you are doing testing. 
   >      self.log.debug( 
   >          "Connection attributes are: host - %s, url - %s, description - 
%s", 
   >          conn.host, 
   >          conn.schema, 
   >          conn.description, 
   >      ) 
   >      conn_params: dict = {} 
   >      conn_params["host"] = conn.host 
   >      conn_params["client_id"] = conn.login 
   >      conn_params["client_secret"] = conn.password 
   >      conn_params["token_url"] = conn.schema or "v1/applications/token" 
   >      conn_params["proxies"] = conn.extra_dejson.get("proxies", None) 
   > 
[airflow/providers/airbyte/src/airflow/providers/airbyte/hooks/airbyte.py](https://github.com/apache/airflow/blob/e66b237238c6eef1826c001e584a1992b3d879e7/providers/airbyte/src/airflow/providers/airbyte/hooks/airbyte.py#L99-L108)
   > 
   > Lines 99 to 108 in 
[e66b237](/apache/airflow/commit/e66b237238c6eef1826c001e584a1992b3d879e7)
   > 
   >  def get_ui_field_behaviour(cls) -> dict[str, Any]: 
   >      """Return custom field behaviour.""" 
   >      return { 
   >          "hidden_fields": [ 
   >              "extra", 
   >              "port", 
   >          ], 
   >          "relabeling": {"login": "Client ID", "password": "Client Secret", 
"schema": "Token URL"}, 
   >          "placeholders": {}, 
   >      }
   
   Hi Kevin, thank you for your comment! The code in `get_ui_field_behaviour` 
seems can work as expected once the environment is set up with `pip install 
"apache-airflow[fab]"`.
   
   


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