Skip to content
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

DOCS: Document logging out of CILogon #974

Merged
merged 12 commits into from
Feb 9, 2022

Conversation

GeorgianaElena
Copy link
Member

Does @2i2c-org/tech-team agree that adding this note to the docs is acceptable for fixing #957?

Note this comment in the original issue that gives more details about it.

@sgibson91
Copy link
Member

Can we maybe rephrase this along the lines of "If a user mistakenly provides an incorrect email when logging in, they will need to... before doing...". Or maybe "If a user wishes to change which email address they login with,...". I'm having trouble keeping track between the "first" and "second" attempts.

@GeorgianaElena
Copy link
Member Author

GeorgianaElena commented Feb 3, 2022

Can we maybe rephrase this along the lines of "If a user mistakenly provides an incorrect email when logging in, they will need to... before doing...". Or maybe "If a user wishes to change which email address they login with,...". I'm having trouble keeping track between the "first" and "second" attempts.

Sure! There's a bit of a mess in my head right now 🤯

Two thoughts:

  1. I'm a bit reserved using email address to refer to the user account.

So, with CILogon, the login process looks like this:

Hub login page ➡️ Auth0 Login screen presenting the CILogon option ➡️ CILogon IDP selection page ➡️ IDP login page ➡️ hub access

If on the screen in bold (IDP login page), the same identity provider is used, let's say Google, then a logout must happen before using another email account. But if one chooses the berkeley Identity Provider, then they will be able to login with their berkeley email address without logging out.

  1. If this phrase If a user mistakenly provides an incorrect email when logging in means that the incorrect email resolved to a 403 error then this is what happens Should a 403 on login clear oauth state? #973 and a CILogon logout won't solve things.

Hope I didn't create more confusion 😓

@sgibson91
Copy link
Member

sgibson91 commented Feb 3, 2022

  1. I'm a bit reserved using email address to refer to the user account.

Ok, let's definitely say something general like "account information"

If this phrase If a user mistakenly provides an incorrect email when logging in means that the incorrect email resolved to a 403 error then this is what happens #973 and a CILogon logout won't solve things.

Ah, so do we have to do something in the hub at this point? (I will check the issue in case you've answered it there) Most likely wait til the cookie expires or scrub the cookie ourselves from within the hub

Copy link
Member

@sgibson91 sgibson91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this, I feel it's much easier to follow. Thank you! 🙌🏻

@GeorgianaElena
Copy link
Member Author

GeorgianaElena commented Feb 3, 2022

Thanks @sgibson91! I tried to rephrase the note a bit. LTMK if I managed to be more clear and shorter than in the novel above 😅

@GeorgianaElena
Copy link
Member Author

You already answered ❤️ Thank you!!!!

@GeorgianaElena GeorgianaElena requested a review from a team February 3, 2022 13:42
@choldgraf
Copy link
Member

So just to make sure I understand, there are two "things to log out of":

If a user logs into the hub with CILogon, but they use the wrong institutional address. Then they'll need to log out of two things:

  • First, log out of JupyterHub so that they don't keep hitting 403 errors. To do this, go to https://{hub-name}/hub/logout
  • Second, log out of CILogon so that they're asked to select a new institution. To do this, go to https://cilogon.org/logout

When that is done, they will be able to "start fresh" and choose a new CILogon provider and/or account name.

Is that right? If so, I think we should also document this in our user docs as well, since I suspect this will happen to people.

@damianavila
Copy link
Contributor

Is that right? If so, I think we should also document this in our user docs as well, since I suspect this will happen to people.

I agree with this thought.

@GeorgianaElena
Copy link
Member Author

If a user logs into the hub with CILogon, but they use the wrong institutional address. Then they'll need to log out of two things:
First, log out of JupyterHub so that they don't keep hitting 403 errors. To do this, go to https://{hub-name}/hub/logout

Yep. Checkout 2i2c-org/default-hub-homepage#8 for a possible "documentation" of this step

Second, log out of CILogon so that they're asked to select a new institution. To do this, go to https://cilogon.org/logout

Almost. So, they're asked to select an institution regardless of they go to https://cilogon.org/logout. But if they want to use the same institution, but just another address, then in order to be asked which institutional address to use, they will need to go to https://cilogon.org/logout.

Is that right? If so, I think we should also document this in our user docs as well, since I suspect this will happen to people.

What do you think if we go with the button in 2i2c-org/default-hub-homepage#8 for the first one and the note in this PR for the second one? Do you think we need to add more details in other places of the docs?

@choldgraf
Copy link
Member

I took a pass at the language to try and clarify things a little bit in these docs - however I think we will need to iterate a little bit because the instructions didn't quite work for me, so I likely got something wrong :-)

Could you take a look at my latest commit and let me know what I messed up? I think that your strategy sounds good to me as long as we can document the full "how to log out" process here as a start. In the future if the button isn't enough and people are still confused, we can make an addition to the user docs

Copy link
Member Author

@GeorgianaElena GeorgianaElena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying the docs @choldgraf. I left a couple of comments with my thoughts, but also added a commit to modify things a bit again. Sorry for not providing suggestions directly, but I wanted to add images too to make things more clear. LTMK what you think and if they work


There are two details for CILogon accounts worth mentioning:

- **Institutional connection**. This is the direct connection with CILogon, negotiated by each institution. When a user logs in via CILogon, they first may choose from a variety of institutions (e.g. `UC Berkeley` or `Australia National University`). There is also a fall-back for "Google OAuth".
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen CILogon docs referencing these as IdentityProviders, so I suggest we use the same language as they do, so that if someone checks out the CILogon docs directly it's clear we're talking about the same thing. What do you think>

Comment on lines 245 to 248
**To switch user accounts**, a user can go to the URL endpoing `https://{hub-name}/hub/logout`.
The next time they go to the hub's landing page, they'll be asked to re-authenticate.

**To switch CILogon institutions**, a user must go to the [CILogon logout page](https://cilogon.org/logout) and click the button to log out of their institutional account. When they try to log back in they should be directed to a page to select institutions once again.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe these are actually the other way around. In practice I've havn't seen switching institution require logging out of CILogon.

@GeorgianaElena GeorgianaElena changed the title Add note about logging out of CILogon Document logging out of CILogon Feb 7, 2022
@GeorgianaElena GeorgianaElena added 🏷️ authentication Enhancement An improvement to something or creating something new. labels Feb 7, 2022
@choldgraf
Copy link
Member

Ah thanks for those updates @GeorgianaElena - I think they are good! I pushed a commit with some minor cleanups and clarifications as well. What do you think?

However, following the instructions didn't quite work for me. Here are the steps I followed and what happened. Can you help me debug?

  1. Logged-in to demo.pilot.2i2c.cloud with Berkeley credentials
  2. 403 page
  3. Tap button to log out
  4. Take me back to Auth0 login page
  5. Choose CILogon
  6. Straight to Berkeley log-in, cannot choose Identity Provider
  7. Tried going to https://cilogon.org/logout/ and logging out
  8. Same thing happened again

I would have expected that step 4 would have then asked me to choose an identity provider, but this didn't happen. Can you clarify?

@GeorgianaElena
Copy link
Member Author

  1. Straight to Berkeley log-in, cannot choose Identity Provider

I was able to reproduce your workflow if I check the remember box. Did you checked the remember box here?
remeber

If so, then probably you need to clear the cookies. It doesn't have to do with the logout process, but it's probably worth mentioning in the docs here.

! I pushed a commit with some minor cleanups and clarifications as well. What do you think?

I don't see any new commit from you @choldgraf 👀 Maybe you forgot to push it?
https://github.com/2i2c-org/infrastructure/pull/974/commits

@GeorgianaElena
Copy link
Member Author

I clarified the docs a bit more and mentioned this scenario when clearing the cookies is required

@choldgraf
Copy link
Member

@GeorgianaElena the cookie fix worked! Thanks for clarifying, and sorry that I forgot to push my commit before! I've just pushed another commit to clean up the language a bit. I added sphinx-copybutton while I was at it :-)


When a user logs in via CILogon, they are first presented with a list of various institutions and organization that they may choose from (e.g. `UC Berkeley` or `Australia National University`).
Identity Provider
: The authentication service available through the CILogon connection.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had no idea about this syntax, but super cool 👍

@GeorgianaElena
Copy link
Member Author

Thanks @choldgraf 🎉

Copy link
Member

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me now!

@choldgraf
Copy link
Member

OK I am merging this one in! I think these are nice changes and we can continue updating them as we use CILogon more and learn!

@choldgraf choldgraf changed the title Document logging out of CILogon DOCS: Document logging out of CILogon Feb 9, 2022
@choldgraf choldgraf merged commit 994ce06 into 2i2c-org:master Feb 9, 2022
@GeorgianaElena GeorgianaElena deleted the cilogon-logout-note branch February 11, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An improvement to something or creating something new.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants