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

Handle exceptions thrown when requesting storage-access permission #21325

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

jonkoops
Copy link
Contributor

@jonkoops jonkoops commented Jun 29, 2023

Adds an error handler when requesting the storage-access permission when checking 3rd-party cookie access. If an error is thrown, it falls back to the regular redirect flow to detect 3rd-party cookie support.

The Permission API will sometimes throw exceptions when requesting access to storage, specifically in Safari this occurs more than in other browsers (likely it doesn't support the storage-access permission yet, see #21307 (comment)). This can result in the iframe timing out, failing the authentication check and leaving client applications in a unusable state.

Closes #21307

@jonkoops jonkoops added priority/blocker Highest Priority. Has a deadline and it blocks other tasks team/ui labels Jun 29, 2023
@jonkoops jonkoops self-assigned this Jun 29, 2023
@jonkoops jonkoops requested a review from a team as a code owner June 29, 2023 16:12
@jonkoops jonkoops requested a review from a team June 29, 2023 16:16
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

@ghost
Copy link

ghost commented Jun 30, 2023

Unreported flaky test detected

If the below flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.ui.account2.WelcomeScreenTest#personalInfoTest

Keycloak CI - Account Console IT (firefox)

java.lang.AssertionError: Expected PersonalInfoPage but was Keycloak Account Management (https://localhost:8543/auth/realms/test/account/#/personal-info&state=d997b959-34cd-40e1-8e57-4a214df03259&session_state=87958021-b593-4746-9c42-41e19dd402d4&code=dd61129e-61be-4a05-b5b7-ad7e5d0f5948.87958021-b593-4746-9c42-41e19dd402d4.738f4688-ca10-4f3e-800f-56ab5eeda449)
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.keycloak.testsuite.page.AbstractPage.assertCurrent(AbstractPage.java:110)
	at jdk.internal.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
...

Report flaky test

@marviobezerra
Copy link

When will it be released?

@jonkoops jonkoops deleted the handle-storage-access-error branch June 30, 2023 09:21
@jonkoops
Copy link
Contributor Author

When will it be released?

#21307 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test priority/blocker Highest Priority. Has a deadline and it blocks other tasks team/ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3rd party check in iframe not working anymore in safari and keycloak 21.1.2
3 participants