-
Notifications
You must be signed in to change notification settings - Fork 4
Labs deployment + Cognito Auth updates #181
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
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).
| if result and not isinstance(result, BeakerUser): | ||
| # Convert standard User to BeakerUser | ||
| logging.debug(f"Converting {type(result).__name__} to BeakerUser") | ||
| result = BeakerUser( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
| 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| """ | ||
|
|
||
| @web.authenticated | ||
| async def get(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
mattprintz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.