Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Temporarily patch the logging of user information to avoid publishing…
Browse files Browse the repository at this point in the history
… the user tokens

This has been merged upstream but not released yet.
  • Loading branch information
diocas authored and etejedor committed Oct 24, 2023
1 parent 08de9f6 commit 4c408a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,10 @@ ADD configure_kernels_and_terminal.py /srv/singleuser/configure_kernels_and_term
ADD executables/start_ipykernel.py /usr/local/bin/start_ipykernel.py
RUN chmod 705 /usr/local/bin/start_ipykernel.py

# TEMPORARY: apply a patch to the auth file while we wait for the release of a new version with it
ADD log_patch.diff /tmp/log_patch.diff
RUN patch /usr/local/lib/python3.9/site-packages/jupyterhub/services/auth.py /tmp/log_patch.diff && \
rm -f /tmp/log_patch.diff

WORKDIR /root
CMD ["sh", "/srv/singleuser/systemuser.sh"]
11 changes: 11 additions & 0 deletions log_patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- ./jupyterhub/services/auth.py 2023-08-17 12:28:41.000000000 +0200
+++ ./jupyterhub/services/auth.py 2023-10-11 12:20:20.597042884 +0200
@@ -1229,6 +1229,7 @@
)
if user_model is None:
raise HTTPError(500, "oauth callback failed to identify a user")
- app_log.info("Logged-in user %s", user_model)
+ app_log.info("Logged-in user %s", user_model['name'])
+ app_log.debug("User model %s", user_model)
self.hub_auth.set_cookie(self, token)
self.redirect(next_url or self.hub_auth.base_url)

0 comments on commit 4c408a7

Please sign in to comment.