prime-rate-matt opened a new pull request, #77068: URL: https://github.com/apache/airflow/pull/77068
Setting up Workload Identity Federation (WIF) on a Snowflake connection needed two steps. You filled in the **Workload Identity Provider** form field, and you also had to add `"authenticator": "WORKLOAD_IDENTITY"` to the Extra JSON. Nothing in the form mentioned the second step. Without it the hook quietly fell back to the default `snowflake` (password) authenticator, so the connection failed even though the Workload Identity Provider field was filled in. This PR makes that setup work from the form alone: - **Authenticator set automatically:** when `workload_identity_provider` is set and no authenticator is given, `SnowflakeHook` now uses `WORKLOAD_IDENTITY`. This works the same way as the existing OAuth case, where setting `refresh_token` sets `authenticator = "oauth"`. An `authenticator` set in the extras or passed to the hook still takes priority, so existing connections behave as before. `SnowflakeSqlApiHook` and the Cortex Agent hook read the same connection settings, so they pick this up too. - **New Authenticator form field:** it is free text, because the connector also accepts Okta URLs, so a fixed list of values would not work. Its placeholder lists the common values. It replaces the `authenticator` hint in the Extra JSON placeholder. - **`authenticator` read with `_get_field`:** this lets a blank form field fall back to `snowflake` instead of sending an empty string to the connector, and it also accepts the `extra__snowflake__authenticator` key name, like the other fields. - Updated the connection docs and the WIF example, and regenerated `get_provider_info.py` from `provider.yaml`. Tests cover the automatic setting, explicit values taking priority, a blank form field, the `extra__snowflake__` key name, and the new form widget. Each new-behaviour case fails without the change. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
