-
Notifications
You must be signed in to change notification settings - Fork 362
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
feat: auto-redirect to SSO provider when expired remote session detected (DET-10392) #9613
feat: auto-redirect to SSO provider when expired remote session detected (DET-10392) #9613
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9613 +/- ##
==========================================
- Coverage 53.34% 53.32% -0.03%
==========================================
Files 1255 1255
Lines 152702 152789 +87
Branches 3250 3253 +3
==========================================
+ Hits 81455 81469 +14
- Misses 71095 71168 +73
Partials 152 152
Flags with carried forward coverage won't be shown. Click here to find out more.
|
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
If the user doesn't have an expired session token will they see the login page still? If so, could a user create a fake session token to ensure they don't see the login page at all? |
@BOsterbuhr |
If they don't have a token at all (first time logging in) how can they avoid hitting the login page? We need a way to avoid the login page completely in all instances. |
@BOsterbuhr |
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.
\o/
@corban-beaird |
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.
Some nits, but this LGTM.
Is this being worked into the PR? This is critical. Also, sorry if I missed the explanation: if the user has an Okta token that hasn't yet been "seen" by MLDE, will the user be re-directed to the requested page? |
@dougdet Yep, I pushing up a PR to add in the ability to always redirect to the designated SSO provider; with the exception of cases where users perform a hard logout (i.e. clicking the logout button). |
Great! "i.e. clicking the logout button". Is there no way around this? The user may logout that way and may still be auth'd in Okta (have its token). If no way around, we'll just have to make this very clear to the customer that if a user does this they'll bump into the Login page. I'll bet they'll ask to hide the Logout button if the |
@dougdet If we aren't sending folks to the the determined login page & they still have an active session with Okta that we don't manage, they'll immediately get logged back into determined after hitting sign out. Is there ever a case where a user would ever want to log in under a different account? |
|
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.
Helm values LGTM
d148f69
to
24bcd07
Compare
…e attempted to be accessed without auth
8dba3ec
to
ac1e249
Compare
Co-authored-by: Tara <[email protected]>
Co-authored-by: Tara <[email protected]>
Co-authored-by: Tara <[email protected]>
Co-authored-by: Tara <[email protected]>
@@ -22,6 +22,9 @@ message SSOProvider { | |||
string sso_url = 2; | |||
// The type of SSO (such as SAML, OIDC). | |||
string type = 3; | |||
// The flag to indicates if this provider should be always be redirected to, |
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.
super nit picky: I think there's a typo here The flag to indicates
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.
All good this is a solid catch! Thanks!
… eventually be done in the future to ensure we can test both enviroment but is out of scope for this PR
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.
LGTM
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.
codeowners says i should only need to review changes in these directories, but i don't see any changes there. approved
/webui/react/src/e2e @determined-ai/test
/webui/react/playwright.config.ts @determined-ai/test
47fef7e
to
85232b9
Compare
Ticket
DET-10392
Description
Detect when an SSO user is attempting to leverage an expired session token, and rather than redirect them to the SignIn page, instead directly call the SSO provider & send them back to the requested page.
Docs
Test Plan
Setup:
always_redirect: true
in the OIDC/SAML config to test the alwaysRedirect behavior.SSO User Token Expiration
UPDATE user_sessions SET expiry = current_timestamp WHERE user_id = <your user id>;
Non-SSO User Token Expiration
UPDATE user_sessions SET expiry = current_timestamp WHERE user_id = <your user id>;
Always Redirect Enabled
/det/tasks
/det/workspaces/<workspace_id>/projects
/det/projects/<project_id>/experiments
Checklist
docs/release-notes/
See Release Note for details.