-
Notifications
You must be signed in to change notification settings - Fork 310
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
Add documentation around oauth2client deprecation #165
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
:orphan: | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
|
||
oauth2client deprecation | ||
======================== | ||
|
||
This page is intended for existing users of the `oauth2client`_ who want to | ||
understand the reasons for its deprecation and how this library relates to | ||
``oauth2client``. | ||
|
||
.. _oauth2client: https://github.com/google/oauth2client | ||
|
||
Reasons for deprecation | ||
----------------------- | ||
|
||
#. Lack of ownership: ``oauth2client`` has lacked a definitive owner since | ||
around 2013. | ||
#. Fragile and ad-hoc design: ``oauth2client`` is the result of several years | ||
of ad-hoc additions and organic, uncontrolled growth. This has led to a | ||
library that lacks overall design and cohesion. The convoluted class | ||
hierarchy is a symptom of this. | ||
#. Lack of a secure, thread-safe, and modern transport: ``oauth2client`` is | ||
inextricably dependent on `httplib2`_. ``httplib2`` is largely unmaintained | ||
(although recently there are a small group of volunteers attempting to | ||
maintain it). | ||
#. Lack of clear purpose and goals: The library is named "oauth2client" but is | ||
actually a pretty poor OAuth 2.0 client and does a lot of things that have | ||
nothing to do with OAuth and its related RFCs. | ||
|
||
.. _httplib2: https://github.com/httplib2/httplib2 | ||
|
||
We originally planned to address these issues within ``oauth2client``, however, | ||
we determined that the number of breaking changes needed would be absolutely | ||
untenable for downstream users. It would essentially involve our users having | ||
to rewrite significant portions of their code if they needed to upgrade (either | ||
directly or indirectly through a dependency). Instead, we've chosen to create a | ||
new replacement library that can live side-by-side with ``oauth2client`` and | ||
allow users to migrate gradually. We believe that this was the least painful | ||
option. | ||
|
||
Replacement | ||
----------- | ||
|
||
The long-term replacement for ``oauth2client`` is this library, | ||
``google-auth``. This library addresses the major issues with oauthclient: | ||
|
||
#. Clear ownership: google-auth is owned by the teams that maintain the | ||
`Cloud Client Libraries`_, `gRPC`_, and the | ||
`Code Samples for Google Cloud Platform`_. | ||
#. Thought-out design: using the lessons learned from ``oauth2client``, we have | ||
designed a better module and class hierarchy. The ``v1.0.0`` release of this | ||
library should provide long-term API stability. | ||
#. Modern, secure, and extensible transports: ``google-auth`` supports | ||
`urllib3`_, `requests`_, `gRPC`_, and has `legacy support for httplib2`_ to | ||
help clients migration. It is transport agnostic and has explicit support | ||
for adding new transports. | ||
#. Clear purpose and goals: ``google-auth`` is explicitly focused on | ||
Google-specific authentication, especially the server-to-server (service | ||
account) use case. | ||
|
||
Because we reduced the scope of the library, there are several features in | ||
``oauth2client`` we intentionally are not supporting in the ``v1.0.0`` release | ||
of ``google-auth``. This does not mean we are not interested in supporting | ||
these features, we just didn't feel they should be part of the initial API. | ||
As downstream users ask for these features we will determine the best way to | ||
serve those use cases without allowing the library to become a dumping ground. | ||
|
||
The unsupported features are: | ||
|
||
#. Support for obtaining user credentials. While this library has support for | ||
using user credentials, there are no provisions in the core library for | ||
doing the three-party OAuth 2.0 flow to obtain authorization from a user. | ||
Instead, we are opting to provide a separate package that does integration | ||
with `oauthlib`_, `google-auth-oauthlib`_. When that library has a stable | ||
API, we will consider its inclusion into the core library. | ||
#. Support for storing credentials. The only credentials type that needs to | ||
be stored are user credentials. We have a `discussion thread`_ on what level | ||
of support we should do. It's very likely we'll choose to provide an | ||
abstract interface for this and leave it up to application to provide | ||
storage implementation specific to their use case. It's also very likely | ||
that we will also incubate this functionality in the | ||
`google-auth-oauthlib`_ library before including it in the core library. | ||
|
||
.. _Cloud Client Libraries: https://github.com/googlecloudplatform/google-cloud-python | ||
.. _gRPC: http://www.grpc.io/ | ||
.. _Code Samples for Google Cloud Platform: https://github.com/googlecloudplatform/python-docs-samples | ||
.. _urllib3: https://urllib3.readthedocs.io | ||
.. _requests: http://python-requests.org | ||
.. _legacy support for httplib2: https://pypi.python.org/pypi/google-auth-httplib2 | ||
.. _oauthlib: https://oauthlib.readthedocs.io | ||
.. _google-auth-oauthlib: http://google-auth-oauthlib.readthedocs.io/ | ||
.. _discussion thread: https://github.com/GoogleCloudPlatform/google-auth-library-python/issues/33 | ||
|
||
|
||
Post-deprecation support | ||
------------------------ | ||
|
||
While ``oauth2client`` will not be implementing or accepting any new features, | ||
the ``google-auth`` team will continue to accept bug reports and fix critical | ||
bugs. We will make patch releases as necessary. We have no plans to remove the | ||
library from GitHub or PyPI. Also, we have made sure that the | ||
`google-api-python-client`_ library supports oauth2client and google-auth and | ||
will continue to do so indefinitely. | ||
|
||
It is important to note that we will not be adding any features, even if an | ||
external user goes through the trouble of sending a pull request. This policy | ||
is in place because without it we will perpetuate the circumstances that led | ||
to ``oauth2client`` being in the semi-unmaintained state it was in previously. | ||
|
||
Some old documentation and examples may use ``oauth2client`` instead of | ||
``google-auth``. We are working to update all of these but it does take a | ||
significant amount of time. Since we are still iterating on user auth, some | ||
samples that use user auth will not be updated until we have settled on a final | ||
interface. If you find any samples you feel should be updated, please | ||
`file a bug`_. | ||
|
||
.. _google-api-python-client: https://github.com/google/google-api-python-client | ||
.. _file a bug: https://github.com/GoogleCloudPlatform/google-auth-library-python/issues |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.