Skip to content

KEYCLOAK-14306 OIDC redirect_uri allows dangerous schemes resulting in potential XSS - #7586

Merged
mposolda merged 1 commit into
keycloak:masterfrom
vmuzikar:redirect-uris
Nov 12, 2020
Merged

mposolda merged 1 commit into
keycloak:masterfrom
vmuzikar:redirect-uris

Conversation

@vmuzikar

@vmuzikar vmuzikar commented Nov 5, 2020

Copy link
Copy Markdown
Contributor

(cherry picked from commit e86bec8)

Conflicts:
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/ClientRegistrationTest.java
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/ClientTest.java
services/src/main/java/org/keycloak/validation/DefaultClientValidationProvider.java

All of them are related to #7272.

@vmuzikar

vmuzikar commented Nov 5, 2020

Copy link
Copy Markdown
Contributor Author

Since Travis doesn't work, I'm waiting for test results in the test pipeline.

@stianst stianst added this to the 12.0.0 milestone Nov 6, 2020
@vmuzikar

vmuzikar commented Nov 6, 2020

Copy link
Copy Markdown
Contributor Author

Successful base testsuite run: https://keycloak-jenkins.com/job/universal-test-pipeline-server/2293/

@stianst

stianst commented Nov 6, 2020

Copy link
Copy Markdown
Contributor

There's some failures in "Keycloak CI" job: https://github.com/keycloak/keycloak/pull/7586/checks?check_run_id=1359650110

@stianst
stianst requested a review from pedroigor November 6, 2020 07:57
@vmuzikar

vmuzikar commented Nov 6, 2020

Copy link
Copy Markdown
Contributor Author

There's some failures in "Keycloak CI" job: https://github.com/keycloak/keycloak/pull/7586/checks?check_run_id=1359650110

@stianst That's weird... It's some Quarkus check, isn't it? I mean, why else would it fail when the test pipeline passed?

@vmuzikar

vmuzikar commented Nov 6, 2020

Copy link
Copy Markdown
Contributor Author

I think the test failures are unrelated to this as it apparently affects other PRs too (e.g. #7546).

@pedroigor

Copy link
Copy Markdown
Contributor

Now we have a real overlap with #7324.

So far, it was only about client validation. We need to figure out how to align the different proposals we have on the table.

@vmuzikar

vmuzikar commented Nov 9, 2020

Copy link
Copy Markdown
Contributor Author

@pedroigor So what is your proposal how to handle this in the best way? :)
IMHO however we decide, I think we should merge this, and if needed, refactor later. This PR is just a forwardport of something that was already merged in the downstream – so, for the consistency sake, we should have this in the upstream too. At least for now before we replace it with something else.

pedroigor
pedroigor previously approved these changes Nov 9, 2020
@pedroigor

Copy link
Copy Markdown
Contributor

@vmuzikar I have no clue :) But work later to finally have a single validation approach.

…n potential XSS

(cherry picked from commit e86bec8)

Conflicts:
    testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/ClientRegistrationTest.java
    testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/ClientTest.java
    services/src/main/java/org/keycloak/validation/DefaultClientValidationProvider.java
@vmuzikar

vmuzikar commented Nov 9, 2020

Copy link
Copy Markdown
Contributor Author

I rebased this onto current master but there are still test failures. I was unable to reproduce it locally (all pass for me), so I'm not sure what's happening here. Doesn't GH Actions use some cache or something?

@stianst

stianst commented Nov 10, 2020

Copy link
Copy Markdown
Contributor

This is a blocker to get merged into master for Keycloak 12, as it is fixing a CVE that is already public and resolved in 11.0.3. So any refactoring is out of scope, and this should get merged assuming it is okay, and passes CI.

For sure later we do need to refactor/align on a more consistent approach to validation throughout.

@pedroigor

Copy link
Copy Markdown
Contributor

@stianst @vmuzikar I know GA is not as stable yet from my experiences with Quarkus tests. I guess you can successfully run the failing ones locally without any problem.

I'm OK to merge this one but I don't have the rights to do it due to those failures.

@mposolda
mposolda merged commit 01be601 into keycloak:master Nov 12, 2020
@vmuzikar
vmuzikar deleted the redirect-uris branch November 12, 2020 07:36
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.

4 participants