Difference between revisions of "WebAuthn"

From Embedded Lab Vienna for IoT & Security
Jump to: navigation, search
(Created page with "== Summary == == Goal == == Used Software == == Used Hardware == == Titel == == References == * https://www.openhab.org/ * https://www.wireshark.org/ Categor...")
 
(Architecture)
 
(65 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[File:webauthn_logo.PNG|500px|thumb|WebAuthn logo]]
 +
 
== Summary ==  
 
== Summary ==  
  
 +
WebAuthn is an Application created by the FIDO (Fast Identity Online) alliance and the W3C (World Wide Web Consortium) to offer the possibility of passwordless authentication online. The latest recommendation is of March 2019 published by the W3C. Instead WebAuthn work either with the inbuild Authenticator of the device, such as fingerprint sensor or facial recognition, or with an extern media like an USB Stick for verification.
 +
 +
== Goal ==
 +
Its purpose is to offer a more secure and easy possibility to log into your online accounts without storing or remembering huge amounts of passwords to prevent the possibility of passwords getting leaked or forgotten.
 +
 +
== Architecture <ref name="overview" /> ==
 +
 +
[[File:FIDO2-WebAuthn_Architecture.PNG|thumb|600px|FIDO2/WebAuthn Architecture<ref name="overview" />]]
 +
 +
;''' Authenticator '''
 +
The authenticator creates credentials, generates cryptographic proof of user authentication and administrate the PIN.
 +
 +
There are two types of authenticators:
 +
 +
*external authenticator (e.g. security key) that is removable from the device
 +
*internal authenticator (e.g. fingerprint reader) that is implemented on the device
 +
 +
;'''Client/Platform'''
 +
The client implements CTAP2 and client-side WebAuthn API and proves the validity of the identity of the Relying Party to prevent phishing attacks.
 +
The client could be a browser for web applications or an operating system subsystem that offers a platform-specific FIDO API for mobile or desktop apps.
 +
 +
;'''Relying Party (RP)'''
 +
The Relying Party consists of at least one webserver, the server-side parts of the WebAuthn API and a WebAuthn Server, that has a trust store.
 +
The trust store contains the public trust parts for the attestation of the authenticator.
 +
 +
== Functionality ==
 +
WebAuthn works with two ceremonies:
 +
 +
'''The Registration:'''
 +
The Registration involves a Relying Party, the server that hosts the Website, and the user client that must host at least one authenticator. To register, the user has to navigate to the website where he wishes to use Web Authentication and sign in using the method that was used to this point, which means for example a password. After that it is to choose to register this site from now an using Web Authentication, which leads to the request to submit the configures authorization gesture. When the provided gesture is accepted, the registrations is complete.
 +
 +
'''The Authentication:'''
 +
For the user, the authentication using the Web Authenticator works seemingly as a normal login with just the difference that instead of typing a password to verify its identity, the user uses the same Authentication gesture that he used to register to the site.
 +
 +
== Examples ==
 +
=== Login WebAuthn test website ===
 +
[[File:webauthn_1.PNG|400px]]
 +
 +
First you have to navigate to the Website where you want to change the default login to WebAuthn, in this case it is the test website of WebAuthn, the link is provided below, so we create a new user and pick the option PMT for we are going to use the inbuilt fingerprint sensor of the laptop to verify our identity.
 +
 +
[[File:webauthn2.PNG|300px]]
 +
 +
The security feature now asks us to verify the identity with the same Authenticatior you want to use every time you log into the website. The choice will be stored with your ID and used every time you login.
 +
 +
[[File:webauthn3.PNG|600px]]
 +
 +
The login was a scucess and now we are able to login just using our fingerprint.
 +
 +
[[File:webauthn4.PNG|300px]]
 +
 +
You are ask to provide the same authentication which you used to login, in this case the fingerprint.
 +
 +
[[File:webauthn5.PNG|800px]]
 +
 +
If everything goes well, you are now logged in just using a fingerprint sensor!
 +
 +
----
 +
Try it yourself if you want to!
 +
[https://webauthn.io/ WebAuthn Demo]
 +
 +
 +
----
 +
 +
=== Passwordless Login ===
 +
This example shows how to add a security key to the Microsoft account and how to log in to the account without a username and password.
 +
 +
A passwordless login to the MS account was tested with the following in every possible combination (OS+Browser+Security Key):
 +
 +
{| class="wikitable"
 +
|-
 +
! scope="col"| Operating System
 +
! scope="col"| Browser
 +
! scope="col"| Security Key
 +
! scope="col"| Successful
 +
|-
 +
| Windows 10
 +
| Google Chrome<br />Microsoft Edge<br />Mozilla Firefox<br />Opera
 +
| [[Yubico Security Key]]<br />[[Yubikey 5 C]]<br />[[Yubikey 5 NFC]]<br />[https://www.yubico.com/at/product/yubikey-5c-nfc/ Yubikey 5C NFC]
 +
| Yes
 +
|-
 +
| Android 9
 +
| Google Chrome<br />Microsoft Edge<br />Mozilla Firefox<br />Opera
 +
| Security Keys are not supported <br />to login to the MS account
 +
| No
 +
|}
 +
 +
 +
Assumption: one has a Microsoft account but has not yet added a security key
 +
 +
1. Sign in with your '''username''' and '''password'''.
 +
 +
2. Go to '''''Security>Advanced Security Options'''''.
 +
 +
3. Click on '''''Add a new way to sign in or verify'''''.
 +
[[File:FIDO2-WebAuthn_pwless_1.PNG|none|800px|]]
 +
<br />
  
 +
4. The window shows the additional options to verify or sign in. Select '''''Use a security key'''''.
 +
[[File:FIDO2-WebAuthn_pwless_2.PNG|none|300px]]
 +
<br />
  
== Goal ==
+
5. Read the instruction for your prefered method (USB or NFC) to register the security key. In this example USB was chosen.
+
[[File:FIDO2-WebAuthn_pwless_3.PNG|none|600px]]
 +
<br />
 +
 
 +
6. Enter the PIN.
 +
[[File:FIDO2-WebAuthn_pwless_pin.png|none|300px]]
 +
<br />
 +
 
 +
7. Touch the button of the security key.
 +
[[File:FIDO2-WebAuthn_pwless_touch.PNG|none|300px]]
 +
<br />
 +
 
 +
8. Name the added security key. It is recommended to add more than one security key. Naming the security keys helps to distinguish them.
 +
[[File:FIDO2-WebAuthn_pwless_keyname.PNG|none|300px]]
 +
<br />
 +
 
 +
9. The key is now registered.
 +
[[File:FIDO2-WebAuthn_pwless_finish.png|none|500px]]
 +
<br />
 +
 
 +
No username and password are needed for the next login with the added key.
 +
<br />
 +
 
 +
 
 +
'''Login:'''<br />
 +
1. Select '''''Sign in with a security key'''''.
 +
[[File:FIDO2-WebAuthn_pwless_login.PNG|none|300px]]
 +
<br />
 +
 
 +
2. Enter the PIN.
 +
[[File:FIDO2-WebAuthn_pwless_login_pin.PNG|none|300px]]
 +
<br />
 +
 
 +
3. Touch the button of the security key.
 +
[[File:FIDO2-WebAuthn_pwless_login_touch.PNG|none|300px]]
 +
<br />
 +
 
 +
If these steps were successful, the user is logged in.
 +
 
 +
 
 +
----
 +
 
 +
=== Second Factor Login ===
 +
 
 +
This example shows how to add a security key to the Google account and how to log in to the account with the second factor method.
 +
 
 +
The second factor login to the Google account was tested with the following in every possible combination (OS+Browser+Security Key):
 +
 
 +
{| class="wikitable"
 +
|-
 +
! scope="col"| Operating System
 +
! scope="col"| Browser
 +
! scope="col"| Security Key
 +
! scope="col"| Successful
 +
|-
 +
| Windows 10
 +
| Google Chrome<br />Microsoft Edge<br />Mozilla Firefox<br />Opera
 +
| [[Yubico Security Key]]<br />[[Yubikey 5 C]]<br />[[Yubikey 5 NFC]]<br />[https://www.yubico.com/at/product/yubikey-5c-nfc/ Yubikey 5C NFC]
 +
| Yes
 +
|-
 +
| rowspan="3"|Android 9
 +
| rowspan="2"|Google Chrome
 +
| [[Yubico Security Key]]<br /> (USB A and no NFC)
 +
| No
 +
|-
 +
|[[Yubikey 5 C]]<br />[[Yubikey 5 NFC]]<br />[https://www.yubico.com/at/product/yubikey-5c-nfc/ Yubikey 5C NFC]
 +
| Yes
 +
|-
 +
| Microsoft Edge<br />Mozilla Firefox<br />Opera
 +
| Security Keys are not supported on<br />this device or in this browser
 +
| No
 +
|}
 +
 
 +
 
 +
Assumption: one has a Google account but has not yet added a security key
 +
 
 +
1. Sign in with '''username''' and '''password'''.
 +
 
 +
2. Click on the profile on the top right and select '''''Manage your Google Account'''''.
 +
 
 +
3. Go to '''''Security'''''.
 +
 
 +
4. Select '''''2-Step Verification'''''.
 +
[[File:FIDO2_2Step_1.PNG|none|500px]]
 +
<br />
 +
 
 +
5. Enter your '''password'''.
 +
 
 +
 
 +
6. Google shows the options that can be used for the 2-Step Verification. Choose '''''ADD SECURITY KEY'''''.
 +
[[File:FIDO2_2Step_2.PNG|none|500px]]
 +
<br />
 +
 
 +
7. Get your security key and select '''''Next''''' to continue the process.
 +
[[File:FIDO2_2Step_3.PNG|none|300px]]
 +
<br />
 +
 
 +
8. Insert the security key into the USB port.
 +
[[File:FIDO2_2Step_4.PNG|none|300px]]
 +
<br />
 +
 
 +
9. Tap on the button of the security key.
 +
[[File:FIDO2_2Step_5.PNG|none|300px]]
 +
<br />
 +
 
 +
10. Name the security key (optional)
 +
[[File:FIDO2_2Step_6.PNG|none|300px]]
 +
<br />
  
== Used Software ==
+
11. The key is registered now.
 +
[[File:FIDO2_2Step_7.PNG|none|500px]]
 +
<br />
  
  
 +
'''Login:'''
  
== Used Hardware ==
+
1. Enter your '''username'''.
  
 +
2. Enter your '''password'''-
  
== Titel ==
+
3. Tap on the security key
 +
[[File:FIDO2_2Step_login_1.PNG|none|300px]]
 +
<br />
  
 +
4. Select '''''Next''''' to finish the process. Optionally, you can select if the security key on this device should no longer be used for logging in to the Google account.
 +
[[File:FIDO2_2Step_login_2.PNG|none|300px]]
 +
<br />
  
 
== References ==
 
== References ==
  
* https://www.openhab.org/
+
* https://webauthn.guide/#about-webauthn
* https://www.wireshark.org/
+
* https://www.w3.org/TR/webauthn/#intro
 +
 
 +
<references>
 +
<ref name="overview">https://developers.yubico.com/WebAuthn/WebAuthn_Developer_Guide/Overview.html</ref>
 +
</references>
 +
 
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Latest revision as of 03:45, 23 December 2020

WebAuthn logo

Summary

WebAuthn is an Application created by the FIDO (Fast Identity Online) alliance and the W3C (World Wide Web Consortium) to offer the possibility of passwordless authentication online. The latest recommendation is of March 2019 published by the W3C. Instead WebAuthn work either with the inbuild Authenticator of the device, such as fingerprint sensor or facial recognition, or with an extern media like an USB Stick for verification.

Goal

Its purpose is to offer a more secure and easy possibility to log into your online accounts without storing or remembering huge amounts of passwords to prevent the possibility of passwords getting leaked or forgotten.

Architecture [1]

FIDO2/WebAuthn Architecture[1]
Authenticator

The authenticator creates credentials, generates cryptographic proof of user authentication and administrate the PIN.

There are two types of authenticators:

  • external authenticator (e.g. security key) that is removable from the device
  • internal authenticator (e.g. fingerprint reader) that is implemented on the device
Client/Platform

The client implements CTAP2 and client-side WebAuthn API and proves the validity of the identity of the Relying Party to prevent phishing attacks. The client could be a browser for web applications or an operating system subsystem that offers a platform-specific FIDO API for mobile or desktop apps.

Relying Party (RP)

The Relying Party consists of at least one webserver, the server-side parts of the WebAuthn API and a WebAuthn Server, that has a trust store. The trust store contains the public trust parts for the attestation of the authenticator.

Functionality

WebAuthn works with two ceremonies:

The Registration: The Registration involves a Relying Party, the server that hosts the Website, and the user client that must host at least one authenticator. To register, the user has to navigate to the website where he wishes to use Web Authentication and sign in using the method that was used to this point, which means for example a password. After that it is to choose to register this site from now an using Web Authentication, which leads to the request to submit the configures authorization gesture. When the provided gesture is accepted, the registrations is complete.

The Authentication: For the user, the authentication using the Web Authenticator works seemingly as a normal login with just the difference that instead of typing a password to verify its identity, the user uses the same Authentication gesture that he used to register to the site.

Examples

Login WebAuthn test website

Webauthn 1.PNG

First you have to navigate to the Website where you want to change the default login to WebAuthn, in this case it is the test website of WebAuthn, the link is provided below, so we create a new user and pick the option PMT for we are going to use the inbuilt fingerprint sensor of the laptop to verify our identity.

Webauthn2.PNG

The security feature now asks us to verify the identity with the same Authenticatior you want to use every time you log into the website. The choice will be stored with your ID and used every time you login.

Webauthn3.PNG

The login was a scucess and now we are able to login just using our fingerprint.

Webauthn4.PNG

You are ask to provide the same authentication which you used to login, in this case the fingerprint.

Webauthn5.PNG

If everything goes well, you are now logged in just using a fingerprint sensor!


Try it yourself if you want to! WebAuthn Demo



Passwordless Login

This example shows how to add a security key to the Microsoft account and how to log in to the account without a username and password.

A passwordless login to the MS account was tested with the following in every possible combination (OS+Browser+Security Key):

Operating System Browser Security Key Successful
Windows 10 Google Chrome
Microsoft Edge
Mozilla Firefox
Opera
Yubico Security Key
Yubikey 5 C
Yubikey 5 NFC
Yubikey 5C NFC
Yes
Android 9 Google Chrome
Microsoft Edge
Mozilla Firefox
Opera
Security Keys are not supported
to login to the MS account
No


Assumption: one has a Microsoft account but has not yet added a security key

1. Sign in with your username and password.

2. Go to Security>Advanced Security Options.

3. Click on Add a new way to sign in or verify.

FIDO2-WebAuthn pwless 1.PNG


4. The window shows the additional options to verify or sign in. Select Use a security key.

FIDO2-WebAuthn pwless 2.PNG


5. Read the instruction for your prefered method (USB or NFC) to register the security key. In this example USB was chosen.

FIDO2-WebAuthn pwless 3.PNG


6. Enter the PIN.

FIDO2-WebAuthn pwless pin.png


7. Touch the button of the security key.

FIDO2-WebAuthn pwless touch.PNG


8. Name the added security key. It is recommended to add more than one security key. Naming the security keys helps to distinguish them.

FIDO2-WebAuthn pwless keyname.PNG


9. The key is now registered.

FIDO2-WebAuthn pwless finish.png


No username and password are needed for the next login with the added key.


Login:
1. Select Sign in with a security key.

FIDO2-WebAuthn pwless login.PNG


2. Enter the PIN.

FIDO2-WebAuthn pwless login pin.PNG


3. Touch the button of the security key.

FIDO2-WebAuthn pwless login touch.PNG


If these steps were successful, the user is logged in.



Second Factor Login

This example shows how to add a security key to the Google account and how to log in to the account with the second factor method.

The second factor login to the Google account was tested with the following in every possible combination (OS+Browser+Security Key):

Operating System Browser Security Key Successful
Windows 10 Google Chrome
Microsoft Edge
Mozilla Firefox
Opera
Yubico Security Key
Yubikey 5 C
Yubikey 5 NFC
Yubikey 5C NFC
Yes
Android 9 Google Chrome Yubico Security Key
(USB A and no NFC)
No
Yubikey 5 C
Yubikey 5 NFC
Yubikey 5C NFC
Yes
Microsoft Edge
Mozilla Firefox
Opera
Security Keys are not supported on
this device or in this browser
No


Assumption: one has a Google account but has not yet added a security key

1. Sign in with username and password.

2. Click on the profile on the top right and select Manage your Google Account.

3. Go to Security.

4. Select 2-Step Verification.

FIDO2 2Step 1.PNG


5. Enter your password.


6. Google shows the options that can be used for the 2-Step Verification. Choose ADD SECURITY KEY.

FIDO2 2Step 2.PNG


7. Get your security key and select Next to continue the process.

FIDO2 2Step 3.PNG


8. Insert the security key into the USB port.

FIDO2 2Step 4.PNG


9. Tap on the button of the security key.

FIDO2 2Step 5.PNG


10. Name the security key (optional)

FIDO2 2Step 6.PNG


11. The key is registered now.

FIDO2 2Step 7.PNG



Login:

1. Enter your username.

2. Enter your password-

3. Tap on the security key

FIDO2 2Step login 1.PNG


4. Select Next to finish the process. Optionally, you can select if the security key on this device should no longer be used for logging in to the Google account.

FIDO2 2Step login 2.PNG


References