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

fix: avoid deprecated "out-of-band" authentication flow #55

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

tswast
Copy link
Collaborator

@tswast tswast commented Mar 10, 2022

The console-based copy-paste-a-token flow has been deprecated. See:
https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob

@tswast
Copy link
Collaborator Author

tswast commented Mar 10, 2022

CircleCI failure due to TheKevJames/tools#315. Tests pass locally.

(dev-3.9) ➜  pydata-google-auth git:(oob-deprecation) ✗ nox             
nox > Running session unit-2.7
nox > Creating virtual environment (virtualenv) using python2.7 in .nox/unit-2-7
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-2.7.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-2.7.txt
nox > py.test --quiet --junitxml=unit_2.7_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                          [100%]Coverage.py warning: Couldn't parse Python file '/Users/swast/src/github.com/pydata/pydata-google-auth/pydata_google_auth/__main__.py' (couldnt-parse)

------ generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_2.7_sponge_log.xml -------


15 passed in 1.05 seconds
nox > Session unit-2.7 was successful.
nox > Running session unit-3.6
nox > Creating virtual environment (virtualenv) using python3.6 in .nox/unit-3-6
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.6.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.6.txt
nox > py.test --quiet --junitxml=unit_3.6_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                          [100%]
------ generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.6_sponge_log.xml -------


15 passed in 0.69s
nox > Session unit-3.6 was successful.
nox > Running session unit-3.7
nox > Creating virtual environment (virtualenv) using python3.7 in .nox/unit-3-7
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.7.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.7.txt
nox > py.test --quiet --junitxml=unit_3.7_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                          [100%]
------ generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.7_sponge_log.xml -------


15 passed in 0.69s
nox > Session unit-3.7 was successful.
nox > Running session unit-3.8
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/unit-3-8
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.8.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.8.txt
nox > py.test --quiet --junitxml=unit_3.8_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                          [100%]
------ generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.8_sponge_log.xml -------


15 passed in 0.74s
nox > Session unit-3.8 was successful.
nox > Running session unit-3.9
nox > Creating virtual environment (virtualenv) using python3.9 in .nox/unit-3-9
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.9.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.9.txt
nox > py.test --quiet --junitxml=unit_3.9_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                          [100%]
------ generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.9_sponge_log.xml -------


15 passed in 0.74s
nox > Session unit-3.9 was successful.
nox > Running session unit-3.10
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/unit-3-10
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.10.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.10.txt
nox > py.test --quiet --junitxml=unit_3.10_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                          [100%]
------ generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.10_sponge_log.xml ------


15 passed in 0.73s
nox > Session unit-3.10 was successful.
nox > Running session system-2.7
nox > Creating virtual environment (virtualenv) using python2.7 in .nox/system-2-7
nox > python -m pip install --pre grpcio
nox > python -m pip install mock pyfakefs pytest pytest-cov google-cloud-testutils -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-2.7.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-2.7.txt
nox > py.test --quiet --junitxml=system_2.7_sponge_log.xml --cov=pydata_google_auth --cov=tests/system --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/system
.....                                                                                                    [100%]Coverage.py warning: Couldn't parse Python file '/Users/swast/src/github.com/pydata/pydata-google-auth/pydata_google_auth/__main__.py' (couldnt-parse)

----- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/system_2.7_sponge_log.xml ------


5 passed in 64.92 seconds
nox > Session system-2.7 was successful.
nox > Running session system-3.8
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/system-3-8
nox > python -m pip install --pre grpcio
nox > python -m pip install mock pyfakefs pytest pytest-cov google-cloud-testutils -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.8.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.8.txt
nox > py.test --quiet --junitxml=system_3.8_sponge_log.xml --cov=pydata_google_auth --cov=tests/system --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/system
.....                                                                                                    [100%]
----- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/system_3.8_sponge_log.xml ------


5 passed in 11.52s
nox > Session system-3.8 was successful.
nox > Running session cover
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/cover
nox > python -m pip install coverage pytest-cov
nox > coverage report --show-missing --fail-under=60
Name                               Stmts   Miss  Cover   Missing
----------------------------------------------------------------
pydata_google_auth/__init__.py        10      0   100%
pydata_google_auth/__main__.py        36     36     0%   3-108
pydata_google_auth/_version.py       279    152    46%   87-98, 103-106, 117-138, 148-167, 174, 187, 189-223, 242, 246-248, 267, 271, 296-297, 302-309, 320-322, 336, 358-360, 370-377, 390-404, 415-426, 437-446, 458-466, 472, 481, 485-496, 529-530, 541-550
pydata_google_auth/_webserver.py      26      0   100%
pydata_google_auth/auth.py            73     13    82%   96, 113, 149-154, 234, 266-268, 275-276, 354-361, 404
pydata_google_auth/cache.py           91     15    84%   55-57, 103-106, 123-124, 145-151, 231
pydata_google_auth/exceptions.py       2      0   100%
tests/system/__init__.py               0      0   100%
tests/system/test_auth.py             29      0   100%
tests/unit/__init__.py                 0      0   100%
tests/unit/test_auth.py               51      0   100%
tests/unit/test_cache.py              43      1    98%   27
tests/unit/test_webserver.py          43      0   100%
----------------------------------------------------------------
TOTAL                                683    217    68%
nox > coverage erase
nox > Session cover was successful.
nox > Running session lint
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/lint
nox > python -m pip install flake8 black==19.10b0
nox > black --check docs pydata_google_auth tests noxfile.py setup.py
All done! ✨ 🍰 ✨
17 files would be left unchanged.
nox > flake8 pydata_google_auth tests
nox > Session lint was successful.
nox > Running session lint_setup_py
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/lint_setup_py
nox > python -m pip install docutils pygments
nox > python setup.py check --restructuredtext --strict
running check
nox > Session lint_setup_py was successful.
nox > Running session blacken
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/blacken
nox > python -m pip install black==19.10b0
nox > black docs pydata_google_auth tests noxfile.py setup.py
All done! ✨ 🍰 ✨
17 files left unchanged.
nox > Session blacken was successful.
nox > Running session docs
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/docs
nox > python -m pip install sphinx sphinx_rtd_theme ipython
nox > python -m pip install -e .
nox > sphinx-build -W -T -N -b html -d docs/source/_build/doctrees/ docs/source/ docs/source/_build/html/
Running Sphinx v4.4.0
making output directory... done
[autosummary] generating autosummary for: api.rst, changelog.rst, cli.rst, contributing.rst, index.rst, install.rst, intro.rst, privacy.rst
loading intersphinx inventory from https://docs.python.org/objects.inv...
loading intersphinx inventory from https://google-auth.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://google-auth-oauthlib.readthedocs.io/en/latest/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 8 source files that are out of date
updating environment: [new config] 8 added, 0 changed, 0 removed
reading sources... [ 12%] api
reading sources... [ 25%] changelog
reading sources... [ 37%] cli
reading sources... [ 50%] contributing
reading sources... [ 62%] index
reading sources... [ 75%] install
reading sources... [ 87%] intro
reading sources... [100%] privacy

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 12%] api
writing output... [ 25%] changelog
writing output... [ 37%] cli
writing output... [ 50%] contributing
writing output... [ 62%] index
writing output... [ 75%] install
writing output... [ 87%] intro
writing output... [100%] privacy

generating indices... genindex py-modindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in docs/source/_build/html.
nox > Session docs was successful.
nox > Ran multiple sessions:
nox > * unit-2.7: success
nox > * unit-3.6: success
nox > * unit-3.7: success
nox > * unit-3.8: success
nox > * unit-3.9: success
nox > * unit-3.10: success
nox > * system-2.7: success
nox > * system-3.8: success
nox > * cover: success
nox > * lint: success
nox > * lint_setup_py: success
nox > * blacken: success
nox > * docs: success

@tswast tswast merged commit 56a8676 into main Mar 14, 2022
@tswast tswast deleted the oob-deprecation branch March 14, 2022 15:59
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.

1 participant