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

Harden middleware for unenforced login #1091

Closed
wants to merge 5 commits into from
Closed

Conversation

theosanderson
Copy link
Member

@theosanderson theosanderson commented Feb 23, 2024

resolves #1087 maybe

preview URL: https://harden-nice-login.loculus.org/

Summary

Clears session cookie when there is an error getting user info, even if not on an enforced login page, and ensures we don't redirect to a page with session parameters in the redirect Uri

@theosanderson theosanderson added the preview Triggers a deployment to argocd label Feb 23, 2024
@@ -49,6 +49,7 @@ export async function getKeycloakClient() {
}

export const getAuthUrl = async (redirectUrl: string) => {
redirectUrl = removeTokenCodeFromSearchParams(new URL(redirectUrl)).toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

That redirect URL should also be https, no?

Copy link
Contributor

@corneliusroemer corneliusroemer left a comment

Choose a reason for hiding this comment

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

I had similar ideas here #1090, not sure whether you had a look at that or independently had these ideas 😄

Debug logs won't have effect until #1089 is merged 🙃

@theosanderson
Copy link
Member Author

I hadn't seen yours until after - if you're happy with how yours is working I'm happy to go with that instead. I haven't tested this much.

@corneliusroemer
Copy link
Contributor

Nono, go ahead, we're getting there slowly I think - I'm taking another shot after some sleep in #1097

@theosanderson
Copy link
Member Author

Closing in favour of #1098

@theosanderson theosanderson deleted the harden-nice-login branch March 27, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Triggers a deployment to argocd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Nice login page shown when clicking submit, even when logged in
2 participants