Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pluggable auth support #1045

Merged
merged 20 commits into from
Jun 28, 2022
Merged

feat: pluggable auth support #1045

merged 20 commits into from
Jun 28, 2022

Conversation

renkelvin
Copy link
Contributor

@renkelvin renkelvin commented May 27, 2022

Recreate Pluggable Auth PR

The 1st commit(52f6950) is squashed from the PR approved before(#995)

The 2nd commit(a8c53f8) disabled pluggable auth for Python 2

  1. Use subprocess.run() instead of subprocess.check_output(). Raise an exception in Python 2
  2. Exclude test_pluggable.py for unit tests in Python 2
  3. Modify test cases accordingly

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

feat: Add Pluggable auth support (#988)

* Port identity pool credentials

* access_token retrieved

* -> pluggable

* Update pluggable.py

* Create test_pluggable.py

* Unit tests

* Address pr issues

feat: Add file caching (#990)

* Add file cache

* feat: add output file cache support

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Update pluggable.py

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Update pluggable.py

Update setup.py

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Update setup.py

Update setup.py

pytest_subprocess

timeout

Update pluggable.py

env

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Update _default.py

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Update requirements.txt

Update _default.py

Update pluggable.py

Update pluggable.py

Update pluggable.py

Update test_pluggable.py

format validations

Update _default.py

Update requirements.txt

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Revert "Update requirements.txt"

This reverts commit 1c9b6db.

Revert "Update _default.py"

This reverts commit ac6c360.

Revert "Revert "Update _default.py""

This reverts commit 1c08483.

Raise output format error but retry parsing token if `success` is 0

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Update requirements.txt

Delete test_pluggable.py

Revert "Delete test_pluggable.py"

This reverts commit 74beba9.

Update pluggable.py

Update pluggable.py

pytest-subprocess

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

lint

Update pluggable.py

nox cover

nox cover

🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

lint

Update test_pluggable.py

Update test_pluggable.py
@renkelvin renkelvin added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 27, 2022
@renkelvin renkelvin requested review from arithmetic1728, sai-sunder-s and a team as code owners May 27, 2022 18:46
@lsirac
Copy link
Contributor

lsirac commented May 27, 2022

You can copy the docs I wrote in googleapis/google-auth-library-java#921

1 similar comment
@lsirac
Copy link
Contributor

lsirac commented May 27, 2022

You can copy the docs I wrote in googleapis/google-auth-library-java#921

Copy link
Contributor

@lsirac lsirac left a comment

Choose a reason for hiding this comment

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

Thanks Chuan!

google/auth/pluggable.py Outdated Show resolved Hide resolved
google/auth/pluggable.py Outdated Show resolved Hide resolved
tests/test_pluggable.py Show resolved Hide resolved
tests/test_pluggable.py Show resolved Hide resolved
- `$POOL_ID`: The workload identity pool ID.
- `$PROVIDER_ID`: The OIDC or SAML provider ID.
- `$SERVICE_ACCOUNT_EMAIL`: The email of the service account to impersonate.
- `SUBJECT_TOKEN_TYPE`: The subject token type.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `SUBJECT_TOKEN_TYPE`: The subject token type.
- `$SUBJECT_TOKEN_TYPE`: The subject token type.

@renkelvin
Copy link
Contributor Author

Hey @arithmetic1728 , could you help take a look at the CI issues?

For the docs-presubmit, it looks something wrong with the config? I reverted all the changes locally but the issue persisted.

For the Kokoro system-3.7 issue, looks like it's the same issue of expired token as before.

Thanks!

@arithmetic1728
Copy link
Contributor

@renkelvin The fix is in #1047

The system test credential expires roughly every 2 days, I will update it again once your PR is ready for checking in. You can ignore the system-3.7 failure during the code review.

google/auth/pluggable.py Outdated Show resolved Hide resolved
@renkelvin renkelvin requested a review from TimurSadykov as a code owner June 28, 2022 17:59
@renkelvin renkelvin removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 28, 2022
@sai-sunder-s sai-sunder-s merged commit de14f4e into main Jun 28, 2022
@sai-sunder-s sai-sunder-s deleted the pluggable_3 branch June 28, 2022 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants