Labs deployment + Cognito Auth updates#181
Merged
Merged
Conversation
…ith user-specified context.
…exceptio if unable to change user home dir permissions. Clean updates to cognito.py. xsrf endpoint to add xsrf token on cookies for BeakerHub to use before we hit beaker-kernel endpoints.
…d home dir (on auth/__init__.py).
ccjoel
commented
Nov 24, 2025
| if result and not isinstance(result, BeakerUser): | ||
| # Convert standard User to BeakerUser | ||
| logging.debug(f"Converting {type(result).__name__} to BeakerUser") | ||
| result = BeakerUser( |
Contributor
Author
There was a problem hiding this comment.
@mattprintz this is what I mentioned on today's sync re: having issues with the user "not being a BeakerUser" when using the default Notebook Identity Provider. Without this I wasn't able to run with the base provider.
ccjoel
commented
Nov 24, 2025
| shutil.chown(virtual_home_dir, user=subkernel_user, group=subkernel_user) | ||
| # Try to change ownership if running as root/privileged user | ||
| try: | ||
| shutil.chown(virtual_home_dir, user=subkernel_user, group=subkernel_user) |
Contributor
Author
There was a problem hiding this comment.
Had to add try/catch so this would work with default identity provider (nor cognito), else it would crash. I can't recall if this was needed for using with the CognitoAppManagedIdentityHeadersProvider as well
ccjoel
commented
Nov 24, 2025
| """ | ||
|
|
||
| @web.authenticated | ||
| async def get(self): |
Contributor
Author
There was a problem hiding this comment.
For the BeakerHub UI (Dashboard, etc) to use the token in its cookies. Fetched once by UI as long as the cookie is valid and still on Headers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.