diff --git a/doc/source/reference/drivers/gerrit.rst b/doc/source/reference/drivers/gerrit.rst index 61b45877e9..cc924eb4d6 100644 --- a/doc/source/reference/drivers/gerrit.rst +++ b/doc/source/reference/drivers/gerrit.rst @@ -103,18 +103,19 @@ The supported options in ``zuul.conf`` connections are: section of the ``Settings`` page in Gerrit. .. attr:: auth_type - :default: digest + :default: basic The HTTP authentication mechanism. - .. value:: digest - - HTTP Digest authentication; the default for most Gerrit - installations. - .. value:: basic - HTTP Basic authentication. + HTTP Basic authentication; the default for most Gerrit + installations. + + .. value:: digest + + HTTP Digest authentication; only used in versions of Gerrit + prior to 2.15. .. value:: form diff --git a/releasenotes/notes/gerrit-default-auth-c6165622bffc6434.yaml b/releasenotes/notes/gerrit-default-auth-c6165622bffc6434.yaml new file mode 100644 index 0000000000..19a358989a --- /dev/null +++ b/releasenotes/notes/gerrit-default-auth-c6165622bffc6434.yaml @@ -0,0 +1,8 @@ +upgrade: + - | + The default for :attr:`.auth_type` has changed from + ``digest`` to ``basic``. Digest authentication has not been supported + in Gerrit since version 2.15. + + If your Zuul connects to an older version of Gerrit via HTTP + authentication, you may now need to explicitly set this value. diff --git a/zuul/driver/gerrit/gerritconnection.py b/zuul/driver/gerrit/gerritconnection.py index 8b9299db46..7dea617ea8 100644 --- a/zuul/driver/gerrit/gerritconnection.py +++ b/zuul/driver/gerrit/gerritconnection.py @@ -483,12 +483,12 @@ class GerritConnection(BaseConnection): zuul_version.release_string, requests.utils.default_user_agent()) self.session = requests.Session() - if self.auth_type == 'basic': - authclass = requests.auth.HTTPBasicAuth + if self.auth_type == 'digest': + authclass = requests.auth.HTTPDigestAuth elif self.auth_type == 'form': authclass = FormAuth else: - authclass = requests.auth.HTTPDigestAuth + authclass = requests.auth.HTTPBasicAuth self.auth = authclass( self.user, self.password)