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

Add oidc-wiremock to CI Security2 category #12822

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

sberyozkin
Copy link
Member

I've also move elytron-resteasy to the HTTP category where all other resteasy tests are run

@sberyozkin sberyozkin requested a review from machi1990 October 20, 2020 10:47
@sberyozkin sberyozkin added this to the 1.10 - master milestone Oct 20, 2020
Copy link
Member

@machi1990 machi1990 left a comment

Choose a reason for hiding this comment

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

LGTM. Let's see what CI says or if there will be a need to increase the timeouts.

@sberyozkin
Copy link
Member Author

@machi1990 So it failed, though I've confirmed it works in the native image for me, hmm... need to find the logs somehow :-)

@sberyozkin
Copy link
Member Author

Right, so it is

java.io.IOException: Failed to bind to /0.0.0.0:8180
2020-10-20T11:37:21.4834171Z Caused by: java.net.BindException: Address already in use

since Keycloak is listening there as well, elytron oauth2 tests run on the default 8080 port, so I'll try it

@sberyozkin sberyozkin force-pushed the add_oidc_wiremock_test_to_ci branch from 6ef8375 to 1297006 Compare October 20, 2020 12:31
WireMock.stubFor(
get(urlEqualTo("/auth/realms/quarkus/.well-known/openid-configuration"))
.willReturn(aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON)
.withBody("{\n" +
" \"authorization_endpoint\": \"http://localhost:8180/authenticate\",\n" +
" \"end_session_endpoint\": \"http://localhost:8180/logout\",\n" +
" \"authorization_endpoint\": \"http://localhost:8080/authenticate\",\n" +
Copy link
Contributor

Choose a reason for hiding this comment

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

Another option would be to use server.getOptions().portNumber()

Copy link
Member Author

Choose a reason for hiding this comment

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

@gastaldi @machi1990 it also has server.baseUrl() so I've used it and also removed the redundant discovery values which are not needed for the mock testing; it should be very easy for the users to mock the bearer token authentication; code flow would have something more similar to the original, CC @cemnura

@sberyozkin sberyozkin force-pushed the add_oidc_wiremock_test_to_ci branch from 1297006 to 3f1fa17 Compare October 20, 2020 13:33
@sberyozkin sberyozkin force-pushed the add_oidc_wiremock_test_to_ci branch from 3f1fa17 to 4b7d6c8 Compare October 20, 2020 13:44
@gastaldi gastaldi merged commit a0eb60c into quarkusio:master Oct 20, 2020
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