Make acceptable AAGUID ckeck in WebAuthn stricter#48404
Make acceptable AAGUID ckeck in WebAuthn stricter#48404rmartinc wants to merge 1 commit intokeycloak:mainfrom
Conversation
Closes keycloak#48388 Signed-off-by: rmartinc <[email protected]>
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.forms.MultipleTabsLoginTest#testWithAuthSessionExpiredInTheMiddle_badRedirectUriKeycloak CI - Forms IT (chrome) org.keycloak.testsuite.authz.PolicyEvaluationTest# |
|
@tnorimat I have added you as a reviewer. Your review would be awesome if you have time. If not, don't worry. |
|
@rmartinc Hello, yes I will review the PR soon. |
tnorimat
left a comment
There was a problem hiding this comment.
@rmartinc Hello, I added minor comments. Could you check them?
Also, it seems that you implemented the tests by arquillian integration test. Is that OK?
It seems that it might be better to implement the tests by new JUnit test.
| break; | ||
| } | ||
| if (NoneAttestationStatement.FORMAT.equals(response.getAttestationObject().getFormat())) { | ||
| throw new WebAuthnException("Acceptable AAGUIDs requires a format different to none."); |
There was a problem hiding this comment.
How about the following?
"Acceptable AAGUIDs require an attestation format other than 'none'."
| registerDefaultUser(); | ||
|
|
||
| webAuthnErrorPage.assertCurrent(); | ||
| assertThat(webAuthnErrorPage.getError(), containsString("Acceptable AAGUIDs requires a format different to none.")); |
There was a problem hiding this comment.
How about the following?
"Acceptable AAGUIDs require an attestation format other than 'none'."
Closes #48388
PR to make the AAGUID check in WebAuthn strict. Previously we were accepting some corner cases that allow to inject the AAGUID from an untrusted source. The PR also limits the AAGUID to not include the none attestation (which is also untrusted). Normally the none format anonymizes the AAGUID to the zero AAGUID, so it's totally useless. I added a note as notable change, but it's between notable and breaking, a proper configuration is OK, but maybe some weird configurations can fail (like allowing none with the zero AAGUID as accepted, it's useless, you are accepting any authenticator with no attestation). I can move the note to a breaking change if you think it's more a breaking change than a notable one. The note is for 26.6.2, I'll move it if not ready for the new version. Tests added but in the old TS, we need to disable the trust-store for keycloak and that is going to be complicated in the new TS. So I prefer to not do it for this PR.