Skip to content
New issue

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

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

Already on GitHub? # to your account

Preserve case for usernames in MWOAuthenticator #168

Closed
chicocvenancio opened this issue Feb 23, 2018 · 4 comments
Closed

Preserve case for usernames in MWOAuthenticator #168

chicocvenancio opened this issue Feb 23, 2018 · 4 comments

Comments

@chicocvenancio
Copy link
Contributor

chicocvenancio commented Feb 23, 2018

MediaWiki allows for multiple users with different cases (except for the first letter, Chicocvenancio and chicocvenancio are the same users, but chicocVenancio is a different one).

Should we not preserve the user case from MediaWiki? Maybe we can define normalize_username without lowercasing the username?

See https://phabricator.wikimedia.org/T180336

@willingc
Copy link
Contributor

@chicocvenancio Which version of JupyterHub and OAuthenticator are you using?

This had been addressed in the past for GitHub authentication: #52 Let's first rule out if a version is out of date.

@chicocvenancio
Copy link
Contributor Author

We're using the 0.6 zero-to-jupyterhub-k8s ( yuvipanda/paws@4d5eeb1 ).
That works out to be 0.8.1 for jupyterhub and 0.7.2 for oauthenticator.
I'm pretty sure since neither OAuthenticator nor MWOAuthenticator reimplement normalize_username the normalization from auth.py#L189 will stand.

root@hub-864dc78ff-sc8q8:/srv/jupyterhub# pip3 freeze
jupyterhub==0.8.1
oauthenticator==0.7.2

@willingc
Copy link
Contributor

Looking at the mediawiki authenticator, I think (not certain) that mediawiki.py may need a mixin like https://github.com/jupyterhub/oauthenticator/blob/master/oauthenticator/github.py#L49 and then have the MWLoginHandler subclass from OAuthLoginHandler.

cc/ @minrk

@minrk
Copy link
Member

minrk commented Feb 28, 2018

Defining a custom normalize_username for MW that does something different (e.g. nothing) should work for this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants