8000 Action expired error occurs when accessing regular registration page … by sguilhen · Pull Request #33086 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/operator-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ jobs:
test-remote:
name: Test remote
runs-on: ubuntu-latest
# The remote job is broken and holding up other PRs.
if: false
needs: [build]
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions js/apps/admin-ui/cypress/e2e/authentication_test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ describe("Authentication test", () => {
});

it("Should display the default browser flow diagram", () => {
sidebarPage.goToRealm("master");
sidebarPage.goToAuthentication();
@sguilhen sguilhen Sep 19, 2024 •
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Had to switch to master for this test because when orgs are enabled the default browser flow is changed for every new realm created, so the edges in the diagram connect different executions.

I've tried to add all new diagram connections to the test, but we have two conditional executions in this flow and they have the same text, so cypress complains about multiple elements with the same text.

Using master for this test seemed to me the best way to get the issue fixed, and consequently all PRs unblocked. We can possibly have a separate issue to revisit this test and see if we can change it to take into account the changes to the browser flow introduced by the orgs which are now enabled by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Logging an issue will do.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

listingPage.goToItemDetails("browser");

detailPage.goToDiagram();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public AuthorizationEndpoint register(String tokenString) {
event.event(EventType.REGISTER);
action = Action.REGISTER;

if (Profile.isFeatureEnabled(Profile.Feature.ORGANIZATION)) {
if (Profile.isFeatureEnabled(Profile.Feature.ORGANIZATION) && tokenString != null) {
//this call should extract orgId from token and set the organization to the session context
Response errorResponse = new LoginActionsService(session, event).preHandleActionToken(tokenString);
if (errorResponse != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class ArtifactResolutionService implements Provider<Source>, Runnable {
private ArtifactResponseType artifactResponseType;
private final String endpointAddress;
private ArtifactResolveType lastArtifactResolve;
private boolean running = true;
private volatile boolean running = true;

/**
* Standard constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public void testReceiveArtifactLoginFullWithPost() throws ParsingException, Conf
ArtifactResolutionService ars = new ArtifactResolutionService("http://127.0.0.1:8082/").setResponseDocument(doc);
Thread arsThread = new Thread(ars);
try {
arsThread.start();
synchronized (ars) {
arsThread.start();
ars.wait();
SAMLDocumentHolder response = builder.artifactMessage(camb).build().login().user(bburkeUser).build().getSamlResponse(SamlClient.Binding.POST);
assertThat(response.getSamlObject(), instanceOf(ResponseType.class));
Expand Down Expand Up @@ -90,8 +90,8 @@ public void testReceiveArtifactLoginFullWithRedirect() throws ParsingException,
ArtifactResolutionService ars = new ArtifactResolutionService("http://127.0.0.1:8082/").setResponseDocument(doc);
Thread arsThread = new Thread(ars);
try {
arsThread.start();
synchronized (ars) {
arsThread.start();
ars.wait();
SAMLDocumentHolder response = builder.artifactMessage(camb).build().login().user(bburkeUser).build().getSamlResponse(REDIRECT);
assertThat(response.getSamlObject(), instanceOf(ResponseType.class));
Expand Down Expand Up @@ -124,8 +124,8 @@ public void testReceiveArtifactNonExistingClient() throws ParsingException, Conf
ArtifactResolutionService ars = new ArtifactResolutionService("http://127.0.0.1:8082/").setResponseDocument(doc);
Thread arsThread = new Thread(ars);
try {
arsThread.start();
synchronized (ars) {
arsThread.start();
ars.wait();
String response = builder.artifactMessage(camb).build().executeAndTransform(resp -> EntityUtils.toString(resp.getEntity()));
assertThat(response, containsString("Invalid Request"));
Expand All @@ -151,8 +151,8 @@ public void testReceiveEmptyArtifactResponse() throws InterruptedException {
ArtifactResolutionService ars = new ArtifactResolutionService("http://127.0.0.1:8082/").setEmptyArtifactResponse(SAML_CLIENT_ID_SALES_POST);
Thread arsThread = new Thread(ars);
try {
arsThread.start();
synchronized (ars) {
arsThread.start();
ars.wait();
builder.artifactMessage(camb).build().execute(r -> {
assertThat(r, statusCodeIsHC(400));
Expand Down Expand Up @@ -180,8 +180,8 @@ public void testReceiveArtifactLogoutFullWithPost() throws InterruptedException
ArtifactResolutionService ars = new ArtifactResolutionService("http://127.0.0.1:8082/");
Thread arsThread = new Thread(ars);
try {
arsThread.start();
synchronized (ars) {
arsThread.start();
ars.wait();
SAMLDocumentHolder samlResponse = builder.authnRequest(getAuthServerSamlEndpoint(REALM_NAME), SAML_CLIENT_ID_SALES_POST, SAML_ASSERTION_CONSUMER_URL_SALES_POST, POST).build()
.login().user(bburkeUser).build()
Expand Down Expand Up @@ -220,8 +220,8 @@ public void testReceiveArtifactLogoutFullWithRedirect() throws InterruptedExcept
ArtifactResolutionService ars = new ArtifactResolutionService("http://127.0.0.1:8082/");
Thread arsThread = new Thread(ars);
try {
arsThread.start();
synchronized (ars) {
arsThread.start();
ars.wait();
SAMLDocumentHolder samlResponse = builder
.authnRequest(getAuthServerSamlEndpoint(REALM_NAME), SAML_CLIENT_ID_SALES_POST,
Expand Down
0