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

Firefox Webauthn Registration "SecurityError: The operation is insecure." #28020

Open
1 of 2 tasks
mcarbonneaux opened this issue Mar 18, 2024 · 12 comments
Open
1 of 2 tasks
Assignees
Labels
Milestone

Comments

@mcarbonneaux
Copy link

mcarbonneaux commented Mar 18, 2024

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

authentication/webauthn

Describe the bug

on firefox on windows 11 if i try to configure webauthn by following the documentation i fail with this error when i go to webauthn registering phase. but on all other website like google, webauthn.io it's work fine...

image

image

after digging on the web find why.... i've not found why...

finaly i've tested on different browser ... and with debugger console...
and on edge finaly i seen this message in the dev console (i've no message on firefox) :
image

the message speek about this link : https://chromium.googlesource.com/chromium/src/+/main/content/browser/webauth/pub_key_cred_params.md

on this page they say that on microsoft windows platform need to have Signature algorithms RS256 in pubKeyCredParams... and keycloak by default not use this Signature algorithms (only ES256)...

after adding it in keycloak admin console:
image

we don't have any more the error message in edge, and it's work, and it's work also on firefox...

Version

21.1.2

Regression

  • The issue is a regression

Expected behavior

Webauthn Registration without error...

Actual behavior

Webauthn Registration "SecurityError: The operation is insecure."

How to Reproduce?

install keycloak 21.1.2 from scratch and follow the documentation https://www.keycloak.org/docs/21.1.2/server_admin/#webauthn_server_administration_guide and try to log first time and try to register webauthn key...

Anything else?

i think you must add RS256 by default in addition of ES256, because of windows platform authenticator that require it... or modify the documentation to inform keycloak admin user to add this Signature algorithms if they have windows user...

@mposolda
Copy link
Contributor

@mcarbonneaux Thanks a lot for the investigation!

I am switching to "important" as it will be probably good to prioritize this. We should doublecheck whether we should change the default or update docs. Changing the default can be better unless there are some other side-effects (to be investigated).

@tnorimat Are you aware of any side-effects of changing the default to have both RS256 and ES256?

@tnorimat
Copy link
Contributor

@mposolda I think it is OK to have both ES256 and RS256 as default setting.

@jonkoops
Copy link
Contributor

Not sure if the others already checked this, but from what I can see this was reported for an older version that is no longer supported. Feel free to bump if this is still reproducible in 24.

@keycloak-github-bot
Copy link

Thanks for reporting this issue, but as this is reported against an older and unsupported release we are not able to evaluate the issue. Please verify with the nightly buildor the latest release.

If the issue can be reproduced in the nightly build or latest release add a comment with additional information, otherwise this issue will be automatically closed within 14 days.

@rmartinc
Copy link
Contributor

@mposolda @tnorimat I also think that adding RS256 as default should not be an issue.

@jlrcontegix
Copy link

jlrcontegix commented Mar 22, 2024

On Keycloak 24.0.1 we've added RS256, RS384, and RS512, but Firefox still fails to register our Yubikeys.

In our case we are only allowing a specific AAGUID and we see the following error, but this is only happening in Firefox (tested with 124.0.1):

image

@LevN0
Copy link

LevN0 commented Mar 24, 2024

Do you have attestation conveyance preference set to at "direct" or "indirect"? Any other value won't send an AAGUID. I am not a 100% sure if even indirect sends it.

@jlrcontegix
Copy link

We have ours set to Direct. We've tried Indirect and Not Specified.

@keycloak-github-bot
Copy link

Due to lack of updates in the last 14 days this issue will be automatically closed.

@keycloak-github-bot keycloak-github-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2024
@jonkoops
Copy link
Contributor

jonkoops commented Apr 3, 2024

Looks like the bot has closed this issue, if anyone can reproduce this under 24.0.2 let us know and I will re-open it.

@mcarbonneaux
Copy link
Author

mcarbonneaux commented Apr 6, 2024

i've tested on 24.0.2, and the same:
image
and on edge is the same:
image

and after adding RS256 it's work fine!

my test bed : keycloak 24.0.2 zip + java 17 on windows 11 in start dev mode and firefox 124.0.2 and edge 123.0.2420.81
plus https://openidconnect.net/ for the openidc client.

i've created a new realm "test", and new client on this realms in openidc mode, and with credential
i've created a new browser workflow (like in the documentation), and forced this workflow on my new client.
after receiving the error i add rs256 on webauthn policy (not in password less version), and after is working.

@rmartinc
Copy link
Contributor

rmartinc commented Apr 8, 2024

Yep, this issue is not resolved, it was closed automatically by the bot.

@rmartinc rmartinc reopened this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants