Skip to content

Add subject support for Google Workspace Domain-Wide Delegation#69687

Open
DEEPIKA-217M wants to merge 9 commits into
apache:mainfrom
DEEPIKA-217M:fix-google-workspace-delegation
Open

Add subject support for Google Workspace Domain-Wide Delegation#69687
DEEPIKA-217M wants to merge 9 commits into
apache:mainfrom
DEEPIKA-217M:fix-google-workspace-delegation

Conversation

@DEEPIKA-217M

@DEEPIKA-217M DEEPIKA-217M commented Jul 10, 2026

Copy link
Copy Markdown

Description

This PR adds support for Google Workspace Domain-Wide Delegation by introducing a subject parameter across the Google provider authentication flow.

Changes made

  • Added subject support to GoogleBaseHook.
  • Propagated subject through the credentials provider.
  • Applied delegated credentials using credentials.with_subject(...) when supported.
  • Added subject support to Google Drive, Google Sheets, and Discovery API hooks.
  • Updated Google Drive operators and sensors to forward the subject parameter.

Testing

  • Verified the code compiles successfully.
  • Ran git diff --check with no formatting issues.
  • Reviewed the authentication flow to ensure existing impersonation behavior remains unchanged.

Related: #67051

  • Yes

Generated-by: chatgpt for some reference


Important

🛠️ Maintainer triage note for @DEEPIKA-217M · by @potiuk · 2026-07-18 15:46 UTC

Helpful heads-up from the maintainers — please address before this PR can be reviewed:

  • Provider tests. See docs.

See the Pull Request quality criteria for details.

The ball is in your court — you've been assigned to this PR. Fix the above, then mark it Ready for review.

Automated triage — may be imperfect; a maintainer takes the next look.

@DEEPIKA-217M
DEEPIKA-217M requested a review from shahar1 as a code owner July 10, 2026 04:48
@boring-cyborg boring-cyborg Bot added area:providers provider:google Google (including GCP) related issues labels Jul 10, 2026
@boring-cyborg

boring-cyborg Bot commented Jul 10, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@potiuk
potiuk marked this pull request as draft July 18, 2026 15:47
@DEEPIKA-217M
DEEPIKA-217M marked this pull request as ready for review July 19, 2026 11:58

@aaron-y-chen aaron-y-chen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Here is my feedback:

  1. Could you add unit tests covering subject, including the case where it is combined with impersonation_chain?
  2. Have you tested this against a real Google Workspace / GCP environment? In my experience, credential-related changes, especially Domain-Wide Delegation, are hard to fully verify by relying only on unit tests or mocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants