All Projects → lbuchs → Webauthn

lbuchs / Webauthn

Licence: mit
A simple PHP WebAuthn (FIDO2) server library

Projects that are alternatives of or similar to Webauthn

2FAuth-iOS
One-Time Password Generator
Stars: ✭ 20 (-79.17%)
Mutual labels:  two-factor-authentication, 2fa
Otp.net
A .NET implementation of TOTP and HOTP for things like two-factor authentication codes.
Stars: ✭ 424 (+341.67%)
Mutual labels:  2fa, two-factor-authentication
Java Otp
A one-time password (HOTP/TOTP) library for Java
Stars: ✭ 265 (+176.04%)
Mutual labels:  2fa, two-factor-authentication
mobileid
Mobile ID Sample Scripts
Stars: ✭ 13 (-86.46%)
Mutual labels:  two-factor-authentication, 2fa
Authenticator
Two-Factor Authentication Client for iOS
Stars: ✭ 648 (+575%)
Mutual labels:  2fa, two-factor-authentication
mfaws
🔒 AWS multi-factor authentication for the CLI
Stars: ✭ 38 (-60.42%)
Mutual labels:  two-factor-authentication, 2fa
Two Factor Bundle
[OUTDATED] Two-factor authentication for Symfony applications 🔐 (bunde version ≤ 4). Please use version 5 from https://github.com/scheb/2fa.
Stars: ✭ 388 (+304.17%)
Mutual labels:  2fa, two-factor-authentication
totp
Time-Based One-Time Password Code Generator
Stars: ✭ 76 (-20.83%)
Mutual labels:  two-factor-authentication, 2fa
Authelia
The Single Sign-On Multi-Factor portal for web apps
Stars: ✭ 11,094 (+11456.25%)
Mutual labels:  2fa, two-factor-authentication
Google2fa Laravel
A One Time Password Authentication package, compatible with Google Authenticator for Laravel
Stars: ✭ 618 (+543.75%)
Mutual labels:  2fa, two-factor-authentication
recovery
Create recovery/backup codes for 2FA
Stars: ✭ 72 (-25%)
Mutual labels:  two-factor-authentication, 2fa
Privacyidea
🔐 multi factor authentication system (2FA, MFA, OTP Server)
Stars: ✭ 1,027 (+969.79%)
Mutual labels:  2fa, two-factor-authentication
2FAuth
A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
Stars: ✭ 664 (+591.67%)
Mutual labels:  two-factor-authentication, 2fa
2FA-Auth
Generating 2FA codes in your terminal
Stars: ✭ 23 (-76.04%)
Mutual labels:  two-factor-authentication, 2fa
crystal-two-factor-auth
Two Factor Authentication Crystal code implementing the Time-based One-time Password Algorithm
Stars: ✭ 24 (-75%)
Mutual labels:  two-factor-authentication, 2fa
Two Factor Auth
Generate 2FA tokens compatible with Google Authenticator
Stars: ✭ 352 (+266.67%)
Mutual labels:  2fa, two-factor-authentication
otp-java
A small and easy-to-use one-time password generator library for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP).
Stars: ✭ 107 (+11.46%)
Mutual labels:  two-factor-authentication, 2fa
apache 2fa
Apache two-factor (2FA) authentication with Google Authenticator based on Time-based One-Time Password (TOTP) or HMAC-based one-time password (HOTP) Algorithms.
Stars: ✭ 63 (-34.37%)
Mutual labels:  two-factor-authentication, 2fa
Aws Mfa
Manage AWS MFA Security Credentials
Stars: ✭ 606 (+531.25%)
Mutual labels:  2fa, two-factor-authentication
Otplib
🔑 One Time Password (OTP) / 2FA for Node.js and Browser - Supports HOTP, TOTP and Google Authenticator
Stars: ✭ 916 (+854.17%)
Mutual labels:  2fa, two-factor-authentication

Licensed under the MIT License Requires PHP 7.1.0 Last Commit

WebAuthn

A simple PHP WebAuthn (FIDO2) server library

Goal of this project is to provide a small, lightweight, understandable library to protect logins with security keys like Yubico or Solo, fingerprint on Android or Windows Hello.

Manual

See /_test for a simple usage of this library. Check webauthn.lubu.ch for a working example.

Supported attestation statement formats

  • android-key ✅
  • android-safetynet ✅
  • apple ✅
  • fido-u2f ✅
  • none ✅
  • packed ✅
  • tpm ✅

This library supports authenticators which are signed with a X.509 certificate or which are self attested. ECDAA is not supported.

Workflow

         JAVASCRIPT            |          SERVER
------------------------------------------------------------
                         REGISTRATION


   window.fetch  ----------------->     getCreateArgs
                                             |
navigator.credentials.create   <-------------'
        |
        '------------------------->     processCreate
                                             |
      alert ok or fail      <----------------'


------------------------------------------------------------
                      VALIDATION


   window.fetch ------------------>      getGetArgs
                                             |
navigator.credentials.get   <----------------'
        |
        '------------------------->      processGet
                                             |
      alert ok or fail      <----------------'

Attestation

What's attestation? Normally, you just need to verify that a login comes from the same device like the device used on registration. For this usecase, you don't need any attestation. If you need more security, maybe when you know that for your company login everyone has a solokey, you can verify with direct attestation, that this device is really a solokey. Companys could even buy own authenticators signed with a company-own root certificate, then you can verify that a authenticator is one of your company.

no attestation

just verify that the device is the same device used on registration. You can use 'none' attestation with this library if you only check 'none' as format.

  • this is propably what you want to use if you want simple 2FA login protection like github, facebook, google, etc.

indirect attestation

the browser may replace the AAGUID and attestation statement with a more privacy-friendly and/or more easily verifiable version of the same data (for example, by employing an anonymization CA). You can not validate against any root ca, if the browser uses a anonymization certificate. this library sets attestation to indirect, if you select multiple formats but don't provide any root ca.

  • hybrid soultion, clients may be discouraged by browser warnings but then you know what device they're using (statistics rulez!)

direct attestation

the browser proviedes data about the identificator device, the device can be identified uniquely. User could be tracked over multiple sites, because of that the browser may show a warning message about providing this data when register. this library sets attestation to direct, if you select multiple formats but and provide root ca's.

  • this is probably what you want if you know what devices your clients are using and make sure that only this devices are used.

Resident Credential

A Client-side-resident Public Key Credential Source, or Resident Credential for short, is a public key credential source whose credential private key is stored in the authenticator, client or client device. Such client-side storage requires a resident credential capable authenticator. This is only supported by FIDO2 hardware, not by older U2F hardware.

How does it work?

With normal server-side key process, the user enters its username (and maybe password), then the server replys with a list of all public key credential identifier, which had been registered by the user. Then, the authenticator takes the first of the provided credential identifier, which has been issued by himself, and responses with a signature which can be validated with the public key provided on registration. With client-side key process, the user don't have to provide an username or password. The server don't send any identifier; rather, the authenticator is looking up in it's own memory, if there is a key saved for this relying party. If yes, he's responding the same way like he's doing if you provide a list of identifier, there is no difference in checking the registration. Resident Credential is supported by Windows 10 (Firefox, Chromium). Browser on old OS like Windows 7 do a fallback to FIDO U2F, which doesn't support resident credential.

How can I use it with this library?

on registration

When calling WebAuthn\WebAuthn->getCreateArgs, set $requireResidentKey to true, to notify the authenticator that he should save the registration in its memory.

on login

When calling WebAuthn\WebAuthn->getGetArgs, don't provide any $credentialIds (the authenticator will look up the ids in its own memory).

Requirements

Infos about WebAuthn

FIDO2 Hardware

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].