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

fix: configuration to allow cross-platform devices for passkeys #4047

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

eadwu
Copy link

@eadwu eadwu commented Aug 20, 2024

Related issue(s)

#4045

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

This aligns more with expected behavior. If one can sign in using cross platform devices, it doesn't make sense to restrict it to only devices within the same platform.

This is probably considered less secure when compared to the same-device restriction. https://www.passkeys.io allows cross-platform (or at least if this doesn't align it with theirs the behavior is more aligned with this change since I have not read hanko's source code)

@CLAassistant
Copy link

CLAassistant commented Aug 20, 2024

CLA assistant check
All committers have signed the CLA.

@eadwu eadwu changed the title fix: allow cross-platform devices for passkeys fix: configuration to allow cross-platform devices for passkeys Aug 21, 2024
@aeneasr
Copy link
Member

aeneasr commented Aug 27, 2024

Would it be possible to add an e2e test for this in cypress or playwright?

@hperl do passkeys generally support this config value?

@eadwu
Copy link
Author

eadwu commented Sep 13, 2024

I'm not exactly sure how to write tests in this repo.

I checked https://github.com/ory/kratos/pull/3748/files since I should really just be able to copy WebAuthn tests as passkeys only really put it in the device instead of storing it on the server (from what I know). If the tests for passkeys and webauthn don't have anything in relation to the authentication modality, I don't think I could write a test for it.

I'm not intimately familiar with the spec so I'm not sure about whether or not I can test it via cypress or playwright.

The difference is in what devices are allowed to connect. In the browser cross-platform is the QR-code while platform is only directly connected devices (unset allows both).

@aeneasr
Copy link
Member

aeneasr commented Sep 14, 2024

I‘m not confident that cross-platform is a valid method for „true“ passkeys. @hperl probably knows

@eadwu
Copy link
Author

eadwu commented Sep 14, 2024

I found this https://passkeys.dev/docs/reference/terms/#cross-device-authentication-cda but yeah I'm not entirely sure either.

@aeneasr
Copy link
Member

aeneasr commented Sep 16, 2024

It does indeed look like this is OK:

https://passkeys.dev/docs/use-cases/bootstrapping/#cross-device-authentication

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.

3 participants