jupyterhub / jupyterhub/nativeauthenticator

Users created from the admin panel control hub are unusable due to lack of password when using NativeAuthenticator

Open
#202 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
81
Forks
68
PR merge metrics
No merged PRs in 30d

Description

### Bug description

I hope this is a real bug and not me missing something obvious. I was having a separate problem with TLJH where user signups weren't showing up in the control panel, and I thought I would circumvent this by making the users myself. However, when adding users, there is no option to set a password, and any attempt to login as one of those users will come up with `Invalid username`. This is using the NativeAuthenticator, I believe.

#### Expected behaviour
The user should either have no password, define their password at first login, or have their password defined when they are created.

#### Actual behaviour
The user cannot access JupyterHub due to lack of a password.

### How to reproduce

Create a new user using "Add Users" in the admin tab of the Control Panel. The user will not be able to log in.

### Your personal set up

tljh on Ubuntu 18.04
- OS:

- Version(s):

- Full environment

```
# paste output of `pip freeze` or `conda list` here
WARNING: Ignoring invalid distribution -uggingface-hub (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -rllib3 (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -orch (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -lick (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -klearn (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ix (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -eqeval (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -ensorflow-estimator (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -cikit-learn (/opt/tljh/user/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -andas (/opt/tljh/user/lib/python3.7/site-packages)
absl-py==0.13.0
alembic==1.6.5
anyio==3.2.1
anytree==2.8.0
appdirs==1.4.4
argon2-cffi==20.1.0
asn1crypto==0.24.0
astunparse==1.6.3
async-generator==1.10
attrs==21.2.0
Babel==2.9.1
backcall==0.2.0
backports.csv==1.0.7
backports.entry-points-selectable==1.1.0
bcrypt==3.2.0
beautifulsoup4==4.9.3
bert-serving-client==1.10.0
bert-serving-server==1.10.0
black==21.7b0
bleach==3.3.1
blis==0.4.1
boto3==1.18.59
botocore==1.21.59
bs4==0.0.1
cached-property==1.5.2
cachetools==4.2.2
catalogue==2.0.5
cchardet==2.1.7
certifi==2021.10.8
certipy==0.1.3
cffi==1.12.3
cfgv==3.3.1
chardet==3.0.4
checklist==0.0.11
cheroot==8.5.2
CherryPy==18.6.1
click==7.1.2
colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1602866480661/work
conda==4.8.1
conda-package-handling==1.3.11
coreferee==1.0.1
coverage==5.5
cryptography==2.7
cycler==0.10.0
cymem==2.0.5
datasets==1.7.0
debugpy==1.3.0
decorator==5.0.9
defusedxml==0.7.1
dill==0.3.4
distlib==0.3.2
docopt==0.6.2
docx==0.2.4
en-core-web-sm==3.0.0
entrypoints==0.3
et-xmlfile==1.1.0
fastprogress==1.0.0
fasttext==0.9.2
feedparser==6.0.8
filelock==3.0.12
Flask==2.0.2
Flask-Cors==3.0.10
flask-swagger-ui==3.36.0
flatbuffers==1.12
fsspec==2021.7.0
future==0.18.2
fuzzywuzzy==0.18.0
gast==0.4.0
google-auth==1.34.0
google-auth-oauthlib==0.4.5
google-pasta==0.2.0
GPUtil==1.4.0
greenlet==1.1.0
grpcio==1.34.1
h5py==2.10.0
huggingface-hub==0.0.8
identify==2.2.13
idna==2.8
importlib-metadata==3.10.1
iniconfig==1.1.1
ipykernel==6.0.3
ipython==7.25.0
ipython-genutils==0.2.0
ipywidgets==7.6.3
iso-639==0.4.5
itsdangerous==2.0.1
jaraco.classes==3.2.1
jaraco.collections==3.3.0
jaraco.functools==3.3.0
jaraco.text==3.5.1
jedi==0.18.0
jieba==0.42.1
Jinja2==3.0.0
jmespath==0.10.0
joblib==1.0.1
johnnydep==1.11
json5==0.9.6
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.2.0
jupyter-console==6.4.0
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core==4.7.1
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyter-resource-usage==0.5.1
jupyter-server==1.9.0
jupyter-telemetry==0.1.0
jupyterhub==1.4.0
jupyterhub-nativeauthenticator==0.0.7
jupyterlab==3.0.16
jupyterlab-code-formatter==1.4.10
jupyterlab-pygments==0.1.2
jupyterlab-server==2.6.1
jupyterlab-widgets==1.0.0
keras==2.6.0
keras-bert==0.88.0
keras-embed-sim==0.9.0
keras-layer-normalization==0.15.0
keras-multi-head==0.28.0
keras-nightly==2.5.0.dev2021032900
keras-pos-embd==0.12.0
keras-position-wise-feed-forward==0.7.0
Keras-Preprocessing==1.1.2
keras-self-attention==0.50.0
keras-transformer==0.39.0
kiwisolver==1.3.1
ktrain==0.28.3
langdetect==1.0.9
langid==1.1.6
lemminflect==0.2.2
libarchive-c==2.8
lxml==4.6.3
Mako==1.1.4
Markdown==3.3.4
MarkupSafe==2.0.1
matplotlib==3.4.3
matplotlib-inline==0.1.2
mistune==0.8.4
more-itertools==8.8.0
multiprocess==0.70.12.2
munch==2.5.0
murmurhash==1.0.5
mypy-extensions==0.4.3
nbclassic==0.3.1
nbclient==0.5.3
nbconvert==6.1.0
nbformat==5.1.3
nbgitpuller==0.9.0
nest-asyncio==1.5.1
networkx==2.6.2
nlpaug==1.1.8
nltk==3.2.5
nodeenv==1.6.0
notebook==6.3.0
nteract-on-jupyter==2.1.3
num2words==0.5.10
numpy==1.21.2
oauthlib==3.1.1
onetimepass==1.0.1
openpyxl==3.0.7
opt-einsum==3.3.0
oyaml==1.0
packaging==21.0
pamela==1.0.0
pandas==1.3.4
pandocfilters==1.4.3
parso==0.8.2
pathspec==0.9.0
pathy==0.6.0
patsy==0.5.2
pattern3==3.0.0
patternfork-nosql==3.6
pdfminer.six==20201018
pdfminer3k==1.3.4
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.3.1
pkginfo==1.8.2
plac==1.1.3
platformdirs==2.2.0
pluggy==0.13.1
ply==3.11
portalocker==2.0.0
portend==2.7.1
pre-commit==2.14.0
preshed==3.0.5
prometheus-client==0.11.0
prompt-toolkit==3.0.19
protobuf==3.17.3
psutil==5.8.0
ptyprocess==0.7.0
py==1.10.0
pyarrow==3.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pybind11==2.8.1
pycosat==0.6.3
pycparser==2.19
pydantic==1.7.4
pydot==1.4.2
pyemd==0.5.1
Pygments==2.9.0
PyMuPDF==1.16.14
PyMySQL==1.0.2
pyOpenSSL==19.0.0
pyparsing==2.4.7
PyPDF2==1.26.0
pypyodbc==1.3.6
pyrsistent==0.18.0
PySocks==1.7.0
pytest==6.2.4
pytest-cov==2.12.1
python-dateutil==2.8.2
python-docx==0.8.11
python-editor==1.0.4
python-json-logger==2.0.1
python-Levenshtein==0.12.2
pytorch-nlp==0.5.0
pytorch-pretrained-bert==0.6.2
pytz==2021.1
PyYAML==5.4.1
pyzmq==22.1.0
qtconsole==5.1.1
QtPy==1.10.0
regex==2021.7.6
requests==2.22.0
requests-oauthlib==1.3.0
requests-unixsocket==0.2.0
rsa==4.7.2
ruamel.yaml.clib==0.2.6
ruamel_yaml==0.15.46
s3transfer==0.5.0
sacrebleu==1.5.1
sacremoses==0.0.45
scikit-learn==0.23.2
scipy==1.7.1
seaborn==0.11.2
Send2Trash==1.8.0
sentence-transformers==2.1.0
sentencepiece==0.1.96
seqeval==0.0.19
sgmllib3k==1.0.0
simplejson==3.17.3
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
smart-open==5.2.0
sniffio==1.2.0
sortedcontainers==2.4.0
soupsieve==2.2.1
spacy==3.0.0
spacy-legacy==3.0.8
SQLAlchemy==1.4.21
srsly==2.4.1
statsmodels==0.13.1
stopwords==1.0.0
structlog==21.5.0
sudo==1.0.0
syntok==1.3.1
tabulate==0.8.9
tempora==4.1.1
tensorboard==2.5.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.5.0
tensorflow-estimator==2.0.1
tensorflow-hub==0.12.0
tensorflow-text==2.5.0
termcolor==1.1.0
termcolors==0.1.0
terminado==0.10.1
testpath==0.5.0
textblob==0.15.3
thinc==8.0.8
threadpoolctl==2.2.0
tokenizers==0.10.3
toml==0.10.2
tomli==1.1.0
torch==1.10.1
torchvision==0.11.2
tornado==6.1
tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1632160078689/work
traitlets==5.0.5
transformers==4.6.1
typed-ast==1.4.3
typer==0.3.2
typing-extensions==3.7.4.3
urllib3==1.25.11
utils==1.0.1
virtualenv==20.7.2
wasabi==0.8.2
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.1.0
Werkzeug==2.0.1
Whoosh==2.7.4
widgetsnbextension==3.5.1
wikipedia==1.4.0
wimpy==0.6
word2number==1.1
wordcloud==1.8.1
wrapt==1.12.1
xlrd==2.0.1
XlsxWriter==3.0.1
xlwt==1.3.0
xxhash==2.0.2
zc.lockfile==2.0
zipp==3.5.0
```

- Configuration

```python
# jupyterhub_config.py
```

- Logs

```
# paste relevant logs here, if any
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the problem through the Control Panel's "Add Users" flow with NativeAuthenticator enabled, then inspect the user-creation and login behavior. Done means users created from the admin panel can authenticate, with the password behavior clarified and covered for the chosen expected flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.