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

[ELYWEB-222] Add a test for single sign on across two apps with logout #245

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

fjuma
Copy link
Contributor

@fjuma fjuma commented Feb 8, 2024

https://issues.redhat.com/browse/ELYWEB-222
Depends on wildfly-security/wildfly-elytron#2094

Test case for ELY-2589

Note that the new test will fail until an Elytron component upgrade that contains wildfly-security/wildfly-elytron#2094 is included here.

@fjuma fjuma requested a review from Skyllarr as a code owner February 8, 2024 21:54
@fjuma fjuma changed the base branch from 4.x to 1.9.x February 8, 2024 21:54
@fjuma fjuma changed the title [ELYWEB-222] Add a test for single sign on across two apps without logout [ELYWEB-222] Add a test for single sign on across two apps with logout Feb 8, 2024
@fjuma fjuma requested a review from darranl February 8, 2024 22:05
String cacheManagerName = UUID.randomUUID().toString();
EmbeddedCacheManager cacheManager = new DefaultCacheManager(
GlobalConfigurationBuilder.defaultClusteredBuilder()
.globalJmxStatistics().cacheManagerName(cacheManagerName)
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI may need to double check the PR I sent with the component upgrades, I think I made a small tweak to set up due to Infinispan changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, this will need a small tweak when merging to the 4.x branch. The 1.9.x maintenance branch doesn't contain the component upgrade so this passes for me locally.

}

private static String getSessionIdForApp(BasicCookieStore cookieStore, UndertowServer server) {
return cookieStore.getCookies().stream().filter(cookie -> cookie.getName().equals("JSESSIONID") && cookie.getPath().equals(server.getContextRoot())).findAny().get().getValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not part of our requirements at the moment, but I am finding as screens get wider restricting code to a reasonable line length becomes more relevant again as now it is possible to open multiple columns of source on a single screen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I've adjusted the line length.

Copy link
Contributor

@darranl darranl left a comment

Choose a reason for hiding this comment

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

None of my comments prevent merging but FYI there may be a CI issue related to the Infinispan component upgrade once this can run.

@fjuma
Copy link
Contributor Author

fjuma commented Feb 14, 2024

I have released Elytron 1.15.22.Final and confirmed that the tests pass locally. CI is still failing here because it's not able to download the newly released artifacts. I'm going to go ahead and merge to carry on with the Elytron Web release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants