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

UI: OIDC callback bug. #18521

Merged
merged 3 commits into from
Mar 7, 2023
Merged

Conversation

davidspek
Copy link
Contributor

Replaces #18138 as the branch needed to be renamed following this comment. CC'in @hashishaw and @austingebauer as you were reviewing the previous PR.

When implementing vault with our OIDC provider, the popup window never closes and the OIDC callback never succeeds. This is because the main window is listening for message events from the popup window. However, in our OIDC consent page other message events originating from Intercom are sent and these break the callback handling. This is because the code implemented in #13133 will error if the first message event is not the one Vault expects. This PR effectively inverses the if statement so that the while loop will function properly and wait for the proper event to catch.

The events listed in the browser by executing monitorEvents(window,"message") in the browser console:

image

The popup window for the OIDC login flow that is being referred to:
image

@davidspek
Copy link
Contributor Author

@austingebauer could you please have a look at this PR again.

Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

Thank you for your work on this @davidspek !

@Monkeychip Monkeychip added the ui label Mar 2, 2023
@Monkeychip Monkeychip added this to the 1.13.1 milestone Mar 2, 2023
@Monkeychip
Copy link
Contributor

@davidspek Hi David, doing a little clean up work and noticed this PR was not yet merged. Looks like there are some conflicts. Would you mind fixing those and then we can go ahead and merge?

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
@davidspek davidspek force-pushed the ui/oidc-event-filter branch from eb9d0af to 808ed21 Compare March 2, 2023 23:14
@davidspek
Copy link
Contributor Author

@Monkeychip I've just rebased the PR.

@Monkeychip Monkeychip enabled auto-merge (squash) March 2, 2023 23:32
@Monkeychip Monkeychip merged commit ee529db into hashicorp:main Mar 7, 2023
raymonstah pushed a commit that referenced this pull request Mar 17, 2023
* don't error for other message events

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>

* add changelog

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>

* rename release note for changelog

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>

---------

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants