-
Notifications
You must be signed in to change notification settings - Fork 280
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
[ELY-2813] Do not decode URI for processing #2204
Conversation
[ELY-2687] - Merge an if statement with the enclosing one in ServerAuthen…
[ELY-2682] Refactor OAuth2SaslClientV11Test to use common method
[ELY-2700] - Bump version.com.fasterxml.jackson from 2.15.2 to 2.15.3
[ELY-2650] Upgrade sshd-common from 2.9.2 to 2.10.0
[ELY-2660] Upgrade commons-cli:commons-cli from 1.4 to 1.5.0
[ELY-2681] Refactor OAuth2SaslClientV10Test to use common method
[ELY-2679] Replace assert in VaultCommandTest with a proper check
[ELY-2678] Replace assert in VaultCommandTest with a proper check
[ELY-2672] Upgrade org.kohsuke.metainf-services:metainf-services from…
[ELY-2666] Upgrade org.apache.sshd:sshd-common from 2.9.2 to 2.10.0
…GA to 1.2.0.Final
[ELY-2671] Upgrade org.jboss.threads:jboss-threads from 2.4.0.Final t…
…LY-2693 [ELY-2693] Unit test code refactor (removed duplicates)
…LY-2684 [ELY-2684] Unit test code refactor (removed duplicates)
[ELY-2661] Upgrade jakarta.enterprise:jakarta.enterprise.cdi-api from 2.0.2 to 4.0.1
… method in order to remove duplicated code
…le_repo_readme [ELY-2647] Add link to elytron-examples in README
…mon method in order to remove duplicated code
…e and sub packages
[ELY-2669] Upgrade org.jboss.modules:jboss-modules from 1.9.2.Final t…
[ELY-2663] Upgrade org.apache.commons:commons-lang3 from 3.8.1 to 3.13.0
[ELY-2673] Upgrade org.wildfly.common:wildfly-common
[ELY-2664] Upgrade org.apache.httpcomponents:httpclient from 4.5.13 to 4.5.14
…cSSLTestUtils [ELY-2738] creating X509Certificate using CAGenerationTool.
[ELY-2704] Missing keystore password does not throw a meaningful exception
[ELY-2741] Enhance TRACE logging for the EXTERNAL HTTP mechanism
[ELY-2811] Add missing scope to dynamic-ssl pom.xml for wildfly-elytron-tests-common
@michpetrov Thanks for working on this! This looks related to #2186 as well. As commented there, I found this related change that was made for the Keycloak adapter: We should make sure that we've incorporated anything else related from the Keycloak PR as well (if you haven't already). For example, the Keycloak adatper supports a couple different cases depending on the Elytron Web version in use and also makes some related changes in other files. We should verify that we can now safely ignore the case where the existing code was needed and also check that we've made the related updates in all places. Would also be good to add tests. |
@fjuma that seems to be essentially the same problem, so I could close this PR. I don't quite understand the keycloak PR though, it looks like it's copying the bad behavior from here, i.e. decoding the query and forwarding it as the original and if that's required for elytron-web to function then I'd say there's a problem in elytron-web. But I'm just following a reproducer, I don't know if and when elytron-web comes into play or if that's a separate issue. |
The original code is needed by Keycloak when using an older version of Elytron Web. The new code is needed by Keycloak when using a newer version of Elytron Web because the newer version updates the way decoding is done. I can look closer when I have some time to check if there is anything else from the Keycloak PR that is needed. |
So if I'm understanding this right - older versions of elytron-web (anything before 1.9.2 plus 1.10.0 on its own) unintentionally encode the URI when forwarding it, so if Keycloak detects an old version it will decode the URI to fix this. All I'm seeing in the PR are changes to the Do we want the Keycloak workaround added to Elytron or? I'm seeing elytron-web is already on 4.x so are the old versions still supported? |
We don't need to worry about the older Elytron Web versions. I haven't had time to look closely but the handling of the query parameters in the Keycloak code for the new version of Elytron Web looks a bit different from the Elytron code so we need to make sure that part is correct and make sure that we have appropriate tests for this. |
There are some differences (in the UriUtils class). But I guess I'm missing why we're concerned about it, looking at Elytron the method is called to retrieve known parameters (so there isn't a need to make the method handle parameters that are just "key" instead of "key=value" if we know we do not process any such parameters). But if the concern is that Elytron might send unexpectedly encoded/decoded URI to Keycloak or vice versa, this method doesn't modify URI so it wouldn't be the problem. |
[~fjuma], I'd like to expedite this. I can port the method over but like I said I don't think it makes a difference, it doesn't affect the URI that's being exchanged between Elytron and Keycloak. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This look OK to me.
Right, this isn't JIRA :) @fjuma, please see my comment above |
One small comment, if this is for a micro release this should be submitted against the relevant maintenance branch not 2.x which is the upstream for WildFly. |
@michpetrov Like @darranl suggested, can you change the PR to target 2.2.x branch (JBEAP-28033)? Thanks! |
Issue: ELY-2813