Security WebAuthn thoughts #38179
Replies: 3 comments 9 replies
-
@FroMage, FYI |
Beta Was this translation helpful? Give feedback.
-
Here is a section of the w3c doc that describes the username oracle thing and a way to fix it: Also I haven't exactly ruled out that I haven't done something wrong on my end wrt anything. I don't know much about webauthn atm. Kind of wish the https://github.com/Yubico/java-webauthn-server could be used just because it would be nice if some of the implementation was shared but it seems like they also return an error if the username doesn't exist. |
Beta Was this translation helpful? Give feedback.
-
Ah yes, that's a bug.
You mean instead of: loginButton.onclick = () => { ... }; I suppose this would be better, yes, according to https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener:
So, yeah.
Good question. I'm not entirely sure myself why it's used.
Yes, you can have multiple credentials per user. This should work.
Do you have a stack trace for the 500?
This is a JavaScript question. I'll defer to @ia3andy or @phillip-kruger for advice.
@cescoffier what do I need to do to support
I'm not sure, TBH. Best not rely on inheritance.
For registration you need a username. For login, you can avoid it if you the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
about the html example in the guide:
<ul>
tag should be closedI wish it used form tags and addEventListener with the submit event instead of setting onclick.
I wish the guide explained what's up with displayName or how to use it. I don't see it in the Authenticator. The UserProvider has lookup methods that return lists of Authenticators but the javadocs refer to singular credentials. (Can the credential id lookup really ever return multiple things?)
The login button has 500 internal server errors being returned if the username isn't found. That should probably be a 400 level error. Also it seems like returning any error here makes the form an oracle that could be used to check if any username exists. (not sure if this is able to be fixed)
The webauthn.js file does this "WebAuthn.constructor = WebAuthn;" but WebAuthn is a function and not an instance of WebAuthn. If you use the new syntax like
class A {}
which sets everything up for you thenA.constructor
will beFunction
notA
. I don't think this should be set.I wish the UserProvider supported RunOnVirtualThread in addition to Blocking. WebAuthnAuthenticatorStorage.isBlocking() checks super classes but the annotations say that they are not inherited. Is the super class being checked because of proxies?
I wish the guide described how to use this with no username. I kind of think it might not be possible to do this with the current code. If I just set the username to be the same for everyone won't the username lookup method get called on the provider and expect every credential in the returned list?
Beta Was this translation helpful? Give feedback.
All reactions