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

Remove support for credentials #220

Merged
merged 5 commits into from
Jan 24, 2023
Merged

Conversation

navytux
Copy link
Contributor

@navytux navytux commented Jan 8, 2023


kirr:

for discussion

originally support for credentials was added in https://github.com/zopefoundation/ZEO/commit/dbb066d2
(https://github.com/zopefoundation/ZEO/pull/53)

Extracted from #195

--------
kirr:

	for discussion

	originally support for credentials was added in dbb066d2
	(#53)

Extracted from #195
@navytux navytux changed the title Remove support for credentials [for discussion] Remove support for credentials Jan 8, 2023
@navytux
Copy link
Contributor Author

navytux commented Jan 8, 2023

See "d) removal of credentials support" in #195 (comment) .

@dataflake
Copy link
Member

The comments on #53 clearly says that the support was experimental and it talks about future clients. That future never arrived. It makes sense to remove that experiment.

@navytux
Copy link
Contributor Author

navytux commented Jan 10, 2023

Jens, thanks for feedback. I will try to look into this once again properly, and especially with keeping new way of SSL authentication that ZEO5 started to use, after we hopefully settle with #217.

Base automatically changed from knext+kpy3 to master January 23, 2023 10:52
dataflake and others added 3 commits January 23, 2023 12:06
1. Adjust text in changes. It is only support for `credentials` object
   that we drop here, not username nor password. For the reference from
   aa08949 (ClientStorage: Fix thinko in documentation for
   credentials/username/password/realm):

        d4805a0 (*: Documentation, Cosmetics) documented all credentials and
        username/password/realm as "credentials" and that it is ZEO4-only. It is
        not correct however:

        - username/password/realm are indeed related to basic authentication
          which, in ZEO5, has been _already_ superseded by SSL. Already because
          those parameters, besides the following assert

        	assert not username or password or realm

          are otherwise ignored by ClientStorage constructor.

        - credentials however is ZEO5-only thing added in 2016 by Jim in commit
          dbb066d (Added the ability to pass credentials when creating
          client storages) with the following commit message:

            Added the ability to pass credentials when creating client storages.

            This is experimental in that passing credentials will cause
            connections to an ordinary ZEO server to fail, but it facilitates
            experimentation with custom ZEO servers. Doing this with custom ZEO
            clients would have been awkward due to the many levels of
            composition involved.

            In the future, we expect to support server security plugins that
            consume credentials for authentication (typically over SSL).

            Note that credentials are opaque to ZEO. They can be any object with
            a true value.  The client mearly passes them to the server, which
            will someday pass them to a plugin.

          To my knowledge there is no use of such "credentials" feature, and
          regular ZEO server will just fail in register if any credentials
          object is passed. Still this feature is separate from ZEO4 basic
          authentication support.

2. Reenable test that verifies that `credentials` argument is ignored.
@navytux navytux requested review from dataflake and d-maurer January 23, 2023 14:34
@navytux
Copy link
Contributor Author

navytux commented Jan 23, 2023

Jens, Dieter, I looked at this PR again after rereading documentation wrt SSL. I've made corrections in c7f2138 and b3318e8.

After those corrections I believe hereby change should be ok to go.

Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

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

👍

@navytux navytux changed the title [for discussion] Remove support for credentials Remove support for credentials Jan 23, 2023
Copy link
Contributor

@d-maurer d-maurer left a comment

Choose a reason for hiding this comment

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

You might also want to remove AuthError from ZEO.Exceptions (it appears to no longer be used).

Starting from 2016 ZEO5 server never returns AuthError because support
for user/password/realm authentication was dropped in favour of SSL.

So nowdays this exception class appears to be unused: if client will use
wrong SSL certificates, connecting to server will be rejected by SSL layer.

Suggested by @d-maurer at
#220 (review)

See also c7f2138 for details.
@navytux
Copy link
Contributor Author

navytux commented Jan 24, 2023

Thanks, Dieter. I did so in 12af50c.

@navytux
Copy link
Contributor Author

navytux commented Jan 24, 2023

All good with tests -> merging.

@navytux navytux merged commit c9d877d into master Jan 24, 2023
@navytux navytux deleted the knext+kpy3+remove_credentials branch January 24, 2023 08:25
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.

3 participants